This prompt is for output quality teams who need to classify potential hallucinations by severity and route high-risk fabrications to human review before user exposure. It sits downstream from content generation and upstream from user delivery, acting as a factuality gate. Use it when your system generates claims that must be verified against source material, and when different hallucination severities demand different actions: auto-correction, flagging, or hard escalation.
Prompt
Hallucination Severity Classification Handoff Prompt

When to Use This Prompt
Learn when to deploy the hallucination severity classifier and when simpler approaches or different tools are a better fit.
This is not a general-purpose fact-checking prompt. It assumes you already have a candidate output and its source context. The prompt performs structured severity classification, citation gap analysis, and a handoff decision with clear rationale. Do not use this prompt when you need real-time claim extraction from live conversations, when source documents are unavailable, or when your application can tolerate minor inaccuracies without user harm. For those cases, a lighter confidence score or a simpler binary check is more appropriate.
The ideal deployment pattern places this prompt inside a post-generation validation pipeline. After your primary model produces a response, this classifier inspects the output against the provided evidence before the user sees it. If the classifier returns a CRITICAL or HIGH severity rating, the system should block delivery and route to a human review queue. MEDIUM findings can trigger automatic regeneration with stricter grounding instructions, while LOW or NONE results allow the output through. This tiered approach keeps review queues manageable while catching the hallucinations that actually cause user harm or trust erosion.
Before adopting this prompt, confirm that your pipeline can supply the required inputs: the candidate output text, the source context used during generation, and any existing citations. If your generation step does not produce citation mappings, you will need to add a citation step or accept that the classifier will flag more outputs as unverifiable. Also ensure your human review queue can handle the expected escalation volume. Run a dry-run evaluation on historical outputs to estimate the escalation rate before turning on blocking behavior in production.
Use Case Fit
Where this prompt works and where it does not. Understand the operational boundaries before integrating this classification step into a production pipeline.
Good Fit: Pre-Publication Factuality Gates
Use when: An AI system generates content that will be shown to users, and high-severity fabrications must be blocked before exposure. Guardrail: Integrate this prompt as a synchronous check after generation but before rendering the final output to the user.
Bad Fit: Real-Time Chat with Latency SLAs
Avoid when: The user expects a sub-second response. This classification step adds non-trivial latency, especially when routing to human review. Guardrail: Use a lightweight, model-graded confidence check for low-latency paths, reserving this full prompt for asynchronous or high-risk workflows.
Required Inputs: Grounded Source-Answer Pairs
Risk: Classifying a statement without its source evidence leads to unreliable severity scores. Guardrail: The prompt requires both the generated statement and the retrieved context or tool output it was based on. Do not call this prompt on a bare model response.
Operational Risk: Human Review Queue Flooding
Risk: Overly sensitive severity thresholds can route a high volume of low-risk fabrications to human reviewers, causing alert fatigue and delayed response to true high-severity incidents. Guardrail: Calibrate severity definitions against a golden dataset and monitor the escalation rate. Start with a high threshold and lower it based on review capacity.
Operational Risk: Citation Gap Blind Spots
Risk: The model may fabricate a plausible-sounding statement that is not directly supported by the provided sources but is not factually false. This prompt might miss unsupported claims if it only checks for factual contradiction. Guardrail: Pair this prompt with a separate 'grounding check' that verifies if a statement is directly attributable to the provided evidence.
Bad Fit: Subjective or Creative Content Evaluation
Avoid when: The output is a marketing tagline, a poem, or a strategic opinion. Factuality classification cannot assess creative quality or subjective interpretation. Guardrail: Route creative content to a different evaluation rubric focused on brand safety, tone, and policy compliance, not factual accuracy.
Copy-Ready Prompt Template
A reusable prompt for classifying hallucination severity and routing high-risk fabrications to human review.
This template is designed to be pasted into your system prompt or a dedicated classification step in your AI pipeline. Its job is to analyze a model-generated statement against provided ground-truth context, classify the severity of any detected hallucination, and produce a structured handoff decision. The prompt uses square-bracket placeholders that you must replace with your application's specific context, policies, and output schema before deployment. Do not use this prompt as a standalone fact-checker; it requires verified source material to function correctly.
textYou are an output quality auditor. Your task is to compare the [STATEMENT_TO_VERIFY] against the provided [GROUND_TRUTH_CONTEXT] and classify any factual discrepancies. ## Input - Statement: [STATEMENT_TO_VERIFY] - Ground Truth: [GROUND_TRUTH_CONTEXT] - Risk Policy: [RISK_POLICY_DEFINITION] ## Classification Rules Analyze the statement for factual accuracy. If a discrepancy exists, classify its severity: - **CRITICAL**: The statement fabricates a dangerous instruction, a legal/medical claim, a financial figure, or a fact about a real person that could cause harm if acted upon. - **HIGH**: The statement invents a non-existent product feature, API parameter, or a significant historical/technical fact that would mislead a professional user. - **MEDIUM**: The statement contains a minor factual error, a wrong date, or a misattributed quote that does not change the core meaning but is objectively incorrect. - **LOW**: The statement is vague, uses slightly imprecise language, or makes a subjective claim that cannot be strictly verified but is not contradictory to the ground truth. - **NONE**: The statement is fully supported by the ground truth context. ## Handoff Decision Based on the severity, determine the routing action: - If CRITICAL or HIGH: Route to [HUMAN_REVIEW_QUEUE] immediately. Do not show the statement to the user. - If MEDIUM: Log the incident in [OBSERVABILITY_PLATFORM] and flag for batch review, but allow the response if [MEDIUM_RISK_POLICY] permits. - If LOW or NONE: Approve for release. ## Required Output Return a single JSON object matching this [OUTPUT_SCHEMA]: { "severity": "CRITICAL | HIGH | MEDIUM | LOW | NONE", "discrepancy_summary": "A concise, specific description of the factual error, or null if NONE.", "handoff_decision": "ESCALATE | LOG | APPROVE", "handoff_target": "[HUMAN_REVIEW_QUEUE] | [OBSERVABILITY_PLATFORM] | null" } ## Constraints - Do not infer intent. Judge only factual alignment with the ground truth. - If the ground truth is insufficient to verify the statement, set severity to LOW and note the evidence gap. - Never output the statement itself if the decision is ESCALATE.
To adapt this template, start by defining your [RISK_POLICY_DEFINITION] with concrete examples of what constitutes a CRITICAL fabrication in your domain. A medical app might define CRITICAL as any invented drug interaction, while a coding assistant might reserve it for hallucinated API methods that would crash a production system. Next, integrate the [OUTPUT_SCHEMA] with your downstream routing logic so that ESCALATE decisions automatically create tickets in your [HUMAN_REVIEW_QUEUE]. Finally, build an eval set of known hallucinations at each severity level to test that your classification thresholds remain stable across model updates. The most common failure mode is classifying all unsupported statements as HIGH, which floods your review queue—calibrate your MEDIUM and LOW tiers carefully using real production data.
Prompt Variables
Each placeholder must be populated before the prompt is sent. Missing or invalid values will cause misclassification and incorrect routing.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[MODEL_OUTPUT] | The full text output from the model that needs hallucination severity classification | The capital of France is Paris. The Eiffel Tower was built in 1889 by Gustave Eiffel. | Must be non-empty string. Truncate if over token limit. Include full output context for accurate classification. |
[GROUND_TRUTH_SOURCES] | Verified reference material against which claims in the output will be checked | Wikipedia: Eiffel Tower construction completed 1887-1889. Official site: built for 1889 World's Fair. | Must contain at least one source. Each source needs a label and content. Null allowed only for 'no sources available' classification path. |
[CITATION_MAP] | Mapping of which parts of the output cite which sources, if any citations exist | Claim 'built in 1889' cites source_id: wiki_eiffel_construction | Can be null if output has no citations. When present, each claim must map to a source_id present in [GROUND_TRUTH_SOURCES]. |
[DOMAIN_CONTEXT] | The subject domain or use case to calibrate severity thresholds | historical_facts | Must match one of the predefined domain categories. Use 'general' if domain is unknown. Domain affects severity scoring rules. |
[SEVERITY_THRESHOLDS] | Configurable thresholds for low, medium, high, and critical severity levels | critical: fabricated_safety_claim, high: fabricated_numeric_data, medium: unsupported_interpretation, low: minor_date_error | Must define all four levels. Each level needs at least one example trigger condition. Thresholds should align with organizational risk tolerance. |
[ESCALATION_RULES] | Rules determining which severity levels and conditions trigger human review | critical: always_escalate, high: escalate_if_user_facing, medium: log_and_continue, low: auto_pass | Must specify action for each severity level. Actions must be one of: always_escalate, escalate_if_user_facing, log_and_continue, auto_pass. |
[OUTPUT_SCHEMA] | The expected JSON structure for the classification result | {"severity": "high", "hallucinated_claims": [...], "evidence_gaps": [...], "route_to_human": true} | Must be valid JSON schema. Must include fields for severity, hallucinated_claims array, evidence_gaps array, and route_to_human boolean. Schema validation required before routing. |
Implementation Harness Notes
How to wire the Hallucination Severity Classification Handoff Prompt into a production post-generation validation pipeline.
This prompt is designed to run as a post-generation validation step before any model output reaches the user. It should not be used as a real-time guardrail on the primary generation call. Instead, integrate it into an asynchronous or synchronous validation harness that receives the candidate output, the source context (if any), and the user's original query. The harness calls this classification prompt, parses the structured severity rating and rationale, and then makes a routing decision: release the output, flag for review, or block and escalate.
For a synchronous implementation, place this prompt after your primary generation call but before streaming the response to the user. Use a fast, cost-efficient model (e.g., GPT-4o-mini, Claude 3.5 Haiku) for the classification step to keep latency under 500ms. The harness must enforce a strict timeout (e.g., 2 seconds) with a default action of HOLD_FOR_REVIEW if the classifier does not respond in time. Parse the model's JSON output with a schema validator. If the severity field is HIGH or CRITICAL, or if the requires_human_review boolean is true, route the output to a review queue and surface the rationale and flagged_claims fields to the reviewer. For MEDIUM severity, log the event and increment a per-session counter; if the counter exceeds a configurable threshold (e.g., 3 medium hallucinations in one session), escalate the session. LOW severity outputs can be released, but the harness should still attach the classification metadata to your observability traces for offline analysis.
When wiring this into an agentic or RAG pipeline, ensure the [SOURCE_CONTEXT] placeholder is populated with the exact retrieved passages or tool outputs the model used. An empty or incomplete context field will cause the classifier to over-flag hallucinations because it cannot distinguish between a missing citation and a fabrication. Implement a pre-check: if the primary generation model's own citation markers or grounding score fall below a threshold, skip the classifier and route directly to human review. Do not use this prompt to classify outputs from models that are not expected to be factual (e.g., creative writing, brainstorming). Finally, log every classification result—including the model, prompt version, severity, and routing decision—to your prompt observability platform. This data is essential for calibrating severity thresholds, measuring reviewer workload, and detecting model drift over time.
Expected Output Contract
The model must return valid JSON matching this schema. Your application should validate before acting on the classification.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
severity | enum: LOW | MEDIUM | HIGH | CRITICAL | Must be exactly one of the four enum values. Reject any other string. | |
confidence_score | number (0.0 to 1.0) | Must be a float between 0 and 1 inclusive. If confidence < 0.7 and severity is HIGH or CRITICAL, route to human review regardless of other fields. | |
hallucination_type | enum: FABRICATION | DISTORTION | OMISSION | ATTRIBUTION_ERROR | UNGROUNDED_INFERENCE | Must match one of the five types. Reject unknown types. If type is FABRICATION and severity is CRITICAL, block output and escalate immediately. | |
claim_summary | string (max 500 chars) | Must be a non-empty string summarizing the hallucinated claim. If empty or whitespace-only, reject the output. | |
source_citation_gap | string (max 1000 chars) | Must describe what evidence is missing or contradictory. If severity is HIGH or CRITICAL and this field is empty, flag for human review. | |
recommended_action | enum: RELEASE | FLAG_FOR_REVIEW | BLOCK_AND_ESCALATE | Must be one of the three actions. If severity is CRITICAL, action must be BLOCK_AND_ESCALATE. If not, reject the output. | |
review_priority | enum: ROUTINE | PRIORITY | URGENT | If null and severity is HIGH or CRITICAL, default to PRIORITY. If provided, must be a valid enum value. | |
evidence_references | array of strings | Each string must be a non-empty citation key or source identifier. If severity is HIGH or CRITICAL and array is empty or null, flag for human review. |
Common Failure Modes
What breaks first when classifying hallucination severity and how to guard against it. Each failure mode includes detection signals and mitigation steps.
Severity Inflation Under Uncertainty
What to watch: The model classifies low-confidence or ambiguous statements as high-severity hallucinations because it cannot distinguish between factual error and insufficient evidence. This floods the review queue with false positives. Guardrail: Require the model to output a separate confidence score alongside severity. Route to human review only when both severity is high AND confidence in the classification is above a threshold. Add a 'needs more evidence' category.
Citation Gap Misclassification
What to watch: The model flags a statement as hallucinated because no citation was provided, even when the statement is factually correct but sourced from the model's training data. This conflates citation hygiene with factual accuracy. Guardrail: Separate the classification into two axes: factual accuracy and citation coverage. Only escalate when a statement is both unsupported by citations AND likely false. Train reviewers on the distinction.
Context Window Truncation Blindness
What to watch: The model classifies a statement as hallucinated because the supporting evidence was truncated from the context window or lost in a long conversation. The statement was grounded but the ground truth became invisible. Guardrail: Include a context completeness check before classification. If the model cannot see the full source, it should return 'insufficient context' rather than 'hallucination.' Log truncation events separately.
High-Stakes Domain Overcautiousness
What to watch: In medical, legal, or financial contexts, the model escalates nearly every statement to human review because it cannot reliably distinguish between minor imprecision and dangerous fabrication. Review teams become overwhelmed and miss real risks. Guardrail: Define domain-specific severity tiers with concrete examples. A missing Oxford comma is not a clinical hallucination. Use few-shot examples showing what NOT to escalate.
Multi-Turn Drift Accumulation
What to watch: A single turn contains a minor unsupported claim that the model correctly classifies as low severity. Over five turns, small fabrications compound into a coherent but entirely false narrative that no single classification catches. Guardrail: Add a session-level cumulative risk score. When the aggregate hallucination count or severity trend crosses a threshold, escalate the entire session for review regardless of individual turn scores.
Tool Output Attribution Failure
What to watch: The model correctly reports data from a tool call but the tool itself returned incorrect or stale data. The classification prompt treats the model's output as hallucinated when the root cause is tool failure, not model fabrication. Guardrail: Include tool call metadata and timestamps in the classification context. Distinguish between 'model hallucination,' 'tool error,' and 'stale data' in the output schema. Route tool errors to the tool owner, not the content review queue.
Evaluation Rubric
How to test output quality before shipping. Run these checks against a golden dataset of 50-100 examples with known hallucination severities and correct handoff decisions.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Severity Classification Accuracy | Matches ground-truth severity label (none, minor, major, critical) in >= 90% of cases | Misclassification rate > 10%, especially critical misclassified as minor or vice versa | Run against golden dataset; compute confusion matrix; flag any critical-to-minor errors as blocking |
Handoff Decision Correctness | Handoff flag matches expected routing (human review vs auto-approve) in >= 95% of cases | False-negative handoff: critical hallucination not routed to human review | Compare [HANDOFF_REQUIRED] output to expected routing label; measure recall on critical cases |
Citation Gap Detection | All outputs with missing or fabricated citations are flagged when [CITATION_REQUIRED] is true | Output passes validation but contains a citation to a non-existent source or page | Spot-check citation URLs and document references against source index; verify existence |
Confidence Score Calibration | Low-confidence outputs (< 0.7) correlate with actual errors in >= 85% of cases | High-confidence outputs (> 0.9) contain major or critical hallucinations | Bin outputs by [CONFIDENCE_SCORE]; measure error rate per bin; flag bins where error rate exceeds confidence complement |
Evidence Grounding Completeness | Every factual claim in the output maps to at least one source passage when [EVIDENCE_PROVIDED] is true | Claim present in output with no corresponding source passage or with contradictory source | Extract claims from output; run claim-to-source alignment check; flag ungrounded claims |
Refusal vs Escalation Boundary | System escalates rather than refuses when policy requires human review; refuses when policy prohibits response | System refuses a request that should have been escalated to human review, or escalates a request that should have been refused | Test boundary cases from policy document; verify [ESCALATION_REQUIRED] and [REFUSAL_REQUIRED] flags match policy |
Output Schema Compliance | Output parses as valid JSON matching [OUTPUT_SCHEMA] with all required fields present | Missing required field, wrong type, or unparseable JSON in >= 1% of test cases | Schema validation on every test output; reject on parse failure or missing required fields |
Latency Under Load | Classification completes within [MAX_LATENCY_MS] for 99th percentile of requests | P99 latency exceeds threshold by > 20% in production shadow traffic | Load test with production-representative input distribution; measure P50, P95, P99 latency |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Add strict schema validation, retry logic (max 2 retries with error feedback), structured logging for every classification, and a golden eval set of 50+ labeled hallucination examples across all severity levels. Wire the output into a review queue system where critical and high severity automatically create human review tickets.
Prompt modification
- Add
[OUTPUT_SCHEMA]with required fields:claim_id,severity,hallucination_type,evidence_gap,recommended_action,confidence_score. - Add
[CONSTRAINTS]: "If confidence_score < 0.7, set severity to 'uncertain' and route to human review." - Include
[CITATION_REQUIREMENTS]: "For each claim, cite the specific source passage that supports or contradicts it."
Watch for
- Silent format drift where the model drops
evidence_gapon low-severity items. - Retry loops masking systematic misclassification.
- Review queue overload from false-positive critical classifications.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us