Use this prompt when you have a generated answer and the retrieved context that was used to produce it, and you need a structured, claim-level audit of how well the evidence supports each statement. The ideal user is an AI engineer or QA pipeline builder who already has a working RAG system and needs automated grounding verification before answers reach users or downstream systems. This prompt is not for initial answer generation, retrieval quality assessment, or deciding whether to answer at all—it assumes an answer already exists and focuses exclusively on mapping claims back to source evidence.
Prompt
Answer Support Level Classification Prompt Template

When to Use This Prompt
Determine whether the Answer Support Level Classification prompt fits your QA pipeline's verification stage and risk tolerance.
The prompt works best in pipelines where factual accuracy is non-negotiable: clinical decision support, legal research, compliance documentation, financial analysis, and technical support where wrong answers carry real cost. It requires the retrieved context to be passed alongside the answer, and it expects the context to be the same evidence the model used during generation. If your pipeline modifies or summarizes context before generation, pass the original retrieved chunks, not the compressed version. The classification tiers—fully supported, partially supported, inferred, and unsupported—give downstream systems enough granularity to decide whether to publish, flag for review, or block the answer entirely.
Do not use this prompt when you need a single overall confidence score rather than per-claim grounding. For that, use the Confidence Threshold Evaluation or Answer Certainty Calibration prompts. Do not use it when the primary goal is to decide whether to answer at all—that's the Answer Abstention Decision or Pre-Answer Sufficiency Check prompts. Avoid this prompt in low-latency user-facing chat where per-claim classification adds unacceptable delay; reserve it for asynchronous verification, batch evaluation, or guardrail pipelines that run after generation but before delivery. Always pair this prompt with human review for high-risk domains, and run periodic spot checks comparing its classifications against manual annotation to catch drift in grounding judgments.
Use Case Fit
Where this prompt works, where it fails, and the operational prerequisites for production use.
Good Fit: Granular QA Auditing
Use when: You need a per-claim audit trail linking generated statements to source evidence. Guardrail: The prompt excels at structured decomposition; pair it with a downstream verification step that flags 'unsupported' claims for human review.
Bad Fit: Real-Time Chat
Avoid when: Latency budgets are under 500ms or the user expects a single conversational reply. Guardrail: This is an offline or asynchronous audit step. Do not insert it into the critical path of a streaming chat response.
Required Inputs
What to watch: The prompt requires both a generated answer and the exact retrieved context that was used to produce it. Guardrail: Implement a strict schema check that rejects requests missing either field before the model call is made.
Operational Risk: Context-Answer Drift
What to watch: If the answer was generated with a different context window than the one provided for classification, support levels will be inaccurate. Guardrail: Log the context hash alongside the answer in your application state to ensure audit integrity.
Operational Risk: Ambiguous 'Inferred' Claims
What to watch: The 'inferred' category can become a dumping ground for borderline claims, reducing audit usefulness. Guardrail: Add a secondary prompt or rule-based check that requires explicit logical steps for any claim classified as 'inferred'.
Variant: Binary Pass/Fail
Use when: You only need a simple 'supported' or 'unsupported' decision per claim. Guardrail: Collapse the output schema to a boolean flag to reduce token costs and classification ambiguity in high-volume pipelines.
Copy-Ready Prompt Template
A reusable prompt template for classifying each claim in a generated answer against retrieved context into support levels.
This template is the core of the Answer Support Level Classification workflow. It takes a generated answer and the retrieved context that was used to produce it, then decomposes the answer into individual claims and classifies each one. The output is a structured audit that downstream systems can use for verification, logging, or triggering human review. The template uses square-bracket placeholders for all variable inputs so you can drop it directly into your prompt assembly pipeline.
textYou are an evidence auditor. Your job is to compare a generated answer against the provided retrieved context and classify every factual claim in the answer. ## INPUT **Generated Answer:** [ANSWER] **Retrieved Context (numbered passages):** [CONTEXT] ## INSTRUCTIONS 1. Decompose the generated answer into discrete factual claims. A claim is any statement that asserts something true about the world, including entities, events, dates, quantities, relationships, or properties. 2. For each claim, search the retrieved context for evidence that supports or contradicts it. 3. Classify each claim into exactly one of these categories: - **fully_supported**: The context contains explicit, unambiguous evidence for the claim. Quote the supporting passage. - **partially_supported**: The context supports some but not all aspects of the claim, or supports it with qualifications. Explain what is and isn't covered. - **inferred**: The context does not directly state the claim, but a reasonable reader would infer it from the available evidence. Explain the inference chain. - **unsupported**: No evidence in the context supports the claim, or the context contradicts it. If contradicted, mark as 'contradicted' and quote the conflicting passage. 4. If the answer contains no factual claims (e.g., it is purely procedural, a refusal, or a clarification question), return an empty claims array. ## CONSTRAINTS - Do not classify claims based on your own knowledge. Only use the provided retrieved context. - If a claim is partially supported, you must specify which part is unsupported. - If multiple context passages are relevant, cite all of them. - If the context is empty or irrelevant, classify all claims as 'unsupported'. - Do not modify or rephrase the claims. Quote them verbatim from the answer. ## OUTPUT SCHEMA Return a JSON object with this exact structure: { "answer_id": "string or null", "claims": [ { "claim_text": "verbatim claim from answer", "classification": "fully_supported | partially_supported | inferred | unsupported", "supporting_context_ids": ["passage-1", "passage-3"], "supporting_quotes": ["relevant quote from context"], "explanation": "why this classification was assigned", "contradicted": false, "contradicting_quote": null } ], "summary": { "total_claims": 0, "fully_supported": 0, "partially_supported": 0, "inferred": 0, "unsupported": 0, "contradicted": 0 } } ## EXAMPLES **Example 1: Fully Supported Claim** Context: "Acme Corp was founded in 2012 by Jane Smith. The company is headquartered in Austin, Texas." Answer: "Acme Corp was founded in 2012." Output claim: { "claim_text": "Acme Corp was founded in 2012.", "classification": "fully_supported", "supporting_context_ids": ["passage-1"], "supporting_quotes": ["Acme Corp was founded in 2012 by Jane Smith."], "explanation": "The context explicitly states the founding year.", "contradicted": false, "contradicting_quote": null } **Example 2: Inferred Claim** Context: "The product launch event is scheduled for March 15. All senior executives will attend." Answer: "The CEO will be at the product launch." Output claim: { "claim_text": "The CEO will be at the product launch.", "classification": "inferred", "supporting_context_ids": ["passage-1"], "supporting_quotes": ["All senior executives will attend."], "explanation": "A CEO is typically a senior executive, so their attendance can be inferred, but the context does not name the CEO explicitly.", "contradicted": false, "contradicting_quote": null } **Example 3: Unsupported / Contradicted Claim** Context: "The software license costs $500 per user per year." Answer: "The software license is free for academic use." Output claim: { "claim_text": "The software license is free for academic use.", "classification": "unsupported", "supporting_context_ids": [], "supporting_quotes": [], "explanation": "The context states a price of $500 per user per year with no mention of academic pricing or free tiers.", "contradicted": true, "contradicting_quote": "The software license costs $500 per user per year." }
To adapt this template for your pipeline, replace [ANSWER] with the generated answer text and [CONTEXT] with your retrieved passages, each prefixed with an ID like passage-1. If your RAG system already includes source metadata, add a [SOURCE_METADATA] placeholder and adjust the output schema to include source titles or URLs. For high-stakes domains such as healthcare or legal, add a [RISK_LEVEL] placeholder that gates whether inferred claims should be treated as unsupported for safety. Always validate the output JSON against the schema before passing it downstream—malformed JSON or missing claim_text fields are common failure modes when the model attempts to summarize rather than quote verbatim.
Prompt Variables
Required inputs for the Answer Support Level Classification prompt. Each variable must be populated before the prompt is assembled and sent to the model. Missing or malformed inputs are the most common cause of classification errors.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[GENERATED_ANSWER] | The full answer text produced by the RAG system that needs claim-level grounding audit | The patient should take 50mg of metformin daily with food. This dosage may be adjusted based on kidney function. | Must be non-empty string. If answer is null or empty, skip classification and return empty claims array |
[RETRIEVED_CONTEXT] | The set of source passages retrieved to support the answer, with source identifiers | SOURCE_A: Metformin is typically prescribed at 500mg-2000mg daily. SOURCE_B: Renal function should be monitored before dose adjustment. | Must contain at least one source passage. If empty, all claims default to 'unsupported'. Validate source IDs are unique |
[CLAIM_EXTRACTION_METHOD] | Instruction for how to segment the answer into discrete verifiable claims before classification | Split by sentence, then further split compound claims at conjunctions. Each claim must be independently verifiable. | Must produce a list of atomic claims. Test that no claim contains multiple factual assertions that could have different support levels |
[SUPPORT_LEVEL_DEFINITIONS] | Precise definitions for each classification tier with boundary examples | FULLY_SUPPORTED: All facts in the claim appear verbatim or are directly entailed by context. PARTIALLY_SUPPORTED: Some but not all facts are grounded. | Definitions must be mutually exclusive. Test edge cases where claims straddle two tiers. Include counterexamples for each tier |
[INFERENCE_RULES] | Rules governing when a claim can be classified as 'inferred' versus 'unsupported' | Inference allowed for standard medical calculations only. Do not infer missing dosage values or contraindications. | Must specify which inference types are permitted. If null, no claims may be classified as 'inferred'. Test that inference boundaries are respected |
[OUTPUT_SCHEMA] | The exact JSON schema each claim classification must follow | {"claim_text": string, "support_level": enum, "source_ids": string[], "rationale": string, "confidence": float} | Validate schema compliance on every response. Check that source_ids reference actual context sources. Confidence must be 0.0-1.0 |
[ABSTENTION_CONDITIONS] | Rules for when the classifier should refuse to classify rather than guess | If context is contradictory on a claim, mark as 'unsupported' and note conflict. If context is ambiguous, mark confidence below 0.7. | Must define thresholds for 'ambiguous' and 'contradictory'. Test with deliberately conflicting context passages to verify conflict detection |
Common Failure Modes
Classification prompts that audit answer support often fail in predictable ways. These cards cover the most common failure modes for the Answer Support Level Classification template and how to prevent them in production.
Overly Generous 'Fully Supported' Labels
What to watch: The model classifies claims as 'fully supported' when the context only implies or loosely relates to the claim. This happens when the prompt lacks strict verbatim evidence requirements. Guardrail: Add an explicit rule requiring direct quote alignment. Use few-shot examples that show 'partially supported' for claims missing key entities or quantities present in the context.
Misclassifying Inference as Fabrication
What to watch: The model labels logically necessary inferences as 'unsupported' because the exact statement does not appear verbatim. This inflates false-positive unsupported rates and erodes trust in the audit. Guardrail: Define 'inferred' with clear criteria: the claim must be a necessary logical consequence of context statements. Include counterexamples where plausible but non-necessary inferences are correctly labeled 'unsupported.'
Claim Boundary Drift During Extraction
What to watch: The model merges multiple claims into one or splits atomic claims inconsistently, making per-claim classification unreliable. A single 'partially supported' label on a merged claim hides an unsupported sub-claim. Guardrail: Pre-process the answer with a dedicated claim extraction step before classification. Validate that each extracted claim is atomic and independently verifiable. Use a separate prompt for extraction to avoid task interference.
Context Window Truncation Silently Drops Evidence
What to watch: When retrieved context plus the answer exceed the model's context window, evidence is truncated from the middle or end. The model classifies claims as 'unsupported' because it never saw the supporting passage. Guardrail: Measure token counts before classification. If context exceeds a safe threshold, chunk the audit into multiple passes or use a longer-context model. Log truncation warnings explicitly in the output.
Hallucinated Citations in the Audit Itself
What to watch: The model fabricates source references or invents context snippets to justify a classification. This is especially dangerous because the audit output is trusted as a guardrail. Guardrail: Require the model to quote the exact context passage for each classification. Post-process audit output to verify that quoted strings exist in the original context. Flag any classification where the quoted evidence cannot be found.
Position Bias Skews Classification Consistency
What to watch: Claims appearing first or last in the answer receive different classification treatment than those in the middle. The model may be more lenient on early claims or more critical of later ones. Guardrail: Randomize claim order before classification when possible. Run a consistency check by reclassifying a sample of claims in different positions and measuring agreement. If variance exceeds a threshold, flag the batch for human review.
Evaluation Rubric
Criteria for evaluating the quality and correctness of the Answer Support Level Classification output before integrating it into a production pipeline. Each criterion maps to a pass standard, a failure signal, and a concrete test method.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Claim Extraction Completeness | Every distinct factual assertion in [GENERATED_ANSWER] is extracted as a separate claim in the output array. | A factual statement from the answer is missing from the claims list, or two distinct claims are merged into one. | Manual spot-check: compare the generated answer sentence-by-sentence against the output claims list. Automate with an LLM-as-Judge pairwise comparison. |
Support Level Accuracy | Each claim's support level ('fully_supported', 'partially_supported', 'inferred', 'unsupported') is correct based on the provided [RETRIEVED_CONTEXT]. | A claim is labeled 'fully_supported' but the context only implies it, or a claim is labeled 'unsupported' when a direct quote exists. | Create a golden dataset of 20 (answer, context, claim, correct_label) tuples. Measure exact match accuracy; require >90%. |
Evidence Citation Format | For 'fully_supported' and 'partially_supported' claims, the 'source_excerpts' field contains at least one verbatim quote from [RETRIEVED_CONTEXT] that directly supports the claim. | The 'source_excerpts' field is empty, contains a paraphrased string not present in the context, or cites a source that does not contain the claim. | Parse the output JSON. For each supported claim, run a substring check to verify the excerpt exists in [RETRIEVED_CONTEXT]. Flag any missing matches. |
Unsupported Claim Justification | For 'unsupported' claims, the 'gap_reason' field provides a specific, non-generic explanation of what information is missing from [RETRIEVED_CONTEXT]. | The 'gap_reason' is a generic statement like 'Information not found' or repeats the claim without explaining the gap. | Review all 'unsupported' claims. Use an LLM evaluator to check if the 'gap_reason' references specific missing entities, facts, or document sections from the context. |
Output Schema Validity | The output is a valid JSON object containing an array of claim objects, each with the required fields: 'claim_text', 'support_level', 'source_excerpts', and 'gap_reason'. | The output is not valid JSON, is missing the top-level array, or individual claim objects are missing required fields. | Validate the raw model output against a strict JSON Schema definition. Reject any output that fails schema validation. |
Hallucination Resistance | The output does not introduce any new facts, entities, or claims that are not present in either the [GENERATED_ANSWER] or the [RETRIEVED_CONTEXT]. | A 'source_excerpt' is fabricated, or a 'gap_reason' invents a fact about the context that is not true. | For each 'source_excerpt', verify it is a substring of [RETRIEVED_CONTEXT]. For each 'gap_reason', use an NLI model to check if it is entailed by the context; flag any neutral or contradictory statements. |
Inferred Claim Handling | Claims labeled 'inferred' are logical conclusions that can be reasonably drawn from the context but are not explicitly stated, and the 'source_excerpts' field contains the supporting premises. | An 'inferred' claim is actually a direct quote (should be 'fully_supported'), or it is a logical leap with no supporting premises provided. | Review all 'inferred' claims. A human evaluator or a strong LLM judge must confirm that the provided premises logically support the conclusion and that the claim is not verbatim in the context. |
Implementation Harness Notes
How to wire the Answer Support Level Classification prompt into a production QA pipeline with validation, retries, and human review gates.
This prompt is designed to sit after answer generation and before the answer reaches a user or downstream system. It acts as a claim-level grounding audit, classifying each atomic claim in a generated answer as fully_supported, partially_supported, inferred, or unsupported against the retrieved context. The harness must first extract discrete claims from the answer (either via a separate extraction step or by instructing this prompt to perform extraction and classification in one pass), then feed each claim alongside the full retrieved context and the original user question. The output is a structured JSON array of claim objects, each with a claim_text, support_level, evidence_citation, and rationale.
Validation and retries: Parse the JSON output and validate that every claim in the answer is accounted for and that support_level is one of the four allowed enum values. If the output is malformed, retry once with a stricter schema instruction appended to the prompt. If unsupported claims exceed a configured threshold (start with 30% of total claims), route the answer to a human review queue rather than publishing it. Log every classification result with the answer ID, claim index, support level, and rationale for offline eval analysis. For high-stakes domains (healthcare, legal, finance), require human sign-off on any answer containing unsupported or inferred claims before it reaches the user.
Model choice and latency: This classification task benefits from models with strong instruction-following and structured output capabilities. GPT-4o, Claude 3.5 Sonnet, and Gemini 1.5 Pro are good starting points. Expect 1-3 seconds of latency per answer depending on claim count. If latency is critical, batch multiple answers in a single request or use a smaller model (e.g., Claude 3 Haiku) with stricter output validation. Tool integration: Wire the classification result into your observability stack—tag traces with support_level distributions and set alerts when the unsupported ratio spikes above baseline. This turns the prompt from a one-off check into a continuous quality signal.
What to avoid: Do not use this prompt as a substitute for retrieval quality improvements. If unsupported rates are consistently high, fix retrieval before adding more classification gates. Do not treat inferred as equivalent to unsupported—inference from context is often legitimate, but it requires separate tracking. Finally, never expose raw classification output to end users; the audit is for internal quality control and routing decisions, not a user-facing feature.
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
Start with the base prompt and a small set of 10-20 QA pairs. Use a single [SUPPORT_LEVELS] enum: fully_supported, partially_supported, inferred, unsupported. Keep the output schema flat—one JSON object per claim with claim_text, support_level, and evidence_citation. Run manually and spot-check.
Prompt modification
codeClassify each claim in [ANSWER] against [CONTEXT] using these levels: [SUPPORT_LEVELS]. Output JSON array with fields: claim_text, support_level, evidence_citation.
Watch for
- Claims split inconsistently across runs
- Vague citations like 'the document says'
- Inferred claims marked as fully supported

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