Avoiding Hallucinations
Giving Claude an out · Citation-based answers · Evidence gathering · Scratchpad technique
Why Claude Hallucinates
Claude wants to be helpful. When asked a question with a false premise or insufficient information, it may fabricate a plausible-sounding answer rather than admitting uncertainty. This is called hallucination.
Strategy 1: Give Claude an Out
Explicitly give Claude permission to say "I don't know" or "That's not correct":
Answer the question below. If the question contains a false premise,
point that out instead of answering. If you don't have enough
information to answer confidently, say so.
Strategy 2: Quote First, Then Answer
For document-based questions, ask Claude to extract relevant quotes before answering. This is the scratchpad technique:
Read the document below. In <quotes> tags, extract any passages
relevant to the question. Then, in <answer> tags, answer based
only on those quotes. If the quotes don't contain the answer,
say "Not found in the document."
Key Takeaways
- Always give Claude an out for questions with false premises or missing info.
- For document QA, make Claude quote evidence first, then reason from quotes.
- The scratchpad technique (quote → reason → answer) dramatically reduces hallucination.
Exercises
Correcting a False Premise
Fix a hallucination issue by giving Claude an out. The question claims Renaissance is Beyoncé's eighth studio album — but it's actually her seventh.
Citation-Based Answers
Use the scratchpad technique to make Claude extract quotes from a document before answering, reducing hallucination risk.
Detecting Unanswerable Questions
Write a prompt that correctly identifies when a specific piece of information is not available in the provided document.