AI Explainedby Milad Fahmy

AI Explained

AI hallucinations: why models make things up

Why does AI sometimes state false things with total confidence? What hallucinations are, why training rewards guessing, and practical ways to cut them down.

Milad FahmyOct 29, 20262 min read

On this page
  1. What a hallucination is
  2. Why it happens
  3. How to cut them down
  4. For developers

Ask an AI model for a source and it may hand you a perfect-looking citation for a paper that doesn't exist. It sounds sure. It's wrong. That's a hallucination.

What a hallucination is

OpenAI defines hallucinations as "plausible but false statements generated by language models". Common forms:

  • a made-up fact, date or number,
  • a fake quote or citation,
  • a function or API option that doesn't exist,
  • a confident summary of a document that says something else.

The dangerous part is the tone. A hallucination reads exactly like a correct answer.

Why it happens

Language models are trained to predict likely text, and then tuned and tested on how often they're right. OpenAI's 2025 research points to the incentive: "standard training and evaluation procedures reward guessing over acknowledging uncertainty."

Think of a multiple-choice exam. A guess might score a point. "I don't know" scores zero. A model graded that way learns to guess, and a guess, stated fluently, is a hallucination.

How to cut them down

You can't remove hallucinations completely, but you can make them much rarer. Anthropic's guidance lists several techniques:

  1. Allow "I don't know". Tell the model explicitly that admitting uncertainty is fine. Anthropic says this alone "can drastically reduce false information".
  2. Ground it in your documents. Give the model the source material (that's what RAG does) and tell it to answer only from what's provided.
  3. Ask for direct quotes. For long documents, have the model pull the exact quotes first, then answer from them.
  4. Require citations, and retract without them. If the model can't find a supporting quote for a claim, it must drop the claim.
  5. Check the important stuff. For anything that matters, verify against the source, or have a second pass review the answer.

For developers

  • Lower the stakes: show sources next to answers so users can check.
  • For code, run it. Tests catch invented APIs fast.
  • Measure it: keep a set of questions with known answers and track how often the model gets them wrong.

Trust, but verify.

Sources

#hallucinations#llm#grounding#citations#ai reliability

Watch