All terms
Foundations
Hallucination
Also known as: confabulation, fabrication, making things up
When an LLM produces fluent, confident-sounding output that is factually wrong or fabricated — fake citations, invented APIs, made-up case law, plausible-but-false biographies.
What it means
Hallucinations happen because LLMs generate text by predicting plausible next tokens, not by retrieving verified facts. If the training data has a pattern of "court case names look like 'Smith v. Jones, 432 U.S. 234 (1977)'", the model will happily invent court cases that follow that pattern but don't exist. The output is grammatically perfect, structurally plausible, and totally fabricated.
Hallucinations spike in predictable conditions: questions about events past the model's knowledge cutoff (the model doesn't know it doesn't know), niche or low-resource topics with thin training coverage, requests for specific citations or numbers, and any prompt that pushes the model to "complete the pattern" rather than admit ignorance. Reasoning models (GPT-5 Thinking, Claude Opus 4.7 with extended thinking, DeepSeek R1) hallucinate less on tasks they can verify by reasoning through them, but still hallucinate confidently on factual recall.
Mitigations have improved a lot since 2023 but haven't eliminated the problem. Retrieval-augmented generation (RAG) grounds answers in retrieved documents and asks the model to cite them. Tool use (web search, code execution, database queries) lets the model verify before answering. Lower temperature reduces creative drift. Asking the model to flag uncertainty helps. None of this is bulletproof — frontier models still confabulate citations even when given source documents, especially under pressure to produce a complete answer.
The single best mitigation in practice is verification: never trust an LLM's specific factual claims (names, dates, citations, code library APIs, legal references) without checking. Treat the output as a fluent first draft, not as truth.
Example
A lawyer in a 2023 case famously submitted a brief with six fabricated case citations from ChatGPT — full case names, docket numbers, and quoted holdings, none of which existed. This still happens regularly in 2026 with non-RAG models on legal, medical, and academic queries.
Why it matters
Hallucinations are why you can't naively replace humans with LLMs in any role that requires factual accuracy. They're also subtle: an LLM that's right 95% of the time is more dangerous than one that's right 60%, because users stop checking. Knowing when hallucinations are likely is core to using LLMs responsibly.