You cannot reliably prevent an LLM from hallucinating, but you can catch a large share of hallucinations before they reach a user. Detection works by triangulating a claim against something other than the model's own fluency: multiple independent generations, the actual retrieved source text, a second model acting as judge, or a human spot check. No single technique catches everything, and vendors who claim otherwise are overselling. The realistic goal is stacking two or three cheap checks so the failures that slip through one get caught by another.
The core idea
A hallucination is not a bug you can patch — it is a structural property of how these models generate text, predicting plausible continuations rather than looking up facts. That means detection has to happen outside the model's own generation process. You are not asking "does this sound right?" — a hallucinated answer is often the most fluent, confident-sounding one on the page. You are asking "is there independent evidence this is true?" That reframing is the whole game.
Detection techniques compared
| Technique |
How it works |
Catches |
Cost |
| Self-consistency |
Ask the same question several ways, compare answers |
Fabrications that vary across phrasings |
Low — a few extra calls |
| Retrieval grounding check |
Verify each claim against the retrieved source text |
Ungrounded claims in RAG systems |
Medium — needs a verification pass |
| LLM-as-judge |
A second model scores the answer for support and accuracy |
Unsupported claims, logical gaps |
Medium — another model call |
| Semantic entropy |
Measure meaning-level variance across sampled generations |
Confabulation on open-ended questions |
Medium-high — needs multiple samples |
| Citation verification |
Check that a cited source actually says the claim |
Misattributed or fabricated citations |
Low-medium — can be automated |
| Human spot check |
A person reviews a sample against source material |
Whatever automated checks miss |
High per item, but catches nuance |
A practical detection pipeline
- Ground every factual claim in retrieval. If the system uses RAG, verify the answer's claims map to specific passages in what was retrieved — an ungrounded claim is a strong hallucination signal.
- Run a cheap self-consistency pass on high-stakes answers. Ask the same question two or three different ways and flag answers that disagree with themselves.
- Add an LLM-as-judge pass for scale. Use a second model, ideally a different one, to score whether the answer is actually supported by the source material provided.
- Verify citations, not just their presence. A citation that exists but does not say what the answer claims is arguably worse than no citation, since it looks verified.
- Sample a human review queue. Route a small, consistent percentage of outputs to a human reviewer, weighted toward the highest-stakes categories.
Common mistakes
- Trusting the model's stated confidence. A model saying "I am certain" carries little signal — the fluency of hallucinated text is often indistinguishable from accurate text.
- Checking only for obviously wrong answers. The dangerous hallucinations are the plausible ones: a real-sounding statistic, a citation to a real source that says something else.
- Using one detection technique and calling it solved. Each method has blind spots; self-consistency misses errors that are consistent across phrasings, and grounding checks miss errors baked into the source itself.
- Skipping detection on low-visibility outputs. Internal tools and background automation get less scrutiny than customer-facing text, but a wrong number in a report is just as costly as one in a chat reply.
FAQ
Can hallucinations be eliminated completely?
No, not with current architectures. Retrieval grounding and fine-tuning reduce the rate, but detection and review remain necessary for anything consequential.
Is LLM-as-judge reliable enough to use alone?
Treat it as a strong first-pass filter, not a final verdict — judge models have their own blind spots and can be fooled by confident, well-structured wrong answers.
Does retrieval-augmented generation solve hallucination on its own?
It reduces the rate by giving the model something to ground answers in, but the model can still ignore the retrieved text or misread it. Grounding checks are still necessary.
What is the cheapest detection technique to start with?
Self-consistency checking — running the same question a couple of different ways and comparing answers costs little and catches a meaningful share of fabrications.
Where to go next
For how this connects to leaderboard claims, see how to read AI benchmarks critically. For the adversarial side of finding model failures, read what AI red-teaming involves and our earlier piece on AI red teaming in 2026 for a different angle on stress-testing models.