Databricks Generative AI Engineer Associate · Section 5 · 8% of the exam
Use legal/licensing requirements for data sources to avoid legal risk
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 support assistant retrieves chunks from an AI Search index built on knowledge-base articles that contain customer names and phone numbers. Compliance requires that this PII never reaches the LLM, and the product team has a strict p95 latency target of 1.5 seconds. Which approach meets both requirements?
- ACall
ai_maskon every retrieved chunk inside the agent before building the prompt - BEnable the AI Gateway output PII guardrail in Block mode on the LLM endpoint
- CRun
ai_maskover the chunk table in the ingestion job and index only the masked text - DAdd a system prompt instruction telling the model never to repeat names or phone numbers
Show the answer
C. Masking once at ingestion keeps the PII out of the index, the prompts and the logs, and adds no work to each request. That meets both the compliance rule and the latency objective. Masking at request time would add an LLM call for every retrieved chunk on the critical path.
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.