AN Alpesh Nakrani
BlogBooksPraiseAbout Work with me →
All books
Hallucination, Mechanically cover
2025 / Free online book · Technical Deep Dives

Hallucination, Mechanically

Why Models Make Things Up and What Actually Reduces It

Access
Free
Chapters
16
Read time
168 min

Hallucination is not a bug to patch but a property to manage. The mechanisms behind it and the interventions that measurably help.

This edition is free to read onsite. Each chapter has its own URL, so readers can bookmark, share, and return to the exact section they need.

Table of contents
FM Front Matter: Hallucination, Mechanically Why Models Make Things Up and What Actually Reduces It 5 min INT Introduction: The Holding That Never Was The system did almost everything right, which is what made the failure so hard to see. 9 min 01 The Confident Wrong Answer > **Working claim: ** "The model hallucinated" is not a diagnosis. 11 min 02 A Working Taxonomy of Hallucination > **Working claim: ** A taxonomy is only useful if each category implies a *different detector and a different fix*. The categories that matter are not the ones that sound distinct in a paper, they are the ones that route to different engineering. 10 min 03 The CLAIM Framework > **Working claim: ** A taxonomy tells you what went wrong after the fact. A framework tells you what to check before you answer. 9 min 04 Fluency Is Not Evidence > **Working claim: ** A language model is an engine for producing probable continuations of text. 10 min 05 What Models Know About What They Know > **Working claim: ** Models carry a real, usable signal about their own correctness, but it is fragile, format-dependent, and degraded by the very tuning that makes them helpful. 9 min 06 When Retrieval Fails Before Generation Begins > **Working claim: ** "Add RAG" is the most over-prescribed cure in the field because it treats hallucination as a knowledge problem when it is often a *grounding* problem. 10 min 07 A Citation Is Not Proof > **Working claim: ** A citation is a *claim about the relationship between an assertion and a source*. Models are excellent at producing the *form* of that claim and terrible, unaided, at guaranteeing its *truth*. 8 min 08 The Compression Press > **Working claim: ** Summarization and transformation feel safer than open-domain question answering because the source is right there, but the source's presence creates a false sense of grounding. 8 min 09 Hallucinated Actions > **Working claim: ** When an agent acts, its claims are no longer just about the world's facts, they are about the world's *state*, which the agent itself is changing. 9 min 10 Claim Extraction and Source-Span Verification > **Working claim: ** Detection is a pipeline, not a verdict. To find unsupported claims you must first *extract* them, then *link* each to a candidate span, then *classify* the link as entailment, contradiction, or neither, then *decide* per claim. 8 min 11 Self-Consistency and the Limits of the Judge > **Working claim: ** When you have no reference to check against, you fall back on two instruments: *consistency* (does the model agree with itself across samples?) and *judgment* (does a model rate the output?). 9 min 12 Interventions and Their Limits > **Working claim: ** Every popular hallucination cure works on *some* failure mode and is useless or harmful on others. 9 min 13 Teaching a System to Say "I Don't Know" > **Working claim: ** The most valuable output an AI system can produce is often a calibrated refusal. A system that abstains when its evidence is insufficient converts an undetectable confident falsehood into a visible, safe non-answer. 9 min 14 Measuring Unsupported Claims > **Working claim: ** You cannot manage a hallucination rate you do not measure, and you cannot measure it at the answer level. 8 min 15 Operating Against Hallucination in Production > **Working claim: ** Offline evaluation tells you what the system did on your golden set. Production tells you what it does on the world's questions, against a corpus that drifts, for users who behave nothing like your test cases. 9 min 16 Playbooks by Domain > **Working claim: ** The machinery is constant, CLAIM, the taxonomy, verification, abstention, monitoring, but the *settings* are not. 10 min A Appendix A: Back Matter Glossary, implementation checklist, and source register for the book. 8 min