Hallucination reduction
Where RAG hallucinations actually come from — retrieval gaps, blending, and over-synthesis — and the layered defenses that cut each one.
RAG is often sold as the hallucination cure. It's a massive reduction, not a cure — and the remaining failures have specific, distinguishable causes. Treat 'hallucination' as one disease and you'll apply the wrong medicine; here's the actual taxonomy.
- Gap-filling (the big one): retrieval returned nothing decisive, and the model — trained to be helpful — completed the answer from general knowledge. Looks exactly like a grounded answer. Cause: retrieval. Fix: retrieval + abstention.
- Blending: sources supplied part of the answer; the model seamlessly merged them with plausible filler. The 30-day window is real, the 'free return shipping' came from the internet's average policy. Fix: per-claim citation + verification — unverified claims surface immediately.
- Over-synthesis: each source is correctly quoted, but the combination asserts something neither source says ('since holiday returns extend to Jan 31 [S3] and damaged items get replacements [S2], damaged holiday items are replaceable through January' — maybe! sources never said it). Fix: instruction against cross-source inference + judge evals that specifically test combination questions.
- Stale truth: the index served a superseded document — grounded, cited, verified, and wrong. Fix: ingestion hygiene and `status` filters, not prompts.
The defense stack (each layer catches what the last missed)
- 1Retrieval floor → abstain. If the top rerank score is below your calibrated threshold, skip generation entirely and return the not-found path. The cheapest hallucinations are the ones never generated.
- 2Closed-book prompt + honest exit — your standing PE toolkit.
- 3Citation verification gate — mechanically flags blended claims.
- 4Groundedness judge (sampled): an LLM judge scores 'is every claim in this answer entailed by the sources?' on a sample of traffic — catches over-synthesis, which quote-matching alone can miss. Full-time in evals, sampled in production.
- 5Human escalation for verified-false or low-confidence answers in high-stakes categories — the routing table you already know how to write.
Here are a question, four source chunks, and an answer produced by my pipeline: [paste a real trace]. Act as a groundedness judge: for each claim in the answer, label it SUPPORTED (quote the supporting span), UNSUPPORTED (no source says it), or SYNTHESIZED (combines sources beyond what either states). Verdict: is this answer safe to show with citations?
This judge prompt is the sampled production check from the defense stack. Calibrate it exactly like you calibrated judges in Prompt Engineering: grade ten traces yourself first, compare.
Measured cause of RAG 'hallucinations' in the wild, in order: retrieval gaps, stale documents, blending, over-synthesis. The model is usually the least guilty party — which is why teams that only tune prompts stay stuck. Your defense budget should follow the ranking.