Home / GenAI Engineer practice test / Governance / Question

Databricks Generative AI Engineer Associate · free practice question

A publicly accessible generative AI application, designed as a legal research tool, needs to effectively block user prompts that solicit information concerning…

Exam-style question on Governance from the free GenAI Engineer practice test, with the answer and a full explanation below.

Updated November 11, 2026

Governance

A publicly accessible generative AI application, designed as a legal research tool, needs to effectively block user prompts that solicit information concerning unlawful acts, discriminatory language, or self-inflicted harm, even if those requests are artfully disguised or indirectly phrased. The development team is assessing various strategies for input moderation. Which design pattern offers the SUPERIOR defense against harmful user-generated content spanning multiple types of detrimental subjects?

  1. ALog each prompt to an audit table and run a daily keyword job that flags suspicious queries and suspends those users
  2. BMaintain a curated blocklist of about 500 prohibited words and phrases and reject prompts that contain a listed entry
  3. CAdd a system prompt instruction telling the LLM to refuse requests about illegal acts, hate speech or self-harm
  4. DRun a multi-category safety classifier such as Llama Guard on each prompt and block unsafe ones before they reach the main LLM
Answer & explanation

Correct answer: D

WHY D 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 C: 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 A: 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.

Take the full GenAI Engineer practice test free →

Would you pass today?

This question is one of 45 in the free, timed Databricks Generative AI Engineer Associate practice test. Take it and get a section-by-section score.

Start the free test →