Courseiva
Design Applications →mediumMultiple Choice

Databricks-GenAI-Assoc Design Applications Practice Question

An engineer is designing a RAG application where the LLM must answer questions using only the retrieved context and must refuse to answer when the context is insufficient. Which prompt design approach best enforces this behavior?

⚠ Common exam trap

The trap here is believing that deterministic decoding settings such as temperature zero eliminate hallucinations, when grounding must be enforced through prompt instructions.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

Use a system prompt that instructs the model to answer only from the provided context and to respond with a fixed refusal phrase when the context does not contain the answer.

The most reliable way to constrain a model to retrieved context is a system prompt that explicitly limits answers to that context and defines a refusal response when the information is missing. This gives the model a clear rule and a fallback, reducing hallucinations. Retrieval volume, temperature, and question repetition do not establish grounding boundaries.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    Increase the number of retrieved chunks to ten so the model always has enough context to answer.

    Why it's wrong here

    Retrieving more chunks does not guarantee relevance and can dilute the context with noise. It also does not instruct the model to refuse when the answer is absent. In fact, more context increases the chance the model will find a plausible but incorrect passage to use, worsening hallucinations.

  • ✓

    Use a system prompt that instructs the model to answer only from the provided context and to respond with a fixed refusal phrase when the context does not contain the answer.

    Why this is correct

    A system prompt sets the model's operating constraints and is the most direct way to instruct it to rely solely on the retrieved context. Including an explicit refusal phrase gives the model a defined fallback, reducing hallucinations. This approach is deterministic in structure and works across providers that support system-level instructions.

  • ✗

    Set the model's temperature to zero and rely on deterministic decoding to prevent unsupported answers.

    Why it's wrong here

    Temperature zero makes sampling greedy but does not prevent the model from generating content outside the provided context. Determinism affects variability, not grounding. The model can still hallucinate confidently if the prompt does not constrain it to the retrieved passages.

  • ✗

    Append the user's question twice in the prompt to reinforce the instruction to stay grounded.

    Why it's wrong here

    Repeating the question does not communicate grounding constraints and may confuse the model or waste context window space. It does not provide a refusal behavior or restrict the model to retrieved content. This technique is not a recognized method for enforcing answer boundaries.

About these practice questions

This Databricks-GenAI-Assoc question is part of Courseiva's 330-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Databricks exam blueprint

This Databricks-GenAI-Assoc practice question is part of Courseiva's free Databricks certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the Databricks-GenAI-Assoc exam.