What is AI hallucination?
AI hallucination is a language model producing information that is absent from its source or context, contradicts that source or is simply false, in a fluent and confident way.
It is also called confabulation. It differs from faithfulness, a metric of how well an answer matches its source: hallucination is the output where that match breaks or no source exists at all. The model is not lying on purpose; this is a failure of probabilistic generation.
- Topic
- Evaluation and quality
- Also known as
- Confabulation, AI hallucination
How AI hallucination works
- The model produces a token sequence from learned probabilities; that process includes no fact check of its own.
- Gaps in training data, the knowledge cutoff, vague prompts and a high sampling temperature raise the likelihood.
- In a RAG setup, if retrieval returns the wrong or an incomplete passage, the model may fill the gap with invented detail.
- Research separates intrinsic hallucination, which contradicts the source, from extrinsic hallucination, which the source cannot verify.
In more detail
Agent and tool call hallucinations
Unlike hallucination in plain text generation, agentic and tool-calling workflows introduce action hallucinations: a model may invoke a non-existent tool, fabricate API parameters or misreport tool execution results. In enterprise environments, strict schema validation (constrained or structured decoding) and deterministic post-call state checks help prevent malformed or invented tool arguments.
Calibration and abstention
Modern deployments distinguish factual hallucination from uncalibrated confidence and failure to abstain. Calibration techniques, such as selective prediction, confidence-thresholded abstention and explicit 'I do not know' refusal tuning, enable the system to withhold answers when retrieval relevance or model certainty falls below a defined threshold.
Statistical inevitability and NIST's use of confabulation
Kalai and Vempala (2024) show that a calibrated language model must hallucinate at some rate on the kind of facts that appear only once in its training data unless it can check them externally. NIST AI 600-1 likewise uses the term 'confabulation' and treats it as a lasting risk to manage at system level rather than a single model bug.
Multimodal hallucinations
In multimodal models (vision-language and audio-language systems), hallucination also manifests as object, OCR or transcription fabrication, such as describing items absent from an image or misreading scanned tables. On-premise document pipelines should pair vision-language models with deterministic OCR cross-checks for critical fields like invoice totals or dosage numbers.
Commonly confused terms
| Term | How it differs |
|---|---|
| Sycophancy | Sycophancy is the model tailoring its answer to agree with a user's false premise or preference at the expense of truth; hallucination is generating ungrounded or false information even without user nudging. |
| Prompt injection | Prompt injection is an adversarial attack that hijacks the model's instruction flow; hallucination is an intrinsic probabilistic generation failure without an attacker intentionally steering instructions. |
Why AI hallucination matters for on-premises AI
In regulated sectors a wrong answer creates risk in decisions, compliance or customer communication. In-house Retrieval-Augmented Generation grounds answers in current internal documents (grounding); each claim cites its source and those records are kept for audit. The system is designed to say when the documents hold no answer instead of inventing one. Before go-live, faithfulness and hallucination detection scores on an evaluation dataset serve as acceptance criteria; human review stays in place for critical decisions.
A pharmaceutical company links every claim in a model-drafted regulatory dossier to a source passage; statements that cannot be linked go to expert review.
Common questions
How is hallucination reduced?
Grounding answers in verified documents through RAG, telling the model to decline questions outside them, a low temperature, automatic source checks and human oversight reduce the risk a great deal, though not to zero.
Does setting the temperature to zero prevent hallucination?
No. Zero temperature makes output more consistent, but if the model's most likely answer is wrong it repeats the same error every time.
Related terms
- Hallucination detection
- Grounding
- Faithfulness
- Retrieval-Augmented Generation
- Citation
- Factuality
- Package hallucination
- Knowledge cutoff
Sources
- Ji et al., Survey of Hallucination in Natural Language Generation, 2022
- Huang et al., A Survey on Hallucination in Large Language Models, 2023
- NIST AI 600-1, Artificial Intelligence Risk Management Framework: Generative Artificial Intelligence Profile, 2024
Related page on this site: Related FAQ · In the glossary: Glossary, E to L