LLMs generate confident-sounding text, even when it's factually wrong. Learn to spot hallucinations, understand why they happen, and know how to mitigate them.
Sign in to save progress
Each block is an LLM response. Click Reveal to see what's wrong.
Score: 0/5 revealed
Albert Einstein was born in Ulm, Germany in 1879 and won the Nobel Prize in Physics in 1925.
The Python requests library was created by Kenneth Reitz in 2011. Install with 'pip install requests-http'.
According to a 2019 Stanford study by Johnson et al., LLMs hallucinate 23% of the time.
The Great Wall of China is visible from space with the naked eye.
Marie Curie was the first woman to win a Nobel Prize. She won it in Chemistry in 1903.
Hallucination isn't a patchable bug; it's a structural property of how LLMs work.
Pattern completion, not reasoning
LLMs predict statistically likely next tokens, not facts. They complete patterns that look plausible, even when wrong.
No uncertainty representation
The model always generates something. It has no built-in 'I don't know' state; it fills gaps confidently regardless of knowledge.
Training data noise
1 trillion tokens contain contradictions, errors, and myths. The model absorbs inconsistencies and may reproduce the wrong version confidently.
LLMs cluster at high confidence regardless of whether their answers are correct: the calibration gap.
A well-calibrated model's confidence tracks accuracy. LLMs are often overconfident: high confidence even when wrong.
Toggle each strategy to see how it reduces hallucination risk in practice.
RAG
Retrieval Augmented Generation
Ground every response in real documents retrieved at inference time. Facts come from verified sources, not model memory.
Grounding citations
Every claim must cite a source
Force the model to provide a URL or document reference for each factual claim. Unverifiable claims are flagged.
Lower temperature
More deterministic outputs
High temperature = creative but hallucination-prone. Low temperature = more conservative, sticking to high-probability tokens.
Human verification
Always verify high-stakes outputs
AI outputs are drafts. For medical, legal, or financial decisions, a qualified human must review before acting.
Key Insight
GPT-4's hallucination rate is estimated at 3–15% depending on task and measurement method. Even state-of-the-art models hallucinate regularly; treat AI outputs as drafts, not facts.