Definition
What is Hallucination?
Hallucination is an AI hallucination is an output that sounds fluent and confident but is false or made up, such as an invented fact, quote, source or piece of code that does not exist.
A hallucination is what happens when an AI model states something untrue as if it were fact. The sentence is grammatical, the tone is sure, and the content is wrong: a citation to a paper that does not exist, a function a software library never had, a date that is off by a decade.
Why models hallucinate
A language model is trained to predict plausible next tokens. It is not looking facts up in a database. When it has seen a pattern many times, plausible and true usually line up. When it has not, the most plausible-sounding continuation can still be false, and the model has no built-in alarm that says "I'm guessing."
Several things make it worse:
- Gaps in training data. Rare topics, recent events and private information are thin or missing.
- Pressure to answer. Models are often rewarded for giving an answer rather than admitting they do not know.
- Long or messy prompts. Details can be lost or mixed together as a conversation grows. See context window.
- Poor confidence signals. A model's stated confidence does not always match how often it is right. That match is called model calibration.
Think of a confident colleague who would rather make something up than say "I don't know."
How it is reduced
Nothing removes hallucination entirely, but it can be cut down:
- Grounding. Give the model the source text, or let it search, and ask it to answer only from that material.
- Citations you can check. Require links or quotes, then open them.
- Better training. Post-training and reinforcement learning can teach a model to decline when unsure.
- Reasoning. A reasoning model that checks its own work can catch some errors, though not all.
- Outside checks. Tests for code, validation for data and human review for anything important. These are a kind of guardrail.
What it means for you
Treat an AI's answer as a draft from a fast, well-read assistant who sometimes bluffs. The risk is highest for specifics: names, numbers, legal and medical details, quotes and links. Verify those against a primary source before you rely on them or publish them.
A simple habit helps. Ask the model what it based an answer on, then check that basis yourself. If it cannot point to one, the answer deserves less trust.
Hallucination is not the same as a deliberate lie, and it is not the same as bias. The model has no intent. It is producing likely text, and some likely text is wrong.
Questions people ask
Why do AI models make things up?
They predict plausible text rather than look up facts, so when their training data is thin they can produce fluent answers that are false, with no internal warning.
How do I stop an AI from hallucinating?
You can't fully, but you can reduce it by giving the model source material to answer from, asking for checkable citations, and verifying names, numbers and quotes yourself.