Development · Term

Hallucination

A hallucination is output from an AI model that is fluent and plausible but factually wrong — an invented citation, statistic, function, or quotation presented with the same confidence as correct information.

Hallucination is not a bug to be patched but a property of how generative models work: they produce statistically likely continuations, and likelihood is not truth. The practical danger is that a wrong answer looks exactly like a right one, so nothing in the writing itself signals which you are reading.

The mitigation is procedural rather than technical. Check every consequential claim against a primary source, open citations to confirm they support the statement beside them, and never let a model be the only reviewer of its own output.

How it works

A language model writes one token at a time, each chosen because it is likely given everything before it. When the model has strong evidence, the likely continuation is usually correct. When it has little, such as an obscure fact, a precise number or a citation it never saw, the likely continuation is still fluent, and fluent is all the model is optimising for. The result reads exactly like knowledge.

Retrieval reduces the problem by putting real sources in front of the model, but a model can still misread, over-generalise or attribute a claim to the wrong source.

Example

Asked for sources on a niche topic, a model may return a correctly formatted academic reference with real-sounding authors, a plausible journal and a page range, for a paper that does not exist. Nothing in the formatting distinguishes it from a genuine citation until you look it up.

Common mistakes

  • Asking the same model to check its own answer and treating agreement as verification.
  • Trusting numbers, dates and quotations because the surrounding prose is correct.
  • Publishing AI-drafted content without a named person responsible for its facts.

Read: What are large language models? →

Related terms

Have something worth building right?