The short answer
An AI hallucination is when a model states something false or invented as if it were true. You cannot remove it entirely, but you can reduce it a great deal: give the model your own content to answer from, tell it plainly that "I don’t know" is an acceptable answer, ask it to quote or cite its sources, keep tasks narrow, and test against real questions with known answers. Where a wrong answer is costly, add a human check.
Key points
- Ground answers in your own documents instead of the model’s memory.
- Give explicit permission to say "I don’t know".
- Ask for quotes or sources, so answers can be checked.
- Narrow tasks hallucinate less than open-ended ones.
- Measure on real questions, and keep a person in the loop where it matters.
Why models hallucinate
A language model produces the most likely continuation of the text in front of it. When it has the facts, likely and true usually coincide. When it does not, it still produces something fluent, and fluent text sounds confident. The model is not lying. It is doing what it was built to do, without the information it needed.
What reduces it
| Technique | How it helps |
|---|---|
| Retrieval from your content | The model answers from passages you supplied, not from memory |
| Permission to not know | Removes the pressure to produce an answer at any cost |
| Quotes and citations | Each claim points to a passage a person can check |
| Narrow instructions | A tightly defined job leaves less room to invent |
| Structured output | Fixed fields make missing or invented values easier to spot |
| Checking steps | A second pass, or a rule, verifies claims against the source |
Anthropic’s documentation on reducing hallucinations lists several of these, including allowing the model to say it does not know and asking it to support claims with direct quotes. Retrieval itself is covered in RAG vs fine-tuning and What is a vector database?.
Design the product around it
- Show sources next to answers, so users can check them.
- Hand off to a person when the model is unsure, instead of guessing.
- Never let the model invent numbers, prices, dates or policy. Look those up.
- Keep the source content current. Outdated documents produce confident wrong answers.
- Put limits in code for anything the model can act on.
Measure it
- Collect real questions with known correct answers, including some that cannot be answered from your content.
- Run the system on them and read every answer.
- Count wrong answers, and separately count questions it should have declined.
- Change one thing, such as instructions or retrieval, and run again.
- Keep the set, and rerun it whenever the model or content changes.
This is the step teams skip most, and the one that tells you whether anything worked. We test on your real tickets before launch, with a human handoff built in, in AI agent development.
Sources
Checked when this guide was written.