A hallucination is when an AI model produces something that sounds entirely plausible and is actually false. The output is fluent, confident, and not grounded in anything real.
It happens because the model completes patterns rather than looking things up. When it has no good answer, the most statistically likely continuation is still a well-formed sentence. It just is not a true one.
Think of it like this. Think of a student who did not study but writes beautifully. Faced with a question they cannot answer, they produce something that reads exactly like a correct answer. The confidence is real. The content is not.
Why it happens
- There is no fact database inside the model. It generates from learned probabilities, not from stored records.
- Training data has gaps and contradictions. Where knowledge is thin, the model fills in with what sounds likely.
- Fluency is the objective, not truth. The model was trained to produce plausible text, and it succeeds even when the content is wrong.
- Unusual questions are worse. The further your question sits from what the model saw in training, the more it improvises.
How to fix it
- Ground it in real documents. Retrieval augmented generation supplies actual sources at request time, so the model quotes rather than invents.
- Ask for citations. Then check them. Fabricated references are one of the most common forms.
- Let it say it does not know. Prompts that explicitly permit "I am not sure" reduce invented answers.
- Verify anything that matters. Names, numbers, dates, legal and medical claims, and API methods are the usual casualties.
Common mistakes
- "The model is lying." Lying requires knowing the truth. This is pattern completion that landed on something false.
- "Better models do not hallucinate." Every model can, including frontier ones, particularly on questions outside their training.
- "More training data solves it." Grounding and verification help far more than raw volume.
- "It is always a problem." In fiction or brainstorming, plausible invention is exactly what you asked for.