Hallucination

Hallucination is when an AI language model generates plausible-sounding but factually incorrect or entirely fabricated information. The model 'hallucinates' facts, citations, names, or events that do not exist, presenting them with false confidence.

What is AI Hallucination?

Hallucination refers to the phenomenon where a language model generates statements that are convincingly written but factually wrong. The model produces output that sounds authoritative, yet the information is either incorrect, distorted, or entirely invented.

Types of Hallucination

  • Factual hallucination — Stating incorrect facts ("The Eiffel Tower is in Rome").
  • Citation hallucination — Fabricating papers, sources, or URLs that don't exist.
  • Entity hallucination — Inventing people, companies, or products.
  • Reasoning hallucination — Producing plausible but logically flawed reasoning chains.

Why LLMs Hallucinate

LLMs are trained to predict the most statistically likely next token. They don't have a separate "fact-checking" module — they generate text that fits the pattern of a reasonable answer, regardless of whether it's true. When the model lacks relevant training data, it fills the gap with plausible-sounding fabrications.

Mitigating Hallucinations

  • RAG — Ground responses in retrieved factual documents.
  • Temperature reduction — Lower temperature produces more deterministic, less creative outputs.
  • Constitutional AI / RLHF — Train the model to prefer accurate, verifiable responses.
  • Tool use / grounding — Give the model access to search, calculators, or databases.
  • Verification layers — Post-process outputs to check claims against external sources.

Example

Ask an LLM for citations for a niche academic topic, and it may confidently produce a list of paper titles, authors, and DOIs — none of which actually exist.

Related terms

  • RAG (Retrieval-Augmented Generation) RAG is a technique that combines an LLM with an external knowledge retrieval system. Instead of relying solely on its training data, the model retrieves relevant documents at query time and uses them as context to generate more accurate, up-to-date responses.
  • Temperature Temperature is a hyperparameter that controls the randomness of an LLM's output. A temperature of 0 produces deterministic, predictable responses. Higher values (0.7–1.0+) produce more creative, varied, and sometimes unpredictable text.
  • LLM (Large Language Model) A Large Language Model is a neural network trained on massive text corpora to predict and generate text. LLMs like GPT-4, Claude, and Gemini exhibit broad language understanding, reasoning, and generation capabilities that emerge from scale.
  • Grounding Grounding connects an LLM's outputs to verifiable, real-world information sources. A grounded model response is tied to specific, citable facts rather than relying purely on parametric knowledge, reducing hallucination and increasing trustworthiness.