CONCEPT Lower the pressure to always answer
A hallucination is confident text that is factually wrong or unsupported by the context you gave. The root cause is often social pressure baked into the prompt: if the only acceptable-looking output is a complete answer, the model will manufacture one rather than appear unhelpful. The single most effective fix is to explicitly permit uncertainty — tell Claude it is allowed, and expected, to say "I don't know" or "I don't have enough information to confidently assess this."
The other three basic strategies all work by grounding the answer in the source text rather than the model's parametric memory:
| Technique | What you ask Claude to do | Why it reduces hallucination |
|---|---|---|
| Allow "I don't know" | Admit uncertainty instead of guessing | Removes the pressure that forces a fabricated answer |
| Answer only from context | Use only the provided documents, not general knowledge | Cuts off the parametric-memory path where hallucinations originate |
| Extract quotes first | Pull word-for-word quotes before analyzing (esp. docs >20k tokens) | Anchors the response to the actual text |
| Verify with citations | Cite a supporting quote per claim; retract if none exists | Makes each claim auditable and self-checking |
CONCEPT Advanced verification techniques
Beyond the basics, four techniques catch hallucinations that slip through:
- Chain-of-thought verification — ask Claude to reason step-by-step before the final answer, exposing faulty logic or assumptions.
- Best-of-N verification — run the same prompt several times; inconsistent answers across runs signal a hallucination.
- Iterative refinement — feed Claude's output back and ask it to verify or expand earlier statements, catching inconsistencies.
- External-knowledge restriction — instruct Claude to use only the provided documents and not its general knowledge.
DIAGRAM Route the request through a grounding gate
an out?"} P -->|"no — 'you must answer'"| H["🔴 Model invents an answer
(hallucination risk)"] P -->|"yes — 'say I don't know'"| G["Answer only from context"] G --> E{"Supporting quote
found in source?"} E -->|"yes"| A["🟢 Claim, cited to the quote"] E -->|"no"| I["🟠 'I don't know' /
retract the claim"] classDef ok fill:#d4edda,stroke:#28a745,color:#155724; classDef gate fill:#ffe8cc,stroke:#ff9f40,color:#9a4a0a; classDef bad fill:#f8d7da,stroke:#dc3545,color:#721c24; class A ok; class I gate; class H bad;
CODE BAD → GOOD prompt contrast
The bad prompt demands an answer with no escape hatch and no grounding. The good prompt grants permission to be uncertain, restricts Claude to the source, and requires quote-backed claims.
# ❌ BAD — no out, no grounding: invites confident fabrication As our M&A advisor, analyze this report on the acquisition of AcmeCo. <report>{{REPORT}}</report> Give me the financial projections, integration risks, and regulatory hurdles. # ✅ GOOD — permission to be uncertain + answer only from context + quote-first As our M&A advisor, analyze this report on the acquisition of AcmeCo. <report>{{REPORT}}</report> 1. First, extract exact word-for-word quotes from the report that are most relevant to financials, integration risk, and regulatory hurdles. If you cannot find relevant quotes, state "No relevant quotes found." 2. Base your analysis ONLY on the extracted quotes, referencing each by number. Use only the report — do not use outside knowledge. 3. If the report lacks the information, say "I don't have enough information to confidently assess this."
TRADE-OFFS Grounding vs. fluency
✅ Grounded, quote-first prompting
- Auditable — every claim traces to a quote
- Far fewer fabrications on long documents
- "I don't know" is an acceptable, honest output
⚠️ Costs you pay
- Longer outputs and more tokens (quotes + analysis)
- More reserved, less fluent-sounding answers
- Extra latency from CoT / best-of-N verification
EXAM TRAPS
PRACTICE
Q1 · A summarizer keeps inventing statistics not in the source. What is the first, cheapest fix?
Add an explicit out and a grounding restriction: tell Claude to use only the provided document and to say "I don't have enough information" when the source doesn't cover something. Granting permission to admit uncertainty is the single most effective, lowest-cost technique.
Q2 · Why ask Claude to extract quotes before analyzing a 50-page contract?
Quote-first grounds the analysis in the actual text rather than the model's memory, which is where hallucinations originate. Referencing each claim back to a numbered quote also makes the output auditable and lets Claude retract claims it can't support.
Q3 · You run the same factual prompt 5 times and get 3 different answers. What does that tell you, and what is the technique called?
The inconsistency across runs is a strong signal of hallucination — the model is guessing, not retrieving. This is best-of-N verification: comparing multiple outputs of the same prompt to surface unreliable claims.