Home / GenAI Engineer practice test / Governance

Free · 7 questions with explanations

Governance: Databricks Generative AI Engineer Associate Practice Questions

Exam-style questions on Governance. Pick your answer, then open the explanation to see why it's right — and why the other options are wrong.

Updated November 11, 2026

1 Governance

An audit of a RAG application's knowledge base reveals that approximately 8% of ingested online forum posts contain toxic content (hate speech, slurs, violent language). This content occasionally surfaces in the assistant's responses, causing user complaints and brand risk. The team needs a scalable mitigation strategy for the data source. Which approach is MOST effective?

  1. AAdd a toxicity classifier to the ingestion pipeline that scores each chunk and filters out those above a threshold before indexing
  2. BInstruct the LLM through the system prompt to ignore toxic or offensive content in retrieved chunks and answer from the constructive material that remains
  3. CRaise the retrieval similarity threshold so that lower-scoring chunks, where toxic content is expected to fall, are not returned
  4. DAdd a disclaimer banner to the application UI stating that responses may reflect user-generated content that is not reviewed
Show answer & explanation

Correct answer: A

WHY A is correct: Fixing problems at the data source — during ingestion, before the knowledge base is built — is the most effective and durable mitigation. A toxicity classifier applied per-chunk at ingest time removes problematic content from the Delta table and Vector Search index permanently. Toxic chunks never enter the knowledge base and cannot be retrieved, regardless of the query. This upstream fix is more reliable than any downstream LLM-level interventions. WHY NOT D: A UI disclaimer acknowledges the problem but does nothing to prevent toxic content from appearing in responses. It shifts liability rather than removing the risk, and user-facing disclaimers do not satisfy enterprise safety requirements. WHY NOT B: System prompt instructions are the weakest form of guardrail. The LLM may still reproduce toxic phrasing when it appears in retrieved context, especially for closely relevant queries. Instructions are not reliably followed when the context window contains strongly contradicting content. WHY NOT C: Retrieval similarity scores measure semantic relevance to the user query, not content quality or toxicity. A toxic post that is topically relevant to the user's question will score high, not low. Raising the threshold only reduces result count — it does not correlate with toxicity reduction.

2 Governance

A deployed RAG application generates customer-facing responses that occasionally include full credit card numbers from the underlying document corpus, even though the source documents were supposed to be sanitized. The team cannot immediately re-sanitize the entire document corpus. Which guardrail technique specifically addresses PII leakage in the model's OUTPUT?

  1. AReduce the retriever's top-k parameter from 10 to 3 so that fewer source chunks that might contain credit card numbers reach the prompt
  2. BIncrease the LLM's max_tokens parameter so that the model has room to paraphrase around the numbers it would otherwise copy
  3. CRe-run the Vector Search index sync so that Databricks re-embeds the source documents with a newer embedding model
  4. DAdd a post-generation scanner that uses regex and a PII detection model to redact card numbers before the response is returned
Show answer & explanation

Correct answer: D

WHY D is correct: Output scanning with regex and/or a PII detection model is the standard post-generation guardrail for preventing sensitive data leakage in LLM responses. It runs on every response before it reaches the user and acts as a safety net independent of whether the source documents or model behavior were properly sanitized. Regex patterns for credit card formats are highly reliable and have near-zero latency overhead. WHY NOT A: Reducing top-k decreases the chance of retrieving a PII-containing chunk but does not eliminate it. If even one retrieved chunk contains a credit card number, the model may still surface it in the response. This is a probabilistic mitigation, not a guardrail. WHY NOT B: max_tokens controls response length, not the model's tendency to copy or generate specific content. Increasing it makes no causal connection to PII suppression and would likely generate longer — not safer — responses. WHY NOT C: Re-syncing the index updates the vector embeddings but does not sanitize the source document content. Credit card numbers in the original Delta table text remain present and can still be retrieved and surfaced.

3 Governance

A public-facing legal research assistant must prevent users from eliciting responses about illegal activities, hate speech, or self-harm — regardless of how the request is phrased or obfuscated. The team evaluates several input guardrail approaches. Which architecture provides the MOST comprehensive coverage against malicious content across diverse harm categories?

  1. AAdd an instruction to the system prompt not to discuss illegal activities, hate speech or self-harm, and rely on the LLM to enforce it
  2. BMaintain a curated blocklist of 500 prohibited words and phrases and reject a message when it contains one or more blocklisted terms
  3. CDeploy a multi-category safety classifier such as Llama Guard that checks each message against a harm taxonomy before the LLM
  4. DLog user inputs to an audit table and run a daily batch job that flags queries by keyword matching and blocks offending users the next day
Show answer & explanation

Correct answer: C

WHY C is correct: A multi-category safety classifier like Llama Guard is purpose-built for this task. It evaluates the semantic meaning of the input across a comprehensive, structured harm taxonomy, not just keyword presence. It handles obfuscation (e.g., 'how does one hypothetically build a weapon?') that keyword matching misses, provides per-category verdicts for auditability, and enforces safety before the primary LLM is invoked. WHY NOT B: A fixed keyword blocklist is easily circumvented by paraphrasing, using synonyms, inserting spaces, or using homoglyphs. It also generates high false positives (e.g., blocking 'gun control policy research' for containing 'gun'). Keyword matching cannot understand semantic context. WHY NOT A: Adding a system prompt instruction is the weakest guardrail available — it relies entirely on the primary LLM's instruction-following, which can be bypassed by creative prompt formulations. Academic research proves that system-prompt-only safety constraints are not sufficient for adversarial resistance in public applications. WHY NOT D: A daily batch review is a retrospective audit mechanism, not a real-time guardrail. Harmful content is delivered to users and processed by the LLM for up to 24 hours before detection. This approach does not prevent harm — it only detects it after the fact.

4 Governance

A legal services firm's RAG knowledge base includes regulatory documents, some of which are superseded versions no longer valid under current law. Responses citing outdated regulations create serious liability risk. The existing pipeline ingests all documents from a shared Drive folder without date validation. Which mitigation strategy BEST addresses this structural problem in the data source?

  1. AFine-tune the embedding model on current regulations so that superseded documents receive lower similarity scores for recent queries
  2. BAdd a system prompt instruction noting that retrieved content may be outdated, so the LLM tells users to verify answers against current regulations
  3. CTag each document with effective_date and expiration_date at ingestion, exclude expired ones before indexing, and schedule a job to remove newly expired documents
  4. DIncrease the number of retrieved chunks to 15 so that current documents outnumber superseded ones in the context passed to the LLM
Show answer & explanation

Correct answer: C

WHY C is correct: Metadata-driven lifecycle management at the data source is the correct architectural response to stale regulatory content. Tagging documents with expiration dates allows the ingestion pipeline to systematically exclude expired regulations before they are indexed — they can never be retrieved and cannot appear in responses. A scheduled refresh pipeline maintains this invariant as new expirations occur. This is a durable, programmatic fix to a structural data quality problem. WHY NOT B: A system prompt disclaimer reduces the severity of liability but does not prevent outdated regulations from being cited in responses. Legal services firms require accuracy, not hedging language. A disclaimer does not remove the business or legal risk of incorrect regulatory guidance. WHY NOT A: Embedding models learn semantic similarity during training — they cannot distinguish 'current' from 'superseded' regulations based on legal validity. A regulation replaced in 2023 will still be semantically similar to current queries about the same topic. Re-training on current regulations would not reliably deprioritize superseded versions. WHY NOT D: Retrieving more chunks statistically reduces but does not eliminate the probability that an outdated document is included. If the outdated regulation is highly relevant to the query, it will rank highly regardless of how many total chunks are retrieved. Dilution is not a reliable fix when the problematic content is topically relevant.

5 Governance

A startup is assembling a knowledge base for a commercial RAG-powered research assistant that will be sold as a SaaS product. Two candidate datasets are available: Dataset A is a curated scientific article corpus licensed under CC BY-NC 4.0. Dataset B is an equivalent corpus licensed under CDLA-Permissive-2.0. The legal team must choose one. Which recommendation is legally correct?

  1. AUse Dataset A for embeddings, since the NC restriction covers redistribution of the full text and not vector representations of it
  2. BUse Dataset B, since CDLA-Permissive-2.0 allows commercial use, while the NC clause bars Dataset A from a paid SaaS product even for retrieval
  3. CUse either dataset, since Creative Commons licenses are advisory rather than legally binding for AI/ML training and RAG applications
  4. DUse Dataset A, since the Attribution (BY) clause takes precedence over the Non-Commercial clause once the authors are credited
Show answer & explanation

Correct answer: B

WHY B is correct: CC BY-NC 4.0's Non-Commercial clause prohibits using the licensed material 'primarily for commercial advantage or monetary compensation.' Using a dataset as a knowledge source in a commercial SaaS RAG product constitutes commercial use — the NC restriction applies. CDLA-Permissive-2.0 was specifically designed for data in AI/ML pipelines and permits commercial use, making Dataset B the only legally safe choice. WHY NOT A: The argument that NC restrictions 'don't apply to vector representations' is legally untested and risky. Generating embeddings from NC-licensed text is a form of processing that derives commercial value from the licensed work. Most legal interpretations consider this commercial use under CC BY-NC. WHY NOT D: In Creative Commons licensing, the BY (Attribution) clause requires credit to the creator — it does not modify or override the NC restriction. Attribution and Non-Commercial are independent licensing conditions; satisfying one does not waive the other. WHY NOT C: Creative Commons licenses are legally binding copyright licenses, enforceable in court. They are not advisory guidelines. Using NC-licensed data commercially without authorization exposes the company to copyright infringement liability.

6 Governance

A financial services company processes customer loan inquiries through a RAG-based assistant. Regulatory policy prohibits customer PII (full names, Social Security Numbers, account numbers) from ever being transmitted to the external LLM API. The data pipeline ingests raw customer messages. Which input masking technique BEST enforces this requirement before text is sent to the model?

  1. AConfigure the Vector Search retriever to exclude document chunks that contain numeric sequences longer than six digits
  2. BFine-tune the LLM on PII-redacted transcripts so that the model learns to leave names, SSNs and account numbers out of its outputs
  3. CEncrypt the full input with AES-256 before sending it to the LLM endpoint, then decrypt the model's response when it returns
  4. DRun NER or regex detection in pre-processing and replace names, SSNs and account numbers with placeholder tokens
Show answer & explanation

Correct answer: D

WHY D is correct: Pre-processing masking is the only approach that prevents PII from entering the LLM's context window. An NER model or regex pipeline identifies specific entity types and replaces them with typed placeholders before the API call. The LLM processes placeholder tokens instead of real PII, satisfying the regulatory prohibition on transmission. WHY NOT B: Fine-tuning alters the model's output tendencies but does not prevent PII from being transmitted to the model in the input. The PII still crosses the network boundary to the LLM API, violating the transmission prohibition regardless of output behavior. WHY NOT C: AES-256 encryption produces ciphertext that is meaningless to the LLM — the model cannot interpret or reason about encrypted inputs. This approach would produce semantically useless responses. Encryption is used for data-at-rest or in-transit security, not for selective entity masking during LLM inference. WHY NOT A: Filtering by numeric sequence length is a heuristic retrieval filter, not a masking technique. It only affects which document chunks are retrieved from the vector store — it does not mask PII in the live user's input message before it is sent to the LLM.

7 Governance

A team is building a code-generation RAG assistant and wants to include a large corpus of code examples from a popular open-source repository as source documents. The repository uses the GNU General Public License v3 (GPL-3.0). The legal team raises a concern. What is the PRIMARY legal risk of including GPL-licensed code in the RAG knowledge base of a commercial closed-source product?

  1. AIts terms restrict automated parsing and tokenizing of source files, so building embeddings from the code would breach the license
  2. BIts copyleft terms could require the proprietary product to be released under GPL-3.0 if generated output reproduces GPL-licensed code
  3. CIts terms require each model output that draws on GPL-licensed examples to carry the original repository author's name as a visible watermark
  4. DIts terms match permissive licenses such as MIT and Apache 2.0, so the remaining risk is a missing attribution notice in the product
Show answer & explanation

Correct answer: B

WHY B is correct: GPL-3.0's copyleft (viral) clause requires that any software that is a 'derivative work' of GPL-licensed code must also be licensed under GPL. The key legal risk for a commercial RAG system is that if the LLM generates responses that reproduce verbatim or substantially similar GPL code excerpts, those outputs may be considered derivative works — potentially triggering the copyleft requirement to release the entire product under GPL. This is an active area of legal debate (Copilot litigation precedents) and represents genuine legal exposure for closed-source commercial products. WHY NOT A: GPL-3.0 does not restrict automated processing, parsing, or tokenizing of source code. The license governs distribution and derivative works, not mechanical processing for indexing or embedding purposes. WHY NOT C: GPL-3.0 does not require watermarking of outputs or attribution in every generated response. Attribution requirements of this type appear in some Creative Commons licenses (BY clause), not in GPL. WHY NOT D: GPL-3.0 is explicitly NOT a permissive license. It is one of the strongest copyleft licenses. MIT and Apache 2.0 are permissive and impose no copyleft obligations. Equating GPL with these licenses represents a fundamental misunderstanding of open-source licensing that could lead to severe legal consequences.

Take the full GenAI Engineer practice test →