Skip to main content
AI / MLLLM FundamentalsDiagramBeginner

Hallucination

KO: 할루시네이션·EN: Hallucination·JA: ハルシネーション

A failure mode where an LLM fabricates factually false or unsupported statements with fluent, confident phrasing

Table of Contents

Structure Diagram

Hallucinated Output vs Grounded Output
HallucinationUngrounded Output

Pattern completion · No verification

  • CitationsFabricated URLs or paper titles
  • Unknown QueryGuesses fluently instead of abstaining
  • Failure ModeFactual error & context contradiction
GroundedGrounded Output

RAG retrieval + Citations + Abstention

  • CitationsVerified doc IDs & inline citations
  • Unknown QueryExplicitly abstains when evidence lacks
  • MitigationRAG + Low temp + Groundedness check
Quick Answer

What is Hallucination?

A failure mode where an LLM fabricates factually false or unsupported statements with fluent, confident phrasing. It is a core concept in LLM Fundamentals within AI / ML.

Core Principles

Hallucination arises because LLMs are probabilistic next-token predictors rather than verified knowledge bases. When asked about obscure, post-cutoff, or missing facts, the model optimizes for linguistic plausibility rather than truth, producing fluent yet fabricated claims.

In production engineering, hallucinations are separated into intrinsic hallucinations (directly contradicting the provided context) and extrinsic hallucinations (introducing unverified claims absent from the context).

Practical Takeaways

  • Ground answers with RAG and mandatory citations: Shift factual recall from model weights to retrieved passages and require explicit inline source references.
  • Allow explicit abstention: Instruct the model to reply with an explicit unknown/insufficient-evidence state instead of forcing an answer on every query.
  • Automate faithfulness checks: Run groundedness evaluators (NLI or LLM-as-a-Judge) in CI and add post-generation guardrails for high-stakes domains.

Notable Examples

  • Legal Research Copilots: Validate every cited case number against an authoritative legal database before showing the answer.
  • Financial Earnings Summarizers: Cross-check generated percentages and currency figures against source tables programmatically.
  • Customer Support Bots: Escalate to human agents whenever retrieval confidence drops below a threshold so bots never invent refund policies.