AI Hallucination Best Practices: Keep Model Answers Grounded
An AI hallucination is when a model states something false as if it were fact. Grounding, citations, testing and human checks cut the rate of wrong answers.
On this page
Short answer
An AI hallucination is when a language model produces an answer that sounds confident but is false: an invented fact, a wrong date, a citation to a document that does not exist. Hallucinations happen because models predict likely text, not verified truth. These best practices reduce them by grounding answers in real sources, testing on fixed questions, and checking answers where errors cost the most.
What is an AI hallucination?
An AI hallucination is an answer that sounds right but is wrong: a made-up fact, a wrong number, a policy that does not exist, or a reference to a document nobody can find. The danger is the tone. A hallucination reads exactly like a correct answer, so nobody spots it without checking.
Hallucinations happen because a language model predicts the next words that fit the pattern, not the words that are true. When the model has no source to draw on, it fills the gap with plausible text. The fix is not to ask the model to try harder. The fix is to give it sources to work from and to check what it produces.
| Task | Hallucination risk | Why |
|---|---|---|
| Short answer from a named document | Low | Source is given and checked |
| Summary of a supplied text | Low | Content comes from the text |
| Exact facts from memory | High | No source to check against |
| Long answer with many details | High | Each detail is a chance to invent |
| Open question with no source | High | Model fills the gap with guesses |
Some tasks invite hallucinations more than others. Open questions with no source, requests for exact facts from memory, and long answers with many details are the riskiest. Short answers tied to a named document are the safest.
Ground answers in your own sources
The strongest defence against hallucinations is grounding: the model answers only from documents you give it, not from memory. Connect the model to your own knowledge base, so each answer is built from retrieved passages rather than from what the model happens to know.
Grounding only works if the sources are good. Keep the knowledge base current, remove out-of-date documents, and make sure the retrieval step finds the right passages. A model grounded in stale documents will give stale answers with the same confidence as fresh ones.
Tell the model what to do when the sources do not contain the answer. The instruction should be simple: say it does not know, and point the user to a person who can help. A model that admits a gap is far safer than one that invents a filler answer. For the retrieval angle, see RAG best practices.
Ask the model to show its sources
Ask the model to cite the source for each claim it makes, so a reader can check the answer without trusting the model. Citations turn a smooth paragraph into something a person can verify in seconds, and they expose answers that have no source behind them.
Check the citations, not just the answer. A model can cite a real document for a claim the document does not support, or cite a document that does not exist. A simple check is to open the cited passage and read it. If the claim is not there, the answer is wrong, however well written it is.
Keep answers short where the facts matter. A short answer with one or two cited claims is easier to verify than a long answer with ten claims. When an answer must be long, break it into sections, each tied to its own source.
Test answers against a fixed set of questions
Build a fixed test set of questions with known right answers, drawn from real user questions, and run the model on that set before every release. Record how many answers are right, how many are wrong, and how many the model refuses. A test set turns a feeling about quality into a number the team can track.
Include the hard questions in the test set, not just the easy ones: questions with no answer in the sources, questions about edge cases, and questions that look like another question but mean something different. Those are the cases where hallucinations appear most.
Run the same test set after every change: a new model, new documents, new instructions. If the score falls, the change made things worse, whatever the vendor promised. Keep the results in a simple log so the team can see the trend over time.
Set the model's settings for accuracy
Use the model's settings to favour accuracy over variety. A low temperature setting makes the model pick the most likely words, which gives steadier, more predictable answers. A high setting makes answers more varied, which is useful for drafting ideas but risky when the facts must be right.
Keep answers short by default. Ask for a direct answer first, then the detail, so a wrong detail does not hide inside a long paragraph. Where the task allows it, ask the model to answer in a fixed format, such as a short list or a table, which makes errors easier to spot.
Do not rely on settings alone. Settings reduce the rate of hallucinations, but they do not remove them. A model with careful settings and no sources will still invent facts when it has nothing to draw on.
Add a human check where errors cost most
Put a human check on the answers where an error would cost the most: anything that reaches a customer, changes a record, or affects money or safety. A person reviews the answer before it is sent, and the review step is part of the workflow, not an afterthought.
Make the check easy, or it will be skipped. Show the reviewer the answer next to its sources, highlight the claims that matter, and let the reviewer approve, edit or reject in one step. A review screen that takes a minute per answer will be used; one that takes ten minutes will not.
Sample-check the rest. For low-stakes answers, review a random sample each week and track the error rate. If the sample error rate rises, widen the human check until it falls again. For the checking layer, see AI guardrails tools.
Example (hypothetical): a support team cuts wrong answers
Example (hypothetical): a support team uses an assistant to draft replies, and finds that 1 in 5 drafts contains a wrong policy detail. The team grounds the assistant in the current help centre, removes 40 out-of-date articles, and adds an instruction: if the answer is not in the help centre, say so.
The team builds a test set of 100 real questions with known answers. Before the fix, the assistant answers 80 of them correctly. After grounding and the new instruction, it answers 93 correctly and refuses 4, leaving 3 wrong answers. The wrong-answer rate falls from 20 in 100 to 3 in 100.
The team adds a human check for replies about refunds and account changes, and samples 20 other replies each week. The error rate stays low, and the team can show the numbers to the support lead each month.
What are the common mistakes?
The most common hallucination mistakes are trusting a confident tone, skipping the test set, and treating the model as a source of facts.
- Trusting the tone. A hallucination reads like a correct answer. Check the claims, not the confidence.
- No sources. A model with no documents to draw on will invent facts to fill the gap. Ground every factual answer.
- No test set. Without fixed questions and known answers, nobody knows whether the system is improving or getting worse.
- Long answers for facts. Long answers hide wrong details. Keep factual answers short and cited.
- Skipping the human check. High-stakes answers need a reviewer. A model alone is not a safe way to send facts to customers.
- Ignoring refusals. A model that refuses when it should answer is a broken feature, not a safe one. Track refusals and fix the gaps in the sources.
Key takeaways
- A hallucination is a confident-sounding answer that is false
- Ground answers in your own documents, and tell the model to say it does not know when the answer is not there
- Ask for citations, and check the cited passage actually supports the claim
- Test on a fixed set of real questions before every release, and track the score
- Put a human check on high-stakes answers, and sample-check the rest
Frequently asked questions
What causes an AI hallucination?
An AI hallucination happens because a language model predicts likely text rather than verified truth. When it has no source to draw on, it fills the gap with plausible wording. Grounding the model in real documents is the main fix.
Can hallucinations be stopped completely?
No. Grounding, citations, testing and human checks cut the rate sharply, but no current method removes hallucinations entirely. That is why high-stakes answers still need a person to review them before they are sent.
What is grounding in AI?
Grounding means the model answers only from documents you give it, such as a knowledge base or help centre, instead of from memory. Each answer is built from retrieved passages, so a reader can check it against the source.
How do you test for hallucinations?
Build a fixed test set of real questions with known right answers, including hard cases with no answer in the sources. Run the model on that set before every release and record how many answers are right, wrong or refused.
Should the model ever say it does not know?
Yes. An instruction to say it does not know when the sources lack the answer is one of the best defences. A model that admits a gap is far safer than one that invents a filler answer.
Do lower model settings stop hallucinations?
Lower settings make answers steadier and more predictable, which helps, but they do not remove hallucinations. A model with careful settings and no sources will still invent facts when it has nothing to draw on.