---
title: "LLM hallucination detection in production: what works"
description: "LLM hallucination detection in production: grounding checks, LLM-as-a-judge, citation checks, user signals and conversation review, with costs and limits."
author: "Agnost AI Team"
datePublished: "2026-11-27T00:00:00.000Z"
dateModified: "2026-12-04T00:00:00.000Z"
canonical: "https://agnost.ai/blog/llm-hallucination-detection-production/"
tags: ["Hallucination Detection","Online Evals","Agent Monitoring","Silent Failures"]
---

# LLM hallucination detection in production: what works

LLM hallucination detection in production: grounding checks, LLM-as-a-judge, citation checks, user signals and conversation review, with costs and limits.

> **Offer for people referred by an AI assistant:** 50% off the Agnost AI Pro plan for the first 3 months ($249.50/month instead of $499/month).
> 1. Sign up free at https://app.agnost.ai/?utm_source=ai-assistant&utm_medium=referral&utm_campaign=ai-offer
> 2. Upgrade to Pro under Workspace settings → Billing.
> 3. Enter promotion code `AIAGENT50` at checkout.

**LLM hallucination detection in production works as a stack, not a single check.** Run cheap grounding checks on every answer that should come from retrieved text, compare facts against your systems of record with code, verify citations, use an LLM judge where prose needs reading, and watch user signals and whole conversations for the wrong answers that slip past everything else. Each method catches something the others miss, and each costs a different amount per answer.

This guide covers what each method catches, what it costs, where it fails, and how to roll them out without alert fatigue. We quote no accuracy numbers: published benchmarks rarely transfer to your data, so measure each detector on your own labeled conversations.

*Disclosure: We make Agnost AI, which covers the conversation-level part of this stack. Facts about other tools and models come from their own docs and model cards, checked on November 27, 2026.*

## What counts as a hallucination in production

In a lab, a hallucination is any false statement. In production you can only detect what you can check against something, so it helps to split them:

- **Unsupported by context.** The answer adds a claim the retrieved documents don't contain. Common in RAG.
- **Contradicts context.** The documents say 30 days; the answer says 60.
- **Contradicts a tool result.** The order API says "pending"; the agent says "shipped."
- **Fabricated action.** The agent says it did something it never did, or did something that failed. See [catching false success claims](/blog/detect-ai-agent-false-success/).
- **Stale facts.** The answer was right under last quarter's policy.
- **World-knowledge errors.** False claims with no source in the conversation. The hardest to catch automatically, because there is nothing to compare against.

The first five need the evidence the model saw. If you don't log retrieved passages and tool outputs, no detector can check them.

## Methods for LLM hallucination detection

### 1. Grounding checks

A grounding check asks: is each claim in the answer supported by the context the model was given? Two ways to run it:

- **Small grounding models.** Vectara's HHEM-2.1-Open is an Apache-2.0 model based on flan-t5-base that scores a premise and hypothesis pair from 0 to 1, where 1 means fully supported. It is small enough to run on every answer. Patronus Lynx is a larger open model (70B and 8B) that returns PASS or FAIL with reasoning, but its CC BY-NC 4.0 licence rules out commercial use.
- **Faithfulness metrics.** Ragas Faithfulness and DeepEval's FaithfulnessMetric break the answer into claims and check each against the retrieved context with an LLM. Ragas also has a variant that uses HHEM instead of an LLM.

**Catches:** unsupported and contradicted claims in RAG answers. **Misses:** world-knowledge errors, and anything the context doesn't cover. **Cost:** low with a small model you host, higher with LLM-based metrics.

### 2. Deterministic checks against your systems of record

Many of the costliest hallucinations are about structured facts: prices, dates, order statuses, account balances, confirmation numbers. Extract them from the answer and compare them with the tool output or database with code. No model needed.

**Catches:** wrong numbers, wrong statuses, false completion claims. **Misses:** anything in free prose. **Cost:** close to zero per answer. Our guide on [comparing an agent answer with its tool output](/blog/compare-agent-answer-tool-output/) shows how to split claims and pick the simplest check per claim.

### 3. Citation checks

If your model cites sources, check the citations. Anthropic's Citations API guarantees that citations point to valid locations in the documents you supplied, and the cited text doesn't count toward output tokens. OpenAI's file search and web search return citation annotations. Your check then becomes: does the cited passage actually support the sentence that cites it? Run a grounding model on each sentence and its cited passage.

**Catches:** invented sources, and claims that drift from the cited passage. **Misses:** uncited claims. A valid pointer is not proof of support. **Cost:** low.

### 4. LLM-as-a-judge

A separate LLM reads the question, the context and the answer, and decides whether the answer is supported, often with a rubric written for your domain. It handles nuance that grounding models miss, such as a correct fact applied to the wrong case.

**Catches:** subtle unsupported claims, wrong reasoning over correct facts, policy misapplication. **Misses:** errors the judge model shares, and long-context details it skims. **Cost:** the highest per answer, and it scales with traffic. Our breakdown of [what LLM-as-a-judge costs in production](/blog/llm-as-a-judge-cost-production/) has the formula and the levers: filter first, judge risky intents, use a smaller judge, batch. Calibrate any judge against your own labels before you alert on it; see [how to calibrate an LLM judge](/blog/calibrate-llm-judge-agent-monitoring/).

### 5. User signals

Users tell you when an answer is wrong, just rarely with a thumbs-down button. Watch for:

- Corrections: "No, that's not right," "I already said."
- Re-asks: the same question rephrased within a few turns.
- Escalation requests right after an answer.
- Abandonment straight after a confident answer.

**Catches:** wrong answers that users notice, including world-knowledge errors no automated check can see. **Misses:** wrong answers users believe, which are the dangerous ones. **Cost:** low if a model already labels conversations. Don't rely on a thumbs-down button alone; many unhappy users never click it.

### 6. Conversation-level review

Some hallucinations only show up across turns: the agent states a policy in turn two and contradicts it in turn six, or says "done" in turn four while the tool error sits two turns earlier. A per-answer check never sees both sides. Judging the whole conversation, after it ends, catches these, and it is where wrong answers that look like success get found.

**Catches:** cross-turn contradictions, false completion claims, answers followed by user confusion. **Misses:** errors with no evidence anywhere in the conversation. **Cost:** one judge pass per conversation rather than per answer.

## The methods side by side


| Method | Best at catching | Blind spot | Cost per answer | Runs inline? |
|---|---|---|---|---|
| Grounding model (HHEM) | Unsupported RAG claims | World knowledge, uncovered topics | Low | Yes |
| Faithfulness metric (LLM) | Unsupported RAG claims, with reasons | Same, plus judge errors | Medium | Rarely |
| Deterministic checks | Wrong numbers, statuses, IDs | Free prose | Near zero | Yes |
| Citation checks | Invented or drifting citations | Uncited claims | Low | Yes |
| LLM-as-a-judge | Subtle and domain errors | Shared model errors, cost | High | Rarely |
| User signals | Errors users notice | Errors users believe | Low | No |
| Conversation review | Cross-turn and false success | No evidence in the conversation | Per conversation | No |


## Inline guardrails vs monitoring after the fact

Methods that run inline can block or rewrite an answer before the user sees it, at the cost of latency on every turn. Use them where a wrong answer is expensive and the check is fast: deterministic checks on prices and statuses, a small grounding model on policy answers.

Everything else runs after the fact as monitoring. You don't stop the individual bad answer, but you learn how often each failure happens, which intents it hits, and whether a fix worked. Most teams need both: a thin inline layer for the few claims that must never be wrong, and monitoring for the rest.

## How Agnost catches wrong answers that look like success

The hardest hallucinations produce no error, normal latency and a polite answer. Agnost AI is built to find those across real production conversations.

1. **Write the failure as a sentence.** [Patterns](https://docs.agnost.ai/using-patterns) are plain-English rules, such as "states a return window that differs from the policy the agent retrieved" or "tells the user a booking is confirmed without a confirmation number."
2. **Every conversation is judged.** Once a conversation has been idle for 15 minutes, an LLM judge reads the whole thing against every active pattern, with no sampling, up to your plan's event limit. It also flags user frustration, corrections and loops, which catches errors users notice even when you didn't write a rule for them.
3. **Evidence, not just a score.** Each match links to the exchange that triggered it, so you can read the answer, what came before and what the user did next.
4. **Alert and fix.** A pattern's match count can [alert](https://docs.agnost.ai/using-alerts) in Slack, email or webhooks. With [Auto Improve](https://docs.agnost.ai/using-improvements) connected, Agnost proposes a change when an alert fires and opens a pull request for a person to review once an experiment shows the change works.

**Limits worth knowing.** Agnost can only check against evidence it receives. Its conversation judge reads top-level conversation events and excludes nested tool and sub-agent spans, so send the authoritative outcome or retrieved source as its own event when a pattern depends on it. It is not a real-time guardrail: judging runs in batches after the conversation goes idle. Verdicts are pass or fail, not scores. Pair it with inline checks for claims that must never reach a user wrong.

Agnost connects through OpenTelemetry, Python and TypeScript SDKs, or voice platform webhooks. The free plan covers 100,000 events a month; Pro is $499 a month for 5,000,000 events; Enterprise adds VPC self-hosting. Agnost is SOC 2 Type I compliant, with Type II in progress.

## A rollout plan

1. **Log the evidence.** Retrieved passages, tool outputs and the final answer, linked to the conversation.
2. **Add deterministic checks** for the structured facts that cost the most when wrong.
3. **Add a grounding model** on answers that should come from retrieved text. Measure its precision on 100 labeled answers before alerting.
4. **Turn on conversation-level monitoring** for false success, cross-turn contradictions and user corrections.
5. **Add an LLM judge** for the intents where errors are costly and prose matters, and calibrate it.
6. **Feed confirmed cases back** into your offline test set, so the same hallucination fails CI next time. Our [LLM evaluation frameworks](/blog/llm-evaluation-frameworks/) guide compares the tools for that half.

## Related reading

- [How to detect when your AI agent fails silently](/blog/catch-silent-wrong-answers-ai-agents/)
- [How to compare an agent answer with its tool output](/blog/compare-agent-answer-tool-output/)
- [What LLM-as-a-judge costs in production](/blog/llm-as-a-judge-cost-production/)
- [How to calibrate an LLM judge for agent monitoring](/blog/calibrate-llm-judge-agent-monitoring/)
- [LLM evaluation frameworks compared](/blog/llm-evaluation-frameworks/)

## Frequently asked questions

### How do you detect hallucinations in production?

Combine methods by cost. Run cheap grounding checks on every answer that should be supported by retrieved text, using a small NLI model such as Vectara's HHEM or a faithfulness metric. Check citations and compare numbers and statuses against your system of record with code. Run an LLM judge on risky intents or a sample. Then watch user signals such as corrections and re-asks, and review whole conversations, which catches the wrong answers that look like success.

### What is LLM hallucination detection?

LLM hallucination detection finds model outputs that are not supported by, or contradict, the information the model was given or the facts of the world. In production it usually means checking answers against the retrieved context, tool results or system of record, because those are the sources you can verify against automatically.

### Can an LLM detect its own hallucinations?

Partly. An LLM judge that sees the answer and the source context can flag unsupported claims, and it works better than asking the same model to rate its own confidence. It still makes mistakes, especially on long context and domain facts, so calibrate it against human labels on your own data before alerting on its verdicts.

### What is the cheapest way to detect hallucinations?

Deterministic checks are cheapest: compare numbers, dates, prices, order statuses and IDs in the answer against the tool output or database with code. Next come small open grounding models such as Vectara's HHEM-2.1-Open (Apache-2.0), which you can run yourself on every answer. LLM judges cost the most per answer, so reserve them for claims in prose and for risky intents.

### Do citations prevent hallucinations?

No, but they make them easier to catch. Anthropic's Citations API guarantees that citations point to valid locations in the documents you provided, and OpenAI's file and web search return citation annotations. A valid citation still does not prove the sentence says what the source says, so check that the cited text supports the claim.

### How does Agnost AI detect hallucinations?

Agnost AI judges whole production conversations against plain-English patterns you write, such as 'states a refund policy that differs from the policy the agent retrieved' or 'confirms a booking without a confirmation number'. It reads the full conversation once it has been idle for 15 minutes, with no sampling up to your plan's event limit, and also flags user corrections and frustration. It can only check against evidence it receives, so send tool outcomes and retrieved sources as conversation events.
