What you will be able to do
- Confirm a suspected hallucination in a live system with source checks, cross-sample consistency and citation verification
- Trace literal-but-unwanted behaviour back to the prompt instruction that caused it
- Read a tool-use symptom (wrong tool, bad arguments, excess calls) back to a description, schema or prompt cause
- Recognise a model mismatch in either direction and prove it with an eval before switching
Key concept
Symptom-to-layer diagnosis — A bad output is a symptom. Before you pick a fix, work out which layer produced it: grounding, the prompt, the tool definitions or the model's capability. A fix aimed at the wrong layer leaves the real cause in place.
1.Four layers a failure can come from
Once a Claude-based system is live, failures reach you as symptoms: a figure nobody can find in the source, JSON whose keys keep changing, a tool called when another was meant, replies that are slow and expensive. The same symptom can come from different layers, and each layer has its own fix. Diagnosis means naming the layer before you change anything.
There are four layers to check:
- Grounding: the model states things its inputs do not support.
- Prompt: the model did what the instructions said, and the instructions were not what you meant.
- Tools: descriptions or schemas leave the model guessing about which tool to call or how to call it.
- Model: the model is the wrong size for the work. Either it is too weak for the task, or it costs more than the task needs.
A troubleshooting table is the most useful shape for this kind of diagnosis: an observed symptom, its likely cause, then the fix. Anthropic's tool-use troubleshooting guide is organised exactly that way, and the sections below apply the same shape to every layer. The discipline matters most when the fix that comes to mind first belongs to the wrong layer. Adding citations will not make a slow, over-sized model faster. Renaming a tool will not resolve two descriptions that overlap.
Checkpoint 1 of 9· Check yourself
A support assistant built on Claude keeps calling lookup_order when it should call lookup_refund, and the two tools have descriptions that overlap. Which diagnosis and fix go together?
Calling one tool when another was meant comes from the tools layer: the descriptions are ambiguous. The fix is sharper descriptions. Renaming a tool won't fix overlapping descriptions, and a bigger model or added citations targets the wrong layer.
“Claude calls tool A when you wanted tool B | Description ambiguity | Sharpen descriptions.”Source: platform.claude.com
2.Confirming a suspected hallucination
A hallucination is output that is factually wrong or inconsistent with the context the model was given. It is dangerous because it rarely looks wrong. Claude can display quotes that may look authoritative or sound convincing, but are not grounded in fact. Fluency tells you nothing, so a suspicion has to be confirmed with a check that does not depend on how the answer reads.
Three checks confirm a hallucination in a running system.
- Check claims against the sources. Ask Claude to extract word-for-word quotes from the documents before it does its task. A claim with no quote behind it is suspect.
- Check consistency across samples. Run the same prompt several times and compare the outputs. Facts that change from run to run were probably generated, not retrieved.
- Verify citations. After Claude generates a response, have it find a supporting quote for each claim, and retract any claim it cannot support. A press-release prompt can tell it to delete unsupported claims and mark each gap with empty [] brackets, so a reviewer can see exactly where the gaps were.
When one answer looks wrong and you want to know why, turn on thinking with display: "summarized" and read the summarized reasoning. It can show the faulty assumption the answer was built on.
Once a hallucination is confirmed, ask why the model produced it. The diagnosed cause decides the fix, and output guardrails against hallucination has the full set of controls. Three causes are common:
- Missing grounding. The answer is not tied to the text. Require quotes first and base the analysis only on those quotes, and tell Claude to use only the provided documents, not its general knowledge.
- A forced answer. The prompt leaves no room for "I don't know", so the model fills the gap. Explicitly give Claude permission to admit uncertainty.
- Unsupported claims mixed with supported ones. Add a cite-or-retract pass after drafting.
Take a policy assistant that confidently quotes a vacation-accrual rate that appears nowhere in the uploaded PDFs. The cause is missing grounding plus a forced answer. Telling it to fill gaps from general HR knowledge, or to always give a number, makes the failure worse. Repeating the whole document in every reply adds tokens without tying any claim to a quote.
Checkpoint 2 of 9· Match them up
You've confirmed a hallucination and diagnosed why it happened. Match each diagnosed cause to the fix that targets it.
Tap a term, then the definition that fits it.
Each cause has its own fix. Quoting first and restricting Claude to the documents ties claims to the text. Permission to admit uncertainty removes the pressure to fill gaps. A cite-or-retract pass removes claims with no support. Sending the model to its general knowledge would make each of these worse.
“Minimize hallucinations in Claude's outputs by allowing uncertainty, grounding responses in direct quotes, and verifying claims with citations.”Source: platform.claude.com
Checkpoint 3 of 9· Exam question
A retrieval-augmented HR assistant answers employee questions using uploaded policy PDFs. Reviewers find it confidently states a specific vacation-accrual percentage that does not appear anywhere in the source documents. Which change to the assistant's instructions best addresses the root cause of this failure?
Correct answer: A — Require the assistant to quote exact policy text before answering, admitting uncertainty when none exists.
- A. Correct. Forcing the assistant to ground claims in extracted quotes and explicitly permitting an admission of uncertainty directly targets the mechanism behind the fabrication: the model filled a gap with a plausible-sounding invented figure instead of acknowledging the documents didn't cover it.
- B. Incorrect. Explicitly encouraging the model to fall back on general training knowledge is the opposite of the fix — it legitimizes exactly the behavior that produced the fabricated percentage.
- C. Incorrect. Forcing a numeric answer in every case removes the model's ability to say it doesn't know, making fabrication more likely, not less.
- D. Incorrect. Restating the full document doesn't stop the model from inventing details for questions the document never addresses, and it wastes context on unrelated sections.
3.Prompt failure: Claude did what you said, not what you meant
A prompt failure is easy to recognise: the output follows the instructions, and the result is still unwanted. Nothing was made up and no tool misfired. The model filled a gap the prompt left open, or followed an instruction more literally than its author intended. Treat Claude like a brilliant new employee who lacks context on your norms. A useful test is to show the prompt to a colleague with minimal context on the task and ask them to follow it. If they would get it wrong, so will Claude.
Structure that drifts while the input stays stable is a sign of an underspecified prompt. A hallucination changes facts, not key names. A rate limit causes failed requests, not differently shaped JSON. The fix is to anchor the format: list the exact fields and nesting, and include a sample response. A few well-crafted examples improve accuracy and consistency. Wrapping them in <example> tags keeps them separate from the instructions.
The other common prompt cause is an instruction given without its reason, which the model then applies too widely. "NEVER use ellipses" is followed everywhere. "Your response will be read aloud by a text-to-speech engine, so never use ellipses" tells Claude what the rule protects, and it can generalise from that. When you trace a literal-but-wrong behaviour back to its source, look for the bare instruction that caused it. Then apply specific instructions that give the reason to that line.
A support-desk prompt audited by Anthropic shows how these failures look in practice:
- Contradictions. Line 15 said to confirm before every refund, and line 17 said to process every eligible refund immediately. Another line asked for a complete recap with a three-sentence maximum.
- Literal over-application. "Investigate fully even when the ticket looks simple" forced four tool calls on a simple package-status ticket.
- Cost from stale instructions. "Verify twice" raised the cost per ticket.
The two kinds of stale text cost different things. Instructions the new model follows too literally cost money. Contradictory or outdated text costs accuracy. Removing the contradictory rules restored accuracy.
In the prompt. A mandatory multi-step procedure combined with "investigate fully even when the ticket looks simple" tells the model to over-investigate, and it complies. Rewriting the tools would not change that.
Checkpoint 4 of 9· Check yourself
A team's prompt says "Never give step-by-step instructions." They wrote it so customers would not be walked through account deletion without an agent. Claude now won't list the steps for resetting a password either. Nothing was made up and every tool call is correct. Which change fixes the cause?
The rule was given without its reason, so Claude follows it everywhere. Saying what the rule protects lets Claude apply it only where it belongs. More emphasis makes the over-application worse. A bigger model or quoting first is a fix for a different layer.
“Providing context or motivation behind your instructions, such as explaining to Claude why such behavior is important, can help Claude better understand your goals”Source: platform.claude.com
Checkpoint 5 of 9· Exam question
An internal tool asks Claude to return a JSON object summarizing each support ticket. Across similar tickets, the field names and nesting occasionally change, breaking the downstream parser. Engineers confirm the underlying ticket data is well-formed and consistent. What is the most likely cause, and how should it be fixed?
Correct answer: A — The prompt never specifies a schema, so the fix is a fixed field list and a sample JSON response to anchor the format.
- A. Correct. When output structure varies despite consistent, well-formed inputs, the usual root cause is an underspecified prompt: without a fixed schema and example, the model reasonably varies field names and nesting from call to call, and pinning both resolves it.
- B. Incorrect. The scenario states ticket data is well-formed and consistent, ruling out conflicting source content as the cause of the format drift.
- C. Incorrect. The described symptom is structural format drift in a JSON schema, not fabricated ticket content, so quote-grounding doesn't address it.
- D. Incorrect. Rate limiting produces failed or delayed requests, not successful responses with inconsistent field structure.
4.Tool misuse: reading the symptom back to its cause
Tool failures fall into a few patterns. Agents might call the wrong tools, call the right tools with the wrong parameters, call too few tools, or process tool responses incorrectly. Each pattern points to a specific part of the tool definition, so the symptom tells you where to look.
| Symptom | Likely cause | Fix |
|---|---|---|
| Calls tool A when you wanted tool B | Description ambiguity | Sharpen descriptions; differentiate by when to use each tool |
| Never calls your tool | Tool name collision or overly generic schema | Check for duplicate names; add input_examples |
| Wrong parameter types | Model guessing at an ambiguous schema | Add strict: true (supported subset) or input_examples |
| Parameter that does not exist in the schema | Over-generation without strict mode | Add strict: true |
| Values outside your enum | Missing strict mode or too-large enum | Shrink the enum or add input_examples |
| Refuses to act on a tool result, or asks the user to confirm its instructions | Your instructions are inside the tool_result content | Move instructions to a user turn after the tool_result; keep the result to data |
Most wrong-tool problems come from overlapping tools. When tools overlap in function or have a vague purpose, agents get confused about which one to use. Prefixes that group tools by service, such as asana_search and jira_search, help separate them. Argument errors come from the schema instead: when a schema is ambiguous, the model guesses, and strict: true or concrete input_examples remove the need to guess. The last row of the table is often mistaken for a model fault. Claude is trained to treat instructions inside tool results as potentially untrusted third-party content, so a refusal there means the instructions are in the wrong place.
Checkpoint 6 of 9· Match them up
Each symptom below comes from a live tool-use agent, and none of them is a wrong-tool choice. Match each symptom to the fix that targets its cause.
Tap a term, then the definition that fits it.
Each symptom points to a different part of the tool definition: a name collision or generic schema, missing strict mode, an enum that is too large, or instructions placed inside the tool result. A refusal on a tool result is not a model fault. Claude treats instructions inside tool results as possibly untrusted, so the instructions belong in a user turn.
“Claude is trained to treat instructions inside tool results as potentially untrusted third-party content.”Source: platform.claude.com
5.Model mismatch: when the model is the wrong size for the work
A model mismatch is a failure that rewording the prompt or the tools cannot fix, because the cause is the model's capability compared with the task. It runs in two directions, and they look nothing alike.
An over-provisioned model gets the answers right but is slow and expensive for the work. Think of a high-volume chat widget answering short, templated questions about order status and store hours on a frontier model. Nothing is being made up, and short questions do not overflow a context window. The task simply does not need that much model. For high-volume, straightforward tasks and tight latency budgets, the recommended starting point is the fastest, cheapest tier: Claude Haiku 5.5 suits high-volume and latency-sensitive work with checkable outputs. Make the answer longer or the prompt more detailed and you add cost without fixing the mismatch.
An under-provisioned model misses the quality bar even though the prompt is clear and the tools are well defined. Before you switch tiers, check effort. Several models trade intelligence for latency and cost within a single model, and tuning effort is often a better lever than switching models. If quality is not good enough and you lowered effort earlier, restore it. Otherwise, try the next tier up at its default effort. From cheapest to most capable, the current tiers are Claude Haiku 5.5, Claude Sonnet 5.5, Claude Opus 5.5 and Claude Fable 5.1.
| Benchmark | Model and effort | Score | Cost |
|---|---|---|---|
| SWE-bench Pro subset | Claude Sonnet 5.5, high (default) | 87.6% solved | $0.11 USD per solved task |
| SWE-bench Pro subset | Claude Opus 5.5, medium (default) | 92.8% solved | $0.22 USD per solved task |
| SWE-bench Pro subset | Claude Fable 5.1, high (default) | 92.3% solved (single run) | $1.19 USD per solved task |
| GPQA Diamond | Claude Haiku 5.5, medium (default) | 85% vs 91% for Opus 5.5 and Sonnet 5.5 | About a twentieth of Opus 5.5's cost per correct answer |
The table shows why models should be compared on cost per completed task, not cost per token. On that benchmark subset, Fable 5.1 matched Opus 5.5 within run-to-run noise at about five times the cost per solved task. A suspected mismatch is still a hypothesis until you test it. Build benchmark tests on your own prompts and data, then compare the candidate models on accuracy, response quality and edge-case handling. Run the comparison as a head-to-head eval against your current baseline before switching, using baselines, offline comparisons and live A/B tests.
A mismatch can also come from a model change rather than a capability gap. Prompts written for an older model can fail on a newer one. In the audit above, a budget_tokens setting returned a 400 error on Opus 5, and stale instructions raised costs after the migration. When failures begin right after a model switch, audit the prompts and request code against the new model before you conclude that the model is too weak.
Checkpoint 7 of 9· Check yourself
To cut costs, a team lowered effort on their Claude Sonnet 5.5 contract-review assistant from its default of high to low. The prompt is clear and the tools are well defined, but answer quality now falls short. What should they try first?
Effort is the first lever. Because the team lowered it, restoring it is the first fix. A next-tier model at its default effort comes in only if quality still falls short after that, and a grounding fix like cite-or-retract targets the wrong layer.
“If you lowered effort, restore it; otherwise try the next tier up at its default effort”Source: platform.claude.com
Checkpoint 8 of 9· Check yourself
Thousands of shoppers an hour use a store's chat widget, which runs on Claude Opus 5.5 and answers short, templated questions about order status and opening hours. The answers are correct, but replies are slow and the monthly bill is high. Which diagnosis and next step fit?
The answers are right, so nothing is being invented and the prompt is not at fault. The model is over-provisioned. Work that is high-volume, straightforward and easy to check suits the fastest, cheapest tier, and a head-to-head eval should confirm that before the switch. A longer prompt or a bigger model only adds cost.
“At the other end, Claude Haiku 5.5 suits high-volume and latency-sensitive work with checkable outputs.”Source: platform.claude.com
Checkpoint 9 of 9· Exam question
A team deployed Claude Opus 4.8 behind a high-volume customer-facing chat widget that only answers short, templated questions such as order status and store hours. Users complain about slow replies, and the monthly API bill is far higher than projected. What is the most likely diagnosis?
Correct answer: A — The workload is a model mismatch: a lighter model like Claude Haiku 4.5 would meet the accuracy bar at lower cost.
- A. Correct. Simple, high-volume, templated queries are the textbook case for starting with a fast, cost-effective model; running them on the most capable and most expensive model produces exactly this symptom pattern of high latency and inflated spend for no accuracy benefit.
- B. Incorrect. Nothing in the scenario describes fabricated content — the complaints are about speed and cost, which points to model selection, not factual accuracy.
- C. Incorrect. Short templated queries are nowhere near any model's context limit, so truncation isn't a plausible cause of slow, expensive replies.
- D. Incorrect. Lengthening the system prompt for simple templated answers would increase latency and cost further without addressing the underlying model-size mismatch.
Sources
(7)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Fix the most common tool-use errors with symptom-to-fix diagnostic tables.”
↩︎ Four layers a failure can come from“Add strict: true (if your schema is in the supported subset) or add input_examples.”
↩︎ Tool misuse: reading the symptom back to its cause“Claude is trained to treat instructions inside tool results as potentially untrusted third-party content.”
↩︎ Tool misuse: reading the symptom back to its cause“Differentiate tools by WHEN to use them, not only WHAT they do.”
↩︎ Key concept“Claude calls tool A when you wanted tool B | Description ambiguity | Sharpen descriptions.”
↩︎ Checkpoint“Differentiate tools by WHEN to use them, not only WHAT they do.”
↩︎ Prediction - 2.https://platform.claude.com/docs/en/test-and-evaluate/strengthen-guardrails/reduce-hallucinationsOfficial docs
“can sometimes generate text that is factually incorrect or inconsistent with the given context”
↩︎ Four layers a failure can come from“ask Claude to extract word-for-word quotes first before performing its task”
↩︎ Confirming a suspected hallucination“Inconsistencies across outputs could indicate hallucinations.”
↩︎ Confirming a suspected hallucination“have Claude verify each claim by finding a supporting quote after it generates a response”
↩︎ Confirming a suspected hallucination“review the summarized reasoning in the thinking blocks when an answer looks wrong”
↩︎ Confirming a suspected hallucination“Explicitly give Claude permission to admit uncertainty.”
↩︎ Confirming a suspected hallucination“Explicitly instruct Claude to only use information from provided documents and not its general knowledge.”
↩︎ Exam trap 1“Minimize hallucinations in Claude's outputs by allowing uncertainty, grounding responses in direct quotes, and verifying claims with citations.”
↩︎ Checkpoint - 3.https://support.claude.com/en/articles/8525154-claude-is-providing-incorrect-or-misleading-responses-what-s-going-onOfficial docs
“Claude can display quotes that may look authoritative or sound convincing, but are not grounded in fact.”
↩︎ Confirming a suspected hallucination - 4.https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practicesOfficial docs
“Show your prompt to a colleague with minimal context on the task and ask them to follow it.”
↩︎ Prompt failure: Claude did what you said, not what you meant“A few well-crafted examples (known as few-shot or multishot prompting) improve accuracy and consistency.”
↩︎ Prompt failure: Claude did what you said, not what you meant“Your response will be read aloud by a text-to-speech engine, so never use ellipses”
↩︎ Prompt failure: Claude did what you said, not what you meant“Be specific about the desired output format and constraints.”
↩︎ Exam trap 2“Be specific about the desired output format and constraints.”
↩︎ Prediction“Providing context or motivation behind your instructions, such as explaining to Claude why such behavior is important, can help Claude better understand your goals”
↩︎ Checkpoint - 5.https://platform.claude.com/docs/en/about-claude/models/optimizing-for-cost-and-intelligenceOfficial docs
“Line 15 says confirm before every refund, line 17 says process every eligible refund immediately.”
↩︎ Prompt failure: Claude did what you said, not what you meant“Instructions the new model follows too literally cost money”
↩︎ Prompt failure: Claude did what you said, not what you meant“Text that no longer fits the model costs accuracy instead”
↩︎ Prompt failure: Claude did what you said, not what you meant“Claude Haiku 5.5 suits high-volume and latency-sensitive work with checkable outputs.”
↩︎ Model mismatch: when the model is the wrong size for the work“Compare models on cost per completed task, not per token, because you pay for completed tasks.”
↩︎ Model mismatch: when the model is the wrong size for the work“budget_tokens returns a 400 on Opus 5”
↩︎ Model mismatch: when the model is the wrong size for the work“If you lowered effort, restore it; otherwise try the next tier up at its default effort”
↩︎ Exam trap 3“If you lowered effort, restore it; otherwise try the next tier up at its default effort”
↩︎ Checkpoint“At the other end, Claude Haiku 5.5 suits high-volume and latency-sensitive work with checkable outputs.”
↩︎ Checkpoint - 6.https://www.anthropic.com/engineering/writing-tools-for-agentsSecondary source
“Agents might call the wrong tools, call the right tools with the wrong parameters, call too few tools, or process tool responses incorrectly.”
↩︎ Tool misuse: reading the symptom back to its cause“When tools overlap in function or have a vague purpose, agents can get confused about which ones to use.”
↩︎ Tool misuse: reading the symptom back to its cause - 7.
“Tuning effort is often a better lever than switching models.”
↩︎ Model mismatch: when the model is the wrong size for the work“High-volume, straightforward tasks”
↩︎ Model mismatch: when the model is the wrong size for the work“Create benchmark tests specific to your use case - having a good evaluation set is the most important step in the process.”
↩︎ Model mismatch: when the model is the wrong size for the work“Upgrade only if necessary for specific capability gaps.”
↩︎ Exam trap 4