How can LLM hallucinations be evaluated?
LLM hallucinations are evaluated by checking generated claims against reliable evidence and counting how often the model invents, contradicts, or fails to support information. A good evaluation distinguishes factual correctness (is the claim true?) from faithfulness (does the supplied context support it?).
There is no universal hallucination metric: the choice depends on whether the assistant answers factual questions, summarizes documents, or uses a retrieval system.
1. Create a reliable test set
Collect representative user questions, model outputs, and, where relevant, authoritative source documents. Include straightforward questions, ambiguous prompts, missing-information cases, outdated documents, and difficult edge cases.
Decide in advance whether an answer is allowed to use outside knowledge or must use only the supplied context. Otherwise, a true but uncited statement might be mislabeled as false.
2. Evaluate individual factual claims
Instead of scoring an entire paragraph as simply correct or incorrect:
- Break the response into atomic, independently checkable claims.
- Find evidence for each claim.
- Label each claim supported, contradicted, or not verifiable under the evaluation rules.
- Report the claim-level and answer-level results separately.
FActScore follows this fine-grained approach, measuring the fraction of atomic facts supported by reliable knowledge sources. It is especially useful for long-form factual generation.
3. Evaluate faithfulness to retrieved context
For a RAG or document-grounded assistant, check whether the response's claims follow from the retrieved passages. Ragas Faithfulness uses the proportion of generated claims supported by retrieved context.
Faithfulness = supported claims / total evaluated claimsA model can be faithful but factually wrong if the supplied source itself is outdated or incorrect. Conversely, an answer can be factually correct but unfaithful to a strict source-only task.
4. Numerical example
Suppose an assistant generates 5 answers containing 20 atomic factual claims. Reviewers find:
- 15 supported claims
- 3 contradicted claims
- 2 claims not verifiable from the required sources
For this source-grounded evaluation:
Claim-level faithfulness = 15 / 20 = 75%
Unsupported-claim share = (3 + 2) / 20 = 25%Suppose those five unsupported claims appear across 3 distinct answers:
Answer-level failure rate = 3 / 5 = 60%These results measure different things. Never call the 25% claim-level rate a 60% answer-level rate, or treat a lack of source support as proof of factual falsehood.
5. Other evaluation methods
- Human review: Trained annotators verify claims and resolve ambiguous cases using a shared rubric. Double-review a sample and track disagreement.
- LLM-as-a-judge: A second model identifies claims or judges their evidential support. It can scale reviews, but may itself hallucinate or show systematic bias. Calibrate it using expert-reviewed examples.
- Automated fact verification: Retrieval plus entailment or natural-language-inference checks can help flag unsupported statements. Verify citations and source relevance.
- Specialized benchmarks: HalluLens tests particular hallucination behaviors using multiple task types. Benchmarks complement, rather than replace, application-specific tests.
- Abstention tests: Ask questions whose answers are missing from the evidence. Check whether the model appropriately says it cannot determine the answer instead of guessing.
Practical evaluation workflow
Realistic question + trusted sources
↓
LLM answer
↓
Extract atomic claims
↓
Check each against evidence
↓
Supported / Contradicted / Unverifiable
↓
Claim-level + answer-level metrics
↓
Review failures and retestPreserve the model version, prompts, retrieved documents, sampling settings, rubric, and evaluator version. Sample enough examples for meaningful conclusions and report uncertainty when comparing systems.
Common mistakes
- Treating any unsupported claim as certainly false: It may be true but ungrounded.
- Using only one score: Factuality, faithfulness, citation accuracy, abstention, and answer-level failure can disagree.
- Trusting model judges blindly: Automatic graders need human validation.
- Ignoring retrieval quality: A bad source can make an otherwise capable generator appear unreliable.
- Testing only easy questions: Include unanswerable, misleading, and production-like cases.
In short: Evaluate hallucinations by breaking answers into checkable claims, verifying them against the right evidence, and reporting clearly defined error rates. Review the examples behind the scores to understand whether failures come from retrieval, unsupported generation, or false facts.
For background, see “What is hallucination in an LLM?” and “What are the different types of LLM hallucinations?”
Research references: FActScore: Fine-grained Atomic Evaluation of Factual Precision, Ragas Faithfulness metric, and HalluLens: LLM Hallucination Benchmark.
Sources & Research References
Learning Sequence
Large Language Models Curriculum
Explore Related Questions
Deepen your understanding across related Large Language Models topics.