advancedChapter 8 of 12

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