Home / GenAI Engineer practice test / Application Development / Question

Databricks Generative AI Engineer Associate · free practice question

An LLM application operating in production handles financial documents submitted by users. The security department has two critical requirements: (1)…

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

Updated November 11, 2026

Application Development

An LLM application operating in production handles financial documents submitted by users. The security department has two critical requirements: (1) preventing end-users from circumventing the model's inherent system instructions through specially designed inputs, and (2) ensuring that no credit card numbers are ever present in the model's generated output. Which guardrail architecture effectively satisfies both of these security mandates?

  1. AScan incoming prompts for known injection patterns before they reach the LLM, and filter responses with regex or a PII model to redact card numbers.
  2. BRely on the model's alignment training, which resists instruction overrides and withholds sensitive financial data such as card numbers from responses.
  3. CValidate input length to block overly long prompts that may carry injection attempts, and set a maximum token limit on the generated output.
  4. DFilter the retrieved source documents so that those containing credit card numbers are removed from the context window before generation.
Answer & explanation

Correct answer: A

WHY A is correct: A two-layer guardrail — input scanning for prompt injection and output scanning for PII — correctly addresses both requirements. The input scanner intercepts adversarial attempts to override system instructions before they reach the model. The output scanner applies regex or a PII detection model (e.g., Microsoft Presidio) to redact credit card numbers from the model's response regardless of how they appeared.

WHY NOT C: Token count validation only catches length-based attacks, not semantic injection attempts ('ignore all previous instructions' is very short). max_tokens limits length but does not detect or redact PII content.

WHY NOT B: Relying solely on alignment training is insufficient for production systems. Prompt injection and jailbreaks are documented attack vectors that can bypass alignment. Defense-in-depth is required.

WHY NOT D: A retrieval filter only removes PII from ingested source documents. Credit card numbers could appear in the user's direct query, be generated from model parametric memory, or be inferred by the model — all of which a retrieval filter cannot catch.

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 →