Courseiva

CCDV-F Prompt and Context Engineering Practice Question

You are developing a summarization tool using Claude 3.5 Sonnet. You notice the model often hallucinates specific financial figures not present in the source text. What is the most effective prompt engineering strategy to mitigate this?

⚠ Common exam trap

Candidates rely on vague instructions like 'don't lie' instead of enforcing strict grounding constraints and fallback behaviors like outputting 'N/A'.

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

✓

Add a constraint to the system prompt: 'Answer only using the provided text. If the answer is not contained in the text, respond with N/A.'

To reduce hallucinations, you must constrain the model to the provided context. By explicitly instructing the model to output 'N/A' if the information is missing, you shift the model's objective from creative generation to factual extraction. This technique, often called 'grounding', is critical for high-stakes applications where accuracy is prioritized over fluency, ensuring that the model adheres strictly to the provided source material rather than its internal training data.

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 temperature setting to 1.0 to encourage more creative exploration.

    Why it's wrong here

    Increasing temperature adds randomness to the token selection process, which significantly increases the likelihood of hallucinated content. In factual extraction tasks, lower temperatures are preferred to ensure the model makes the most statistically probable choices based on the provided text, minimizing the deviation from source data.

  • ✗

    Ask the model to act as a financial expert and provide its own professional analysis.

    Why it's wrong here

    Assigning an expert persona can improve the tone of the response but does not inherently prevent hallucinations. The model may use its training data to fill in gaps if the source text is incomplete, leading to external information being mixed with the provided input data.

  • ✓

    Add a constraint to the system prompt: 'Answer only using the provided text. If the answer is not contained in the text, respond with N/A.'

    Why this is correct

    Explicitly instructing the model to restrict its knowledge base to the provided context creates a hard constraint. By defining a specific fallback behavior for missing information, the model avoids the temptation to synthesize plausible-sounding but factually incorrect details from its pre-training corpus during the generation process.

  • ✗

    Include a few-shot example that shows the model ignoring missing information.

    Why it's wrong here

    While few-shot prompting is helpful, examples that show the model ignoring missing info contradict the goal of grounding. The examples must demonstrate strict adherence to the source text, showing the model identifying gaps, rather than teaching it to overlook missing data which could lead to further errors.

About these practice questions

One of 257 original CCDV-F practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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 Anthropic exam blueprint

This CCDV-F practice question is part of Courseiva's free Anthropic 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 CCDV-F exam.