Rubric
Contents — domains, guide and mocks

Diagnosing prompt, hallucination and model issues

CCAR-P 4.414 min read · checked 21 September 2026

Task statementDiagnose system issues (prompt failure, hallucinations, model mismatch)

Classify the failure from the evidence

What does the transcript show?
  • Instruction missed or misread
    Prompt failureclarify, add context, examples
  • Claim not in the context
    Hallucinationground, cite, allow “I don't know”
  • Clear prompt, still beyond it
    Model mismatchchange model or effort
  • Cut off or unparsed
    Harness or config buglimits, parsing, parameters
Start from the transcript, not the symptom. The same wrong answer can come from any of these branches — and each branch has a different fix.

Start from evidence, not from the complaint

A complaint says “the bot gave a wrong answer”. That is a symptom. Diagnosis means finding which part of the system produced it, and the transcript is where you look. Anthropic's engineers repeat one piece of advice more than any other: read the transcripts. They record exactly what the model was given, what it did, and what it returned.

  1. Reproduce. Capture the exact input, system prompt, retrieved context, tools, model and parameters. A bug you cannot replay you cannot fix.
  2. Check the plumbing first. Did the response end because of max_tokens? Did your code read the wrong content block? Was a tool result empty or an error? These look like model failures and aren't.
  3. Ask whether the answer was available. Search the context for the fact the model needed. Present, absent, or contradictory?
  4. Isolate one variable. Re-run the same case with a clarified prompt, then with a stronger model or higher effort. Whichever change fixes it tells you the category.
  5. Fix, and add the case to the eval set so the regression suite catches it next time (4.2).
Isolate the cause: vary one thing at a time on the failing casespython
CONFIGS = {
    "baseline":       dict(model="claude-haiku-4-5", system=PROMPT_V1),
    "clearer_prompt": dict(model="claude-haiku-4-5", system=PROMPT_V2),
    "stronger_model": dict(model="claude-sonnet-5",  system=PROMPT_V1),
}

for name, cfg in CONFIGS.items():
    passed = 0
    for case in failing_cases:                     # from logs or the eval set
        r = client.messages.create(max_tokens=2048,
                                   messages=case.messages, **cfg)
        if r.stop_reason == "max_tokens":          # plumbing, not intelligence
            print(name, case.id, "TRUNCATED")
            continue
        text = "".join(b.text for b in r.content if b.type == "text")
        passed += grade(case, text)                # code or rubric grader
    print(f"{name}: {passed}/{len(failing_cases)}")
# Clearer prompt fixes it  -> prompt failure
# Only stronger model does -> model mismatch
# Neither                  -> look at the data or retrieval

Prompt failure

A prompt failure is when the model could do the task but was not told clearly enough what the task was. Typical signs: the right content in the wrong format; an instruction followed on some inputs and ignored on others; a sensible answer to a different question; behaviour that changed after a model upgrade because the prompt was tuned to the old model's habits.

Anthropic's prompting guide gives the diagnostic test in one line: show the prompt to a colleague with minimal context and ask them to follow it — if they'd be confused, Claude will be too. Its fixes map to the common causes: be explicit about the output and constraints; give the reason behind an instruction so the model can generalise; add three to five relevant, diverse examples; separate instructions, context and inputs with XML tags; and for long documents, put the documents at the top and the question at the end.

A prompt failure and its fix

Fails on 1 in 5 casestext

You are a support agent.
Answer the customer's question
about returns. Be concise.
{{POLICY}}
{{QUESTION}}

Passes the suitetext

<policy>{{POLICY}}</policy>
<question>{{QUESTION}}</question>

Answer from <policy> only.
Customers read this on a phone,
so use at most 3 sentences.
If the policy doesn't cover it,
say so and offer a human agent.
Quote the policy line you used.
The model wasn't wrong so much as uninformed. The fixed version states the audience, the format, the reason, and what to do when the policy doesn't cover the case.

Hallucination

A hallucination is output that is factually wrong or unsupported by the context the model was given — an invented policy clause, a citation to a case that doesn't exist, a confident number with no source. The first diagnostic question is simple: was the correct fact in the context?

What you find in the transcriptLikely causeFix
The needed fact is absent from the contextRetrieval gap; the model filled it inFix retrieval (see 3.5–3.6) and allow “I don't have enough information”
The fact is present but the answer misstates itWeak groundingQuote first, then answer; require a supporting quote per claim
The answer mixes document facts with outside knowledgeNo restriction on sourcesInstruct it to use only the provided documents
Different runs give different “facts”Model is guessingBest-of-N comparison as a detector; ground and cite

Anthropic's guide to reducing hallucinations lists these techniques. The basic ones: explicitly allow Claude to say it doesn't know; for long documents (over about 20k tokens), extract word-for-word quotes before doing the task; and have Claude cite a quote for each claim, retracting any claim it can't support. The advanced ones: step-by-step reasoning before the answer, best-of-N comparison, iterative refinement, and restricting the model to the documents provided. The same page is honest about the limit — these reduce hallucinations but don't eliminate them, so critical information still needs validating.

Model mismatch

Model mismatch runs in both directions. Under-powered: the prompt is clear and the context complete, but the task needs more reasoning than the model delivers — multi-step analysis collapses, long agentic tasks lose the thread. Over-powered: a simple, high-volume classification runs on the most capable model, so latency and cost miss their targets while accuracy has nothing left to gain. Both are mismatches between task and model; only one shows up as wrong answers.

Anthropic's model-selection guide frames it as a balance of capabilities, speed and cost, and offers two starting strategies: start efficiency-first with a fast, cheap model and upgrade only for specific capability gaps, or start capability-first and optimise down. Either way, the decision should come from your own eval set run across models — the guide calls a good evaluation set the most important step. It also notes that the effort parameter trades intelligence for latency and cost within a single model and is often a better lever than switching models.

Triage of one failing case

  • Passes: Response complete — stop_reason was end_turn
  • Passes: Refund-limit policy chunk present in the context
  • Fails: Prompt says which policy wins when two conflicttwo versions of the policy were retrieved
  • Passes: Clearer prompt fixes the case on re-run→ prompt failure, not model
  • Missing: Stale policy removed from the indexdata fix still needed
  • Missing: Case added to the regression suite
A support ticket says “the assistant ignored the refund limit”. Working down the list rules out the cheap causes before anyone changes the model.

One more category deserves a name because it is so often misdiagnosed: harness and configuration bugs. A response cut off at max_tokens looks like the model stopping mid-thought. After a migration, code that reads content[0].text can pick up a thinking block instead of the answer, and requests carrying non-default temperature can fail outright on newer models. None of these is a prompt, hallucination or model problem, and none is fixed by changing one.

Traps the wrong answers are built from

Tempting but wrongDo this instead
Upgrading to a bigger model as the first response to wrong answersCheck plumbing, context and prompt first; upgrade only when a clear prompt with complete context still fails.
Tightening the prompt to stop hallucinations when the fact was never retrievedFix retrieval, and allow the model to say it doesn't have enough information.
Diagnosing from the user's complaint instead of the transcriptReproduce the exact request and read what the model was given and returned.
Treating truncated or mis-parsed output as model failureCheck stop_reason, token limits and response parsing before changing prompts or models.
Running the most capable model on every request by defaultMatch model and effort to each task slice using your eval results.

You should now be able to

  • Classify a failure as prompt failure, hallucination, model mismatch or harness bug from transcript evidence.
  • Isolate a cause by varying one factor — prompt, model, effort, context — on the failing cases.
  • Apply Anthropic's hallucination-reduction techniques and know their limits.
  • Recognise under-powered and over-powered model mismatches and choose between upgrade, effort change and routing.
  • Turn every diagnosed failure into a regression test.

Practice questions

Original questions written for this lesson, in the exam’s style. Answer first, then open the reasoning — every option is explained, including why the wrong ones are tempting.

  1. Question 1

    A benefits chatbot tells an employee that dental cover includes orthodontics. It doesn't. The transcript shows the retrieved chunks cover general dental benefits but not the exclusions list.

    What is the most effective fix?

    1. ASwitch to a more capable model so it reasons about exclusions.
    2. BAdd “never make things up” in capital letters to the system prompt.
    3. CFix retrieval to include exclusions and let the bot say it can't confirm.
    4. DLower the temperature so answers are more deterministic.
    Show answer and reasoning
    1. AIncorrect. The model never saw the exclusions; a stronger model would still be guessing.
    2. BIncorrect. Emphatic wording can't supply a missing fact; at best it makes the model hedge.
    3. CCorrect. The fact was absent from the context, so retrieval is the root cause, and allowing uncertainty is the safety net.
    4. DIncorrect. Determinism doesn't create missing information — and non-default temperature is rejected on some current models.
  2. Question 2

    A contract-summary feature intermittently returns summaries that stop mid-sentence. The team suspects the model is “losing focus” on long contracts.

    What should be checked first?

    1. AWhether stop_reason is max_tokens on the affected responses.
    2. BWhether a larger model summarises long contracts better.
    3. CWhether the prompt asks for concise summaries.
    4. DWhether the contracts contain prompt-injection attempts.
    Show answer and reasoning
    1. ACorrect. Mid-sentence endings are the signature of hitting the output limit — a configuration issue, not a model one.
    2. BIncorrect. Changing models before ruling out truncation may simply move the problem.
    3. CIncorrect. Conciseness instructions don't explain text that ends mid-word.
    4. DIncorrect. Injection would change behaviour, not typically cut output off mid-sentence.
  3. Question 3

    A claims-analysis step fails on complex multi-document cases. The team re-runs the failing cases: a clearer prompt with examples fixes almost none; the same prompt on a more capable model fixes most.

    Which two conclusions or actions are best supported? (Select 2.)

    1. AThe failures are primarily a model mismatch for this slice.
    2. BThe failures are hallucinations caused by retrieval gaps.
    3. CRoute complex multi-document cases to the more capable model.
    4. DKeep iterating on the prompt until the smaller model passes.
    5. EReplace the eval set, since it is too hard for production.
    Show answer and reasoning
    1. ACorrect. When only the stronger model fixes cases, capability is the constraint.
    2. BIncorrect. If the context were missing facts, a stronger model wouldn't fix most cases.
    3. CCorrect. Matching the model to the hard slice fixes the failures without paying for it on simple cases.
    4. DIncorrect. The experiment already showed prompt changes aren't the lever for this slice.
    5. EIncorrect. The eval reflects real cases; weakening it hides the problem.
  4. Question 4

    After a model upgrade, an agent starts calling a search tool on nearly every turn, even for simple questions. Its prompt says “ALWAYS use tools to verify everything.” What is the most likely diagnosis?

    1. AThe new model is hallucinating calls to the search tool.
    2. BThe new model is under-powered for tool selection.
    3. CThe search tool's description is corrupted.
    4. DA prompt failure: wording tuned for the old model now over-triggers.
    Show answer and reasoning
    1. AIncorrect. The calls are real and follow the instruction; this is over-application, not fabrication.
    2. BIncorrect. It is doing exactly what the prompt says — more readily than the old model did.
    3. CIncorrect. Nothing suggests the tool definition changed; the prompt did the steering.
    4. DCorrect. Anthropic's migration notes warn that aggressive tool-use prompting written for older models can over-trigger on newer, more proactive ones.

Sources

Drafted with AI assistance and checked against the sources above; expert review is in progress. Spotted an error? Tell us and it gets fixed, dated and listed on how this is written.