To make an AI chatbot hallucinate less, change what the prompt allows it to do. Anthropic’s documentation lists three basic techniques: give the model explicit permission to say it does not know, make it extract word-for-word quotes before answering from a long document, and make it find a supporting quote for every claim and retract any it cannot support. Anthropic adds that these reduce hallucinations significantly but do not eliminate them, so check important facts yourself.

On this page

The five techniques

Anthropic’s Reduce hallucinations page groups them as three basic strategies and several advanced ones. We turned each into a copyable template below. The templates are our wording, adapted from Anthropic’s examples. We have not tested them against other chatbots, and Anthropic documents them for Claude.

1. Give the model a way out

Anthropic’s first strategy is to explicitly allow the model to admit uncertainty, which it says can drastically reduce false information. Its example tells the model what to say when it is unsure or the document lacks the information.

Answer the question below. If you are not sure, or the information
you need is missing, say "I don't have enough information to answer
this confidently" instead of guessing.

Question: [your question]

Anthropic’s separate prompting article makes the same point: giving the model explicit permission to express uncertainty rather than guessing reduces hallucinations and makes the answer more trustworthy.

2. Ask for quotes first

For tasks on long documents, Anthropic says to ask the model to extract word-for-word quotes first and only then do the task. It specifies documents over 20,000 tokens. Grounding the analysis in quotes keeps it tied to the text.

<document>
[paste the document]
</document>

1. Extract the exact quotes from the document that are most relevant
   to [your question]. If you cannot find relevant quotes, write
   "No relevant quotes found."
2. Answer using only those quotes, referring to them by number.

Anthropic’s best-practices page gives the same advice for long inputs and also says to put long documents at the top of the prompt, above your question. Our guide to a long-context prompt for Claude shows that layout.

3. Cite every claim, then retract what lacks support

Anthropic’s third strategy makes the answer auditable. After the draft, the model reviews each claim and looks for a direct quote that supports it. If it cannot find one, it must remove the claim.

Draft [the thing you need] using only the documents above.

Then review each claim in your draft. For each one, find a direct
quote from the documents that supports it. If you cannot find a
supporting quote, remove the claim and mark where it was removed
with [].

The empty brackets matter: they show you where the model dropped something, so you can look for the source yourself.

4. Restrict the model to your material

Among its advanced techniques, Anthropic lists external knowledge restriction: instruct the model to use only the information in the documents you provide, not its general knowledge. Add one sentence to the prompt, such as “Use only the documents above; do not use outside knowledge.” Pair it with technique 1 so the model has somewhere to go when the documents do not answer the question.

5. Compare and iterate

Anthropic’s other advanced techniques check the answer after it is written:

  • Best-of-N verification. Run the same prompt several times and compare. Inconsistencies across the outputs can indicate hallucinations.
  • Iterative refinement. Feed the output back with a follow-up asking the model to verify or expand on its earlier statements, which can catch inconsistencies. Our prompt chaining examples show how to split that into steps.
  • Chain-of-thought verification. For developers using Claude’s API, Anthropic suggests reviewing the model’s summarized reasoning when an answer looks wrong. See chain of thought prompting for the manual version.

What these techniques do not do

Anthropic’s page closes with a warning: the techniques significantly reduce hallucinations but do not eliminate them, and critical information, especially for high-stakes decisions, should still be validated. A quote can also be wrong or taken out of context, so for anything that matters, open the source and read the passage.