Databricks Generative AI Engineer Associate · Section 5 · 8% of the exam
Use masking techniques as guard rails to meet a performance objective
One of the objectives of the Databricks Certified Generative AI Engineer Associate exam, in the section “Governance”. Here is what it covers, the points to remember and a question to try.
What it covers
Governance for a GenAI application means controlling what goes into the knowledge base, what reaches the model and what comes back out. This lesson covers PII masking at ingestion, in Unity Catalog and in AI Gateway; guardrails against prompt injection and abuse; checking the licenses of data sources; and better ways to deal with toxic or sensitive text than asking the model to ignore it.
Points to remember
- Masking replaces sensitive values and lets the request continue; blocking fails the request. Choose Mask when the app must keep answering.
- To meet a latency objective, mask PII once at ingestion (
ai_mask, regex) instead of scanning retrieved context on every request. ai_mask(content, array('person','email',…))is a Public Preview AI Function that returns the text with[MASKED]placeholders.- Unity Catalog column masks (
ALTER TABLE … ALTER COLUMN … SET MASK fn) and ABAC policies mask structured data at query time for every caller, agents included. - AI Gateway (legacy) guardrails (Public Preview): a safety filter (Llama Guard 2-8b) and PII detection with Block, Mask or None, set separately for input and output. Topic moderation and keyword filtering are no longer supported.
Try a question
A team wants to add a public dataset of product reviews, licensed CC BY-NC 4.0, to the knowledge base of a paid, customer-facing assistant. What should they do?
- AIngest it, because the dataset is publicly downloadable
- BIngest it and cite the dataset in every answer that uses it
- CExclude it unless they obtain a license that permits commercial use
- DIngest it after rewriting each review with an LLM so the text is no longer original
Show the answer
C. CC BY-NC allows only non-commercial use. A paid assistant is a commercial use, so the data must be excluded or licensed separately. Attribution meets CC BY terms but does not lift the NC restriction, and rewriting the reviews produces a derivative work that is still covered by the license.
Written for practice in the style of the exam: never a question from the real exam.
In the course
The lesson Governing GenAI Apps: Masking, Malicious Input, Licensing and Problematic Text teaches this objective (about 55 minutes), and 23 practice questions test it. The course has lessons, exam-style questions, timed practice exams and an AI tutor for every objective, and a pass prediction that tells you when you're ready to book.