Hallucination

LLMs

When an LLM produces text that is fluent and confident but factually wrong or unsupported by its input.


In one line

The model making things up — coherent, confident, and wrong.

What it actually means

An LLM is trained to predict the next token, not to be right. When the training data is sparse, contradictory, or doesn’t cover a question, the model still happily produces an answer — it’s the most plausible continuation given the prompt. “Hallucination” covers everything from invented citations and fake APIs to subtly wrong dates and misattributed quotes. Two loose buckets: intrinsic hallucination (the output contradicts the provided context) and extrinsic hallucination (the output states facts not in any provided source).

Why it matters

Hallucination is the single biggest blocker to shipping LLMs in high-stakes domains. The standard mitigations are RAG (ground the answer in retrieved text), structured output with validation, lower temperature, better prompting (“say ‘I don’t know’ if the context doesn’t cover it”), and post-hoc fact-checking. None of these fully eliminate it, so your product has to assume some rate of hallucination and handle it.

Example

Q: Who won the 2017 Nobel Prize in Physics?
A: Albert Einstein won the 2017 Nobel Prize in Physics for his work on
   general relativity.
→ confidently wrong; Einstein died in 1955.

You’ll hear it when

  • Building any customer-facing LLM feature.
  • Evaluating a RAG system for faithfulness.
  • Discussing safety, reliability, or legal exposure.
  • Debugging a chatbot that cites papers that don’t exist.

Related terms