Evaluation Playbooks for Generative AI Hallucinations: Taxonomy and Test Sets
Dec, 4 2026
You ship a chatbot. It sounds confident. It answers questions about your product specs with perfect grammar. But it just invented a warranty period that doesn't exist. This is the hallucination problem in Generative AI, and it’s not a bug you can patch out of existence-it’s a feature of how Large Language Models (LLMs) work. If you’re deploying AI in production, hoping it won’t lie isn’t a strategy; it’s a liability.
Most teams treat hallucination detection like whack-a-mole. They spot an error, fix the prompt, and move on. That fails at scale. What works is an evaluation playbook: a structured system that categorizes errors by type and severity, then applies specific test sets to catch them before users do. This guide breaks down the taxonomy you need and the test sets that actually find the problems, based on current industry standards and open-source benchmarks like LibreEval.
Why Hallucinations Are Inevitable (And Why You Can’t Just “Fix” Them)
To build a good test set, you have to understand the enemy. LLMs don’t retrieve facts from a database; they predict the next token based on probability distributions learned during training. As research from ArXiv (2025) confirms, hallucinations are theoretically inevitable in computable LLMs regardless of architecture. The model doesn’t "know" things; it mimics patterns. When the pattern gaps appear-often in logical reasoning or niche factual queries-the model fills them with plausible-sounding nonsense.
This mechanical reality means your evaluation strategy must focus on detection and mitigation, not elimination. A robust playbook accepts that errors will happen and focuses on minimizing their impact through systematic testing.
The Hallucination Taxonomy: Categorizing Errors by Type and Severity
Not all errors are created equal. Telling a user the wrong middle name of a historical figure is annoying. Giving a patient the wrong drug dosage is dangerous. Your playbook needs a dual-axis taxonomy: one axis for the type of error, another for the risk level.
Type Axis: Intrinsic vs. Extrinsic
The foundational distinction in academic literature separates hallucinations into two main categories:
- Intrinsic Hallucinations: These contradict the input context provided by the user. If you ask an AI to summarize a document and it includes facts not present in that document, that’s intrinsic. It’s a faithfulness failure.
- Extrinsic Hallucinations: These are inconsistent with external reality or training data. If the AI states a fact that is simply wrong in the real world, regardless of the input, that’s extrinsic. It’s a factuality failure.
Understanding this split helps you debug. Intrinsic errors usually point to poor retrieval or context window issues. Extrinsic errors point to model knowledge gaps or outdated training data.
Severity Axis: Cosmetic to Critical
Enterprise frameworks, such as those outlined by TestFort, classify hallucinations by business impact. This determines how often you need to test.
| Level | Type | Example | Required Testing Cadence |
|---|---|---|---|
| 1 | Cosmetic | Incorrect middle initial in a bio | Weekly Sampling |
| 2 | Functional | Wrong product spec in shopping assistant | Daily Automated Checks |
| 3 | Critical | Wrong medical dosage or legal advice | Continuous Monitoring + Alerts |
If your app handles financial recommendations or medical queries, you are in Tier 1 High Risk territory (per Branch8’s framework). You cannot rely on weekly checks. You need continuous monitoring.
Building Effective Test Sets: Beyond Simple QA Pairs
A generic list of questions and answers isn’t enough. To catch hallucinations, your test sets must target specific vulnerabilities. Recent findings from the LibreEval benchmark highlight which types of prompts trigger the most errors.
Targeting Logical Reasoning Gaps
LibreEval data shows that requests requiring advanced logical reasoning are the most hallucination-prone. Simple factual lookups are relatively safe. Complex multi-step logic is where models break. Your test set should include:
- Multi-hop Questions: Queries that require combining information from three or more sources.
- Negation Tests: Prompts that explicitly ask what something is not. Models struggle with negations.
- Temporal Disorientation: Questions involving dates and sequences, especially if the training data cutoff is recent.
Synthetic vs. Natural Occurrence
There is a trap here. Synthetic hallucinations (errors artificially injected into data for testing) are harder for models to detect than naturally occurring ones. However, natural datasets show that relation-error and incompleteness hallucinations dominate. This means your test sets shouldn’t just check if a fact is wrong; they must check if relationships between entities are swapped (e.g., attributing a quote to the wrong person) or if key parts of the answer are missing.
Detection Methodologies: How to Spot the Lies
Once you have your test sets, how do you evaluate the output? Relying on human review alone is too slow. You need automated layers.
Source Checking and RAGAS Metrics
For Retrieval-Augmented Generation (RAG) systems, the RAGAS framework is the industry standard for diagnostic evaluation. It splits the problem into retrieval and generation:
- Faithfulness: Does the answer align with the retrieved context? If the context says "red" and the model says "blue," it’s unfaithful.
- Context Precision: Did the retriever pull relevant chunks?
- Context Recall: Did the retriever miss necessary chunks?
This distinction is crucial. If faithfulness is low but context precision is high, your LLM is ignoring the source material. If context recall is low, your retrieval system is failing, and no amount of prompting will fix the hallucination.
Token-Level Confidence Scores
Modern LLMs provide probability scores for each generated token. Low confidence scores often correlate with hallucinations. By setting a threshold, you can flag sentences where the model is "guessing." While not perfect, this adds a cheap, fast layer of defense. Use AUROC (Area Under the Receiver Operating Characteristic Curve) to measure how well these confidence scores separate correct tokens from incorrect ones.
Semantic Triplet Extraction
For high-stakes applications, consider semantic triplet extraction. This technique parses AI-generated text into subject-verb-object triplets (e.g., "Paris [is capital of] France"). Then, it compares these triplets against a verified knowledge base using vector similarity. If the embedding distance is large, the statement is likely a hallucination. This is particularly effective for catching relation errors.
Implementation Strategy: The Multi-Tier Defense
A single detection method misses things. Successful enterprise playbooks use a layered approach.
- Tier 1: Automated Screening. Run every response through token-level confidence checks and basic rule-based filters (e.g., length constraints, forbidden words).
- Tier 2: Semantic Validation. For flagged responses, run RAGAS metrics or semantic triplet comparisons. If the score falls below a threshold, mark the response as "low confidence."
- Tier 3: Human-in-the-Loop. Route low-confidence or critical-risk responses to human reviewers. This is expensive, so you want to minimize the volume reaching this stage.
Crucially, maintain audit trails. Log every detected hallucination, the method used to detect it, and the remediation action taken. Over time, this data refines your thresholds and identifies new patterns in your specific domain.
Pitfalls to Avoid
Don’t make these common mistakes:
- Over-relying on Self-Correction: Asking an LLM to check its own work often results in consistent hallucinations. The model lacks an external ground truth.
- Ignoring Domain Specificity: A general-purpose test set won’t catch medical hallucinations. Build domain-specific adversarial examples.
- Static Test Sets: Models evolve. Retrain your evaluators and update test sets quarterly to account for model drift and new capabilities.
Next Steps for Your Team
If you’re starting from scratch, begin with the basics. Define your risk tier. If you’re in healthcare or finance, assume Level 3 Critical. Build a small test set of 50-100 high-risk questions focusing on logical reasoning and temporal facts. Implement RAGAS metrics if you use retrieval. Measure your baseline hallucination rate, then iterate.
Hallucinations aren’t going away. But with a structured playbook, you can turn a chaotic liability into a manageable engineering problem.
What is the difference between intrinsic and extrinsic hallucinations?
Intrinsic hallucinations contradict the input context provided to the model (e.g., summarizing a text incorrectly). Extrinsic hallucinations are factually incorrect according to external reality, regardless of the input (e.g., stating a false historical fact). Intrinsic errors relate to faithfulness; extrinsic errors relate to factuality.
Can AI models detect their own hallucinations?
Partially. Models can identify some hallucinations using self-consistency checks or confidence scores, but they often fail to detect synthetic or complex logical errors. Research shows that judging text similarity is easier for AI than generating factually perfect answers, making LLM-as-a-judge useful but not infallible.
What is the RAGAS framework?
RAGAS (Retrieval-Augmented Generation Assessment) is an evaluation framework for RAG systems. It measures Faithfulness (alignment with retrieved context), Context Precision (quality of retrieved documents), and Context Recall (coverage of relevant information). It helps diagnose whether errors stem from poor retrieval or poor generation.
How often should I run hallucination tests?
It depends on risk level. Cosmetic errors warrant weekly sampling. Functional errors require daily automated checks. Critical errors (medical, legal, financial) demand continuous monitoring with immediate alerts for anomalies.
Are synthetic hallucinations harder to detect than natural ones?
Yes. Studies indicate that models struggle more with detecting synthetic hallucinations compared to naturally occurring ones. However, natural datasets show that relation-errors and incompleteness are the most frequent and difficult types to catch autonomously.