Why models hallucinate
A language model is trained to produce likely text, not to check facts. When it doesn't know something, the most likely-sounding continuation is often a confident, specific answer, because that is what answers in its training data look like. Saying "I'm not sure" is a behavior it has to be taught.
Where it happens most
- Citations, quotes, URLs and paper titles.
- Exact numbers, dates, prices and version details.
- Niche topics and recent events the model saw little or nothing about.
- Long tasks, where one invented detail gets reused in later steps.
How to reduce it
- Ground the answer. Give the model the source documents with RAG and ask it to answer only from them.
- Ask for quotes. Asking the model to quote the passage that supports each claim makes gaps visible.
- Allow "I don't know". Say explicitly that it is fine to answer that the information isn't available.
- Check in code. Validate numbers, dates and links automatically where you can.
- Keep a human on high-stakes output such as legal, medical or financial claims.
Grounding reduces hallucination but doesn't remove it: the model can still misread a source. Treat AI output as a draft that needs checking, not as a reference.