What Actually Helps
Lesson 3 of 4 in Hallucination.
Because the mechanism is missing knowledge plus mandatory fluent output, mitigations divide cleanly by which part they attack — and an honest efficacy ladder orders them by how much mechanism they actually bring.
Rung one: change what the model works from. Grounding puts the needed facts into the context window via Retrieval, then instructs the model to answer only from what was provided. This attacks the root: the task shifts from recalling facts the weights may not hold to reading evidence that is demonstrably present — attention can attend to the answer instead of the weights having to contain it. It also buys freshness (the document store updates; the weights don’t) and auditability (you can show which passage backs which claim). The RAG modules build this pipeline end to end — and catalogue its own failure modes, because grounding transforms the risk rather than eliminating it: retrieval can surface the wrong evidence, and the model can still summarize the right evidence unfaithfully.
Rung two: change how the model behaves at its knowledge edge. Abstention — declining, hedging, or saying “I don’t know” — is a training outcome, not a switch you flip. Models whose post-training rewarded calibrated refusal over confident guessing are commonly reported to confabulate less, at some cost in perceived helpfulness. As an application builder you mostly choose this property rather than create it: it is a reason model selection belongs in your hallucination threat model, and a property to test on your own traffic rather than take from a model card.
Rung three: check the output. Verification layers accept that some ungrounded text will be generated and catch it before a user sees it: groundedness checks that test whether the answer is supported by the retrieved evidence, citation checks that resolve every reference against the real index, schema and range checks for structured claims. These are the most provable rung — each check is a measurable gate with a false-positive/false-negative trade you control.
| Mitigation | Mechanism | Where it stops |
|---|---|---|
Grounding / RAG with answer-from-context instructions | Moves the task from weight-recall to reading evidence present in the context; adds freshness and per-claim auditability | Inherits retrieval failures (wrong/stale/missing evidence); the model can still be unfaithful to good evidence; coverage ends where the corpus ends |
Abstention-trained behavior (“I don’t know”) | Post-training that rewards calibrated refusal over confident guessing shifts behavior at the knowledge edge — commonly reported, model-specific | You mostly select it, not build it; calibration is imperfect, so it both misses fabrications and refuses answerable questions |
Verification layers (groundedness, citation, schema checks) | Independent post-generation checks against evidence or a source of truth; failures are blocked, flagged, or regenerated | Checker errors (an LLM judge has its own error rate); latency and cost; only covers claims the checker can test against something |
Decoding changes (temperature 0, etc.) | Removes sampling variance among plausible tokens — outputs become repeatable | Does not touch what the model scores as plausible: the most probable continuation over a gap is still a fabrication, now a deterministic one |
“Do not hallucinate” instructions alone | None identified: the instruction adds no knowledge and no fact/guess signal for the model to act on | Commonly observed to shift tone and hedging more than truthfulness; acceptable as garnish on rungs one to three, never as the meal |
Answer the user's question using ONLY the evidence passages below.
Rules:
- Every factual claim in your answer must be supported by at least one passage; cite it as [P1], [P2], ...
- If the passages do not contain enough information to answer, reply exactly: "The provided documents do not answer this." Do not fill gaps from general knowledge.
- If passages conflict, say so and cite both.
Evidence passages:
{{RETRIEVED_PASSAGES}}
Question: {{USER_QUESTION}}The template does two mechanistic things: it scopes claims to evidence the app controls, and it gives the model an explicit, rewarded alternative to guessing. It does not enforce itself — pair it with the groundedness checks from lesson four, because instructions bound behavior only as far as training happened to internalize them.
Real systems stack the rungs, because each one’s residual risk is the next one’s input: ground the answer, prefer a model that abstains at its edge, verify the output, and measure the leftover rate (lesson four). Where the stakes justify it, the strictest pattern makes verification structural — the app assigns citation IDs to retrieved passages, so the model can only reference evidence that verifiably exists, and a checker confirms each cited passage supports its claim before the answer renders.
One boundary note: everything above assumes the model’s output is text a human reads, where a hallucination costs trust. The moment the output drives tools — queries executed, emails sent, code merged — an ungrounded claim becomes an ungrounded action, and the mitigation story becomes containment and tool scoping, which our sister AI Agent Academy owns.
Interactive checkpoint quiz (1 questions) — open this page in a browser to take it.