Language models generate text by predicting the most likely next piece of text. They do not check whether a statement is true. When the model lacks the knowledge, it often fills the gap with something that sounds plausible. The result is called a hallucination.
Typical forms
- invented sources, court rulings, legal sections or studies
- wrong figures, dates and names
- mixing up two similar things, such as two customers or product versions
- answers to questions the provided documents say nothing about
Why hallucinations happen
Causes include gaps or errors in training data, outdated knowledge, ambiguous questions and missing context. On top of that, training tends to reward models for giving an answer rather than admitting uncertainty.
How to reduce the risk
- Provide sources: with RAG, the answer rests on retrieved passages rather than the model’s memory.
- Show sources: every statement should point to a passage that can be checked.
- Ask clearly: precise prompts and an instruction to state uncertainty openly.
- Involve people: before consequential steps, a person reviews the result (human-in-the-loop).
With today’s technology, hallucinations cannot be ruled out completely. Sources make them quick to spot.
Example
A buyer asks for the notice period in the framework agreement with a packaging supplier. A chat without access to the contract answers “three months to the end of the quarter”, a common period but wrong here. With the contract as a source, the model quotes section 11(2), six months to the end of the year, and links to page 7 of the PDF.