Skip to main content

Hallucination

When an AI model makes up false information confidently.

Confident nonsense is the core bug of next-word prediction.

The fundamental problem

A language model predicts the next word based on patterns. Give it "The capital of France is" and the model predicts "Paris." That happens to be true.

Give it "The capital of Somalia is" and the model predicts from statistical patterns. There is no fact database inside. If Somalia appears often near "Mogadishu" and "capital" in the training data, the model goes with that. But when it predicts something false, it still sounds confident. That is a hallucination.

Pick a prompt for the model to finish

What the model predicts after "The capital of France is"

  • Paris96%
  • Lyon2%
  • Marseille1%
  • located1%

This is the whole scoreboard the model works from. Every candidate has a likelihood score and nothing else.

Common hallucinations

One kind is a fake citation, like "A study by X shows Y" when no such study exists. Another is a fake quote, like "Einstein said Z" when he did not. A third is a confident wrong fact, like naming "The Earth's capital city" when there is no such thing. Models also invent code that does not work.

How to reduce them

Ask for sources, and ask the model to cite the training data it is using. Use web search for current facts, and feed it documents it can reference. You can also ask it to admit uncertainty.

For critical work in medicine, law, or finance, verify the outputs independently. Models are not authoritative sources.