freecoding.school100% FREE · NO SIGNUP
Tensor TownISSUE #78 of 120

hallucinations · why models invent

NeuraVSThe Overfit Ogre
Neura saysHallucination is when a model states false information confidently — a core LLM failure mode.

Because LLMs generate plausible-sounding text by predicting tokens, they can produce fluent, confident, wrong answers — invented citations, fake APIs, false facts. It's not lying; the model has no notion of truth, only likelihood. Mitigations: grounding via RAG, asking for citations, lowering temperature, and verifying outputs. Never deploy LLM output as fact in high-stakes settings without a check.

Power-ups you unlock

The Overfit Ogre attacks — common mistakes

Boss battleExplain why hallucination is inherent to next-token prediction.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>model predicts plausible tokens, not truth
→ invents citations/APIs/facts confidently
mitigate: RAG + citations + verify</pre></body></html>
▶ Open the interactive comic issue
‹ Eval Harnesses · Lm-Eval · Helm · Big-BenchGroundedness · Citations · Attribution ›