---
title: "What is AI hallucination? Causes, examples, and fixes"
description: "An AI hallucination is fluent but false or unsupported output from a language model. Why LLMs hallucinate, real examples, and how teams reduce the rate."
type: "glossary-term"
canonical_url: "https://theaiengineering.com/glossary/hallucination"
markdown_url: "https://theaiengineering.com/glossary/hallucination.md"
topic: "LLM evaluation and observability"
author: "The AI Engineering Editors"
publisher: "The AI Engineering"
updated: "2026-11-06"
keywords: ["Hallucination","AI hallucination","LLM hallucination","confabulation"]
citation: "The AI Engineering Editors. \"What is AI hallucination? Causes, examples, and fixes.\" The AI Engineering, updated Nov 06, 2026. https://theaiengineering.com/glossary/hallucination"
---

# What is AI hallucination? Causes, examples, and fixes

Also called AI hallucination, LLM hallucination, confabulation.

> **Definition of Hallucination:** A hallucination is output from a language model that is fluent and plausible but factually false, unsupported by the provided sources, or invented outright, such as a fabricated citation or package name.

A hallucination is a confident, well-formed statement from a [large language model](https://theaiengineering.com/glossary/large-language-model) that is false or not supported by its input. A [survey by Ji et al.](https://arxiv.org/abs/2202.03629) splits hallucinations into two kinds: intrinsic hallucinations contradict the source material the model was given, and extrinsic hallucinations add claims the source can neither confirm nor refute. The term covers invented facts, fake citations, nonexistent functions in generated code, and wrong figures in summaries.

## Why LLMs hallucinate

An LLM generates text by predicting likely next tokens; it does not look facts up. When training data carries little signal about a fact, such as an obscure person's birthday or a rarely used API, the model still produces a plausible continuation. A 2025 OpenAI paper, [Why Language Models Hallucinate](https://arxiv.org/abs/2509.04664), argues that training and evaluation reinforce the habit: most benchmarks grade answers as right or wrong, so guessing scores better than admitting uncertainty. The authors propose changing how mainstream benchmarks are scored so that expressing uncertainty is not penalized.

Other causes sit in the application. Retrieval can return the wrong documents, a long [context window](https://theaiengineering.com/glossary/context-window) can bury the relevant passage, and a higher [temperature](https://theaiengineering.com/glossary/temperature) setting makes low-probability tokens more likely to be sampled.

## Examples of AI hallucination

- **Fabricated legal citations.** In Mata v. Avianca (S.D.N.Y. 2023), a federal judge sanctioned lawyers who filed a brief citing court decisions that ChatGPT had invented.
- **Invented packages.** A [2024 study of code-generating models](https://arxiv.org/abs/2406.10279) found that at least 5.2% of package references from commercial models and 21.7% from open-source models pointed to packages that do not exist, a gap attackers can exploit by registering those names.
- **Unfaithful summaries.** A summary states a number or conclusion that the source document does not contain.

## Why hallucination matters

Hallucinations are hard to catch because they look identical to correct output. OWASP lists misinformation as [LLM09:2025](https://genai.owasp.org/llmrisk/llm092025-misinformation/) and names hallucination as a major cause.

Teams reduce the rate by grounding answers in retrieved sources with [retrieval-augmented generation](https://theaiengineering.com/glossary/retrieval-augmented-generation), requiring citations, allowing the model to answer "I don't know," and measuring faithfulness with [LLM evaluation](https://theaiengineering.com/glossary/llm-evaluation) suites and [LLM-as-a-judge](https://theaiengineering.com/glossary/llm-as-a-judge) graders. None of these methods drives the rate to zero, so high-stakes outputs still need verification against a source of truth.

## Related terms

- [Retrieval-augmented generation (RAG)](https://theaiengineering.com/glossary/retrieval-augmented-generation): Retrieval-augmented generation (RAG) is a technique that retrieves relevant passages from an external knowledge source at query time and adds them to a language model's prompt so the answer is grounded in that data.
- [LLM evaluation](https://theaiengineering.com/glossary/llm-evaluation): LLM evaluation is the practice of measuring how well a language model or LLM-based application performs on defined tasks, using test datasets, automated graders, model-based judges, and human review.
- [LLM-as-a-judge](https://theaiengineering.com/glossary/llm-as-a-judge): LLM-as-a-judge is an evaluation method in which a language model scores or compares the outputs of an LLM application against a rubric, a reference answer, or another response, replacing or supplementing human graders.
- [Guardrails](https://theaiengineering.com/glossary/guardrails): Guardrails are programmatic checks placed around a large language model that validate, filter, or block inputs, outputs, and tool calls so an AI application stays within its safety, security, and policy limits.
- [Large language model (LLM)](https://theaiengineering.com/glossary/large-language-model): A large language model (LLM) is a neural network, usually a transformer with billions of parameters, trained on web-scale text to predict the next token and then adapted to follow instructions.
- [Faithfulness](https://theaiengineering.com/glossary/faithfulness): Faithfulness is an evaluation metric that measures what share of the claims in a generated answer can be inferred from the context the model was given, usually scored from 0 to 1.

## Guides that cover hallucination

- [What is retrieval-augmented generation (RAG)? How RAG works](https://theaiengineering.com/articles/what-is-rag): Retrieval-augmented generation (RAG) grounds LLM answers in your documents. Learn the RAG pipeline, hybrid search, agentic RAG, evaluation, and failure modes.
- [LLM evaluation: a practical guide to evals, metrics, and judges](https://theaiengineering.com/articles/llm-evaluation): LLM evaluation for engineers: build eval datasets, pick metrics, calibrate LLM-as-a-judge, evaluate RAG and agents, and gate every release in CI.
- [AI agent evaluation: metrics, graders, and how to test agents](https://theaiengineering.com/articles/ai-agent-evaluation): AI agent evaluation guide: measure task success, tool use, safety, cost, and pass^k reliability with code graders, LLM judges, eval sets from traces, and CI.
- [Reasoning models: how they work and when to use them](https://theaiengineering.com/articles/reasoning-models): Reasoning models explained: how test-time compute and reinforcement learning produce chain-of-thought reasoning, when to use them, and their cost and latency.
- [LLM benchmarks explained: what they measure and how to read them](https://theaiengineering.com/articles/llm-benchmarks): LLM benchmarks explained: what MMLU-Pro, GPQA, SWE-bench, LiveCodeBench, ARC-AGI, and LMArena measure, why scores saturate, and how to read a leaderboard.
- [RAG vs fine-tuning: how to choose for your LLM application](https://theaiengineering.com/articles/rag-vs-fine-tuning): RAG vs fine-tuning: RAG adds knowledge at query time, while fine-tuning changes model behavior. Compare freshness, cost, latency, data needs, LoRA, and hybrids.
- [What is AI engineering? The discipline, the stack, and the work](https://theaiengineering.com/articles/what-is-ai-engineering): What is AI engineering? A plain definition, how it differs from ML and software engineering, the layers of the stack, and what AI engineers do day to day.

Part of the [LLM evaluation and observability](https://theaiengineering.com/topics/llm-evaluation) topic hub.

## Cite this definition

The AI Engineering Editors. "What is AI hallucination? Causes, examples, and fixes." The AI Engineering, updated Nov 06, 2026. https://theaiengineering.com/glossary/hallucination

- Title: What is AI hallucination? Causes, examples, and fixes
- Author: The AI Engineering Editors
- Publisher: The AI Engineering
- Updated: 2026-11-06
- URL: https://theaiengineering.com/glossary/hallucination
- Markdown: https://theaiengineering.com/glossary/hallucination.md
