This prompt is designed for QA engineers and eval pipeline builders who need automated, claim-level fact-checking of RAG-generated answers before they reach users. It decomposes a generated answer into individual factual claims, then verifies each claim against the provided source passages. The output is a structured verdict per claim (supported, partially supported, contradicted, or no evidence) with exact evidence spans and a rationale. Use this prompt when you need granular, auditable verification rather than a single pass/fail score. It belongs in post-generation guardrail pipelines, regression test suites, and any workflow where unsupported claims must be caught and traced back to specific answer fragments.
Prompt
Claim-by-Claim Source Verification Prompt Template

When to Use This Prompt
Understand the ideal use cases, required inputs, and critical limitations of the claim-by-clain verification prompt.
This prompt requires two non-negotiable inputs: the full text of the generated answer and the complete set of retrieved source passages that were used to produce it. Without both, the verification is meaningless. The prompt is most effective when the source passages are chunked with stable identifiers (document IDs, chunk indices) so the output can reference exact evidence locations. It is not a replacement for retrieval quality monitoring—if the retriever failed to surface relevant documents, this prompt will correctly flag claims as unsupported, but the root cause is a retrieval gap, not a generation hallucination. For high-stakes domains (healthcare, legal, finance), always route outputs flagged as 'contradicted' or 'no evidence' to human review before any downstream action.
Do not use this prompt as a real-time guardrail in latency-sensitive user-facing flows unless you have budgeted for the additional model call. Claim decomposition plus per-claim verification is token-intensive and adds measurable latency. For real-time use, consider a lighter-weight pre-filter like the Zero-Evidence Claim Flagging Prompt first, then escalate ambiguous cases to this full verification prompt. Also avoid using this prompt when the answer contains primarily subjective or opinion-based content—the verification framework assumes factual claims that can be matched against evidence. For subjective content, use a different evaluation rubric. After running this prompt, always log the structured output alongside the answer and source passages for audit trails and regression testing.
Use Case Fit
Where the Claim-by-Claim Source Verification prompt works, where it fails, and the operational conditions required for safe deployment.
Good Fit: Post-Generation QA Gates
Use when: You need an automated, structured audit of every factual claim in a generated answer before it reaches a user. Guardrail: Run this prompt as a synchronous gate in your inference pipeline; block or flag answers that contain unsupported claims.
Bad Fit: Real-Time Chat Without Latency Budget
Avoid when: Users expect sub-second streaming responses and you cannot afford an additional LLM call for verification. Guardrail: Use a lightweight, rule-based check (e.g., citation presence) for real-time paths and reserve this prompt for async or high-stakes review queues.
Required Inputs: Atomic Claims and Source Passages
Risk: The prompt fails silently if the input is a monolithic answer without pre-extracted claims. Guardrail: Pre-process the generated answer with a claim decomposition step before calling this verification prompt. Always provide the full source context alongside each claim.
Operational Risk: Verification Latency Cascades
Risk: Adding a claim-by-claim verification step doubles end-to-end latency, causing timeouts in user-facing applications. Guardrail: Set a strict timeout (e.g., 10 seconds) for the verification call. If it times out, log the failure and route the answer to a human review queue rather than dropping it silently.
Operational Risk: False Positives on Legitimate Paraphrase
Risk: The verifier flags faithful synthesis as unsupported because the wording differs from the source. Guardrail: Calibrate the prompt with few-shot examples that distinguish legitimate paraphrase from fabrication. Run a regression suite of known faithful paraphrases before deploying a new version.
Operational Risk: Source Chunk Boundary Issues
Risk: A claim is supported by a passage that was split across retrieval chunks, causing the verifier to miss the evidence. Guardrail: Ensure source passages provided to the verifier include overlap windows or are reconstructed from the original document. Log cases where the verifier flags a claim but a human reviewer later confirms it was supported.
Copy-Ready Prompt Template
A reusable prompt that decomposes an answer into individual claims and verifies each against source passages, producing a structured verdict per claim.
This template is the core instruction set for your claim-by-claim verification pipeline. It instructs the model to first extract discrete, testable claims from a generated answer, then evaluate each claim against the provided source passages. The output is a structured JSON array where every claim receives a verdict, a supporting evidence span, and a confidence indicator. Copy the template below, replace the square-bracket placeholders with your actual inputs, and wire it into your evaluation harness.
textYou are a factual verification engine. Your task is to decompose a generated answer into individual claims, then verify each claim against the provided source passages. ## INPUT - Generated Answer: [ANSWER_TEXT] - Source Passages: [SOURCE_PASSAGES] - Verification Threshold: [THRESHOLD] - Output Schema: [OUTPUT_SCHEMA] ## INSTRUCTIONS 1. **Claim Extraction**: Read the generated answer and decompose it into a list of discrete, testable factual claims. Each claim must be a self-contained statement that can be verified independently. Ignore opinions, stylistic language, and transitional phrases. Output exactly one claim per item. 2. **Source Verification**: For each claim, search the provided source passages for evidence that supports, contradicts, or is silent on the claim. A claim is "SUPPORTED" only if the source passage explicitly states the same fact. A claim is "CONTRADICTED" if a source passage explicitly states the opposite. A claim is "NO_EVIDENCE" if no source passage addresses it. 3. **Evidence Span**: For SUPPORTED and CONTRADICTED verdicts, quote the exact source text that provides the evidence. Include the source passage identifier if available. 4. **Confidence**: Assign a confidence score from 0.0 to 1.0 reflecting how certain the verdict is. Use 1.0 only when the evidence is unambiguous and directly on point. 5. **Abstention**: If the generated answer contains no testable factual claims, return an empty claims array with a note explaining why. ## OUTPUT FORMAT Return a JSON object with the following structure: { "claims": [ { "claim_id": "string", "claim_text": "string", "verdict": "SUPPORTED | CONTRADICTED | NO_EVIDENCE", "evidence_span": "string | null", "source_id": "string | null", "confidence": number, "rationale": "string" } ], "summary": { "total_claims": number, "supported_count": number, "contradicted_count": number, "no_evidence_count": number, "overall_support_ratio": number } } ## CONSTRAINTS - Do not fabricate evidence. If no source supports a claim, the verdict must be NO_EVIDENCE. - Do not merge claims. Each claim must be a single, atomic fact. - Do not skip claims. Every factual statement in the answer must appear in the claims array. - If the source passages are empty or insufficient, set all verdicts to NO_EVIDENCE and note the condition in the summary.
To adapt this template, replace [ANSWER_TEXT] with the generated answer your system produced, and [SOURCE_PASSAGES] with the retrieved context chunks, each labeled with a source identifier. Set [THRESHOLD] to the minimum confidence score your pipeline will accept before flagging a claim for human review. Replace [OUTPUT_SCHEMA] with your application's expected JSON structure if it differs from the default. For high-stakes domains like clinical or legal verification, add a [RISK_LEVEL] placeholder that triggers stricter confidence thresholds and mandatory human review for any CONTRADICTED or NO_EVIDENCE verdicts. Always run the output through a JSON schema validator before ingesting it into downstream systems, and log every verification result alongside the prompt version and model identifier for auditability.
Prompt Variables
Inputs the prompt needs to work reliably. Validate these before sending the prompt.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[ANSWER] | The full generated answer text to be decomposed into claims for verification. | The new tax law increases the standard deduction by 15%, which will benefit middle-income families. | Must be a non-empty string. Check length < model context window minus prompt overhead. Null or empty string should abort the pipeline. |
[SOURCES] | The retrieved source passages or documents that serve as the ground truth for verification. | Source A: Section 3 of the Tax Reform Act states the standard deduction increases by 15% for the 2025 tax year. | Must be a non-empty array of source objects, each with text and source_id fields. Validate that source_id values are unique and text fields are non-empty. If empty, the verification cannot proceed. |
[CLAIM_SCHEMA] | The JSON schema defining the structure of each extracted claim object. | {"claim_text": "string", "claim_span": [start_char, end_char]} | Must be a valid JSON schema. Validate that required fields include claim_text and claim_span. Schema must be parseable by JSON.parse without errors. |
[VERDICT_OPTIONS] | The controlled vocabulary of verdict labels the model can assign to each claim. | ["SUPPORTED", "PARTIALLY_SUPPORTED", "UNSUPPORTED", "CONTRADICTED"] | Must be a non-empty array of unique strings. Validate that the model's output only uses these exact labels. Any deviation is a schema violation and should trigger a retry or repair step. |
[EVIDENCE_SPAN_REQUIREMENT] | A boolean flag controlling whether the model must extract the exact supporting or contradicting text span from the source. | Must be true or false. If true, validate that every SUPPORTED or CONTRADICTED verdict includes a non-null evidence_span field. If false, evidence_span can be null. | |
[CONFIDENCE_THRESHOLD] | The minimum confidence score a claim must have to be included in the output. Claims below this threshold are dropped. | 0.7 | Must be a float between 0.0 and 1.0. Validate that all output claims have a confidence score >= this value. If null, no threshold filtering is applied. |
[MAX_CLAIMS] | The maximum number of claims the model should extract from the answer to control cost and latency. | 20 | Must be a positive integer. Validate that the output array length does not exceed this value. If the answer is long, consider chunking before verification. |
Implementation Harness Notes
How to wire the claim-by-claim verification prompt into an automated QA pipeline with validation, retries, and human review gates.
The Claim-by-Claim Source Verification Prompt Template is designed to operate as a post-generation gate within a RAG pipeline, not as a standalone chat interaction. After the primary model generates an answer, the application should extract that answer along with the full set of retrieved source passages and pass them into this verification prompt. The prompt decomposes the answer into discrete claims and verifies each against the provided context. The structured output—a list of claims with verdicts and supporting evidence spans—becomes the input to downstream decision logic: pass the answer to the user, block it, flag it for review, or trigger a regeneration with stricter grounding instructions.
To integrate this prompt into a production system, wrap it in a validation layer that enforces the expected output schema before the verdict is trusted. The prompt should return a JSON object with a claims array where each element contains claim_text, verdict (one of SUPPORTED, PARTIALLY_SUPPORTED, UNSUPPORTED, CONTRADICTED), source_evidence_spans (array of exact text excerpts from the provided context), and rationale. Implement a schema validator that rejects malformed responses and triggers a retry with the same inputs and a stronger format reminder. If the validator fails three times, escalate the answer to a human review queue rather than silently passing it. Log every verification result—including the raw model output, validation errors, and retry count—so that prompt drift and model behavior changes become observable over time.
For high-stakes domains such as healthcare, legal, or financial compliance, add a severity classifier after claim verification. Claims marked UNSUPPORTED or CONTRADICTED should be scored by a secondary prompt that classifies the hallucination severity as CRITICAL, MODERATE, or MINOR. Configure your release gate so that any answer containing a CRITICAL hallucination is automatically blocked and routed for human review, while MINOR unsupported claims in non-regulated contexts may be surfaced to users with an uncertainty disclaimer. This tiered approach prevents the verification prompt from becoming a binary pass/fail switch that either blocks too aggressively or lets dangerous content through. Always run the verification prompt on the final answer text that the user would see—not on an intermediate draft—to catch hallucinations introduced during formatting or post-processing steps.
Expected Output Contract
Define the exact shape, types, and validation rules for the verification output. Use this contract to build downstream parsers, eval checks, and retry logic.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
verification_id | string (UUID v4) | Must parse as a valid UUID v4. Reject if missing or malformed. | |
claim_index | integer | Must be a non-negative integer matching the 0-based index of the claim in the input [CLAIMS_LIST]. | |
claim_text | string | Must exactly match the text span from the input [CLAIMS_LIST] at claim_index. Perform strict string equality check. | |
verdict | enum: SUPPORTED | PARTIALLY_SUPPORTED | CONTRADICTED | UNSUPPORTED | Must be one of the four defined enum members. Reject any other value. | |
source_evidence | array of objects | Must be a JSON array. If empty, verdict must be UNSUPPORTED. Each object must contain source_id (string) and evidence_span (string). | |
confidence_score | number (float 0.0-1.0) | Must be a float between 0.0 and 1.0 inclusive. If verdict is UNSUPPORTED, score must be 0.0. | |
rationale | string | Must be a non-empty string (min 10 characters). Must reference specific evidence or explain the absence of evidence. | |
needs_human_review | boolean | Must be true if verdict is CONTRADICTED or confidence_score is less than [CONFIDENCE_THRESHOLD]. Otherwise false. |
Common Failure Modes
What breaks first when verifying claims against source evidence and how to guard against it in production.
Claim Decomposition Misses Implicit Assertions
What to watch: The model extracts only explicit, standalone claims but misses assertions embedded in comparisons, negations, or implied causality. A sentence like 'Unlike X, Y uses Z' contains two claims but often yields one. Guardrail: Add few-shot examples targeting compound sentences, negations, and comparative statements. Validate recall by comparing extracted claim count against a human-annotated sample set.
Source-Answer Semantic Drift
What to watch: The verifier marks a claim as supported because it shares keywords with a source passage, but the semantic meaning has shifted. For example, 'reduces latency by 40%' in the answer vs. 'improves performance by up to 40%' in the source. Guardrail: Require the verifier to output both the matched source span and a one-sentence rationale explaining why the span supports the claim. Flag verdicts where the rationale is circular or keyword-based.
Verifier Leniency on Ambiguous Evidence
What to watch: When source evidence is vague or hedged, the verifier defaults to 'supported' rather than flagging the gap. Phrases like 'may improve' in the source become 'improves' in the answer, and the verifier lets it pass. Guardrail: Add an explicit instruction: If the source uses hedging language (may, might, could, suggests) but the claim states the fact definitively, mark the claim as PARTIALLY_SUPPORTED and note the hedging gap.
Citation Fabrication Detection Failure
What to watch: The verifier checks whether a claim is supported by any provided evidence, but fails to check whether the specific citation attached to the claim actually contains the supporting text. A real document is cited for a claim it doesn't make. Guardrail: Add a cross-reference step: For each claim with an inline citation, verify that the cited document ID matches the source passage you used to support your verdict. If the supporting passage comes from a different document, flag the citation as MISATTRIBUTED.
Claim Extraction Over-Splitting
What to watch: The decomposition step breaks a single factual assertion into multiple atomic claims that are individually unverifiable. 'The system processes 500 requests per second with 99.9% uptime' becomes two claims where the uptime claim loses the throughput context. Guardrail: Add a constraint: Each extracted claim must be independently verifiable against source text. If splitting a sentence produces claims that cannot stand alone, keep them together as a compound claim.
Silent Evidence Exhaustion in Multi-Document Verification
What to watch: When verifying against many documents, the verifier stops checking after finding one supporting passage and ignores contradictory evidence in other documents. A claim appears supported but is actually disputed across the corpus. Guardrail: Add a cross-document check: After finding supporting evidence, scan the remaining documents for contradictory passages. If contradiction exists, mark the claim as DISPUTED and include both the supporting and contradicting source spans.
Evaluation Rubric
Use this rubric to build automated eval checks or manual review criteria for the Claim-by-Claim Source Verification Prompt Template. Each row defines a pass/fail standard, a detectable failure signal, and a test method suitable for CI/CD pipelines or human QA workflows.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Claim Completeness | All factual assertions in [GENERATED_ANSWER] are decomposed into discrete claims in the output | A factual statement present in the answer is missing from the claims list | Compare the set of extracted claims against a human-annotated gold set for the same answer; measure recall |
Claim Atomicity | Each extracted claim contains exactly one verifiable proposition | A single claim string contains multiple distinct facts joined by 'and' or 'also' | Parse output with a delimiter split; flag any claim string containing coordinating conjunctions linking independent clauses |
Source Evidence Span Accuracy | Each verified claim includes a [SOURCE_EVIDENCE] span that directly and unambiguously supports the claim | The provided evidence span is irrelevant, contradicts the claim, or is truncated mid-sentence | Automated check: verify that the evidence span string is a substring of the provided [CONTEXT] and run an NLI model to check entailment |
Verdict Classification Accuracy | Each claim is assigned the correct verdict: SUPPORTED, CONTRADICTED, or UNVERIFIABLE | A claim with clear supporting evidence is marked UNVERIFIABLE, or a contradicted claim is marked SUPPORTED | Compare verdicts against a human-labeled test set; calculate precision and recall per verdict class |
Unverifiable Claim Handling | Claims for which [CONTEXT] contains no supporting or contradicting evidence are correctly marked UNVERIFIABLE with a null evidence span | An unverifiable claim is assigned fabricated evidence or incorrectly marked SUPPORTED | Assert that evidence_span is null when verdict is UNVERIFIABLE; flag any non-null span for UNVERIFIABLE claims in automated validation |
Output Schema Compliance | The output is valid JSON matching the defined schema with all required fields present | The output is missing required fields, contains extra fields, or is not parseable JSON | Validate output against a JSON Schema definition; reject any response that fails structural validation before content checks |
Hallucinated Source Attribution | No claim is attributed to a source document or passage that does not exist in [CONTEXT] | A claim's evidence span references a document ID, quote, or section not present in the provided context | Cross-reference all document IDs or quoted strings in evidence spans against the input [CONTEXT]; flag any mismatch |
Precision-Recall Balance | The system achieves >= 0.90 precision and >= 0.85 recall on claim extraction against a held-out test set | Precision drops below 0.85 (too many spurious claims) or recall drops below 0.80 (missing real claims) | Run the prompt against a curated test set of 50+ answer-context pairs with known claims; calculate precision and recall using automated string matching |
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 a strict JSON schema for the output, including required fields: claim_id, claim_text, verdict (enum: SUPPORTED, PARTIALLY_SUPPORTED, UNSUPPORTED, CONTRADICTED), evidence_spans (array of exact quotes), rationale. Implement retry logic with schema validation. Log every verification call with the prompt version, input claims, and output for traceability.
Prompt modification
Append to the system prompt: You must output valid JSON matching the provided schema exactly. If a claim cannot be verified due to insufficient evidence, set verdict to UNSUPPORTED and provide an empty evidence_spans array. Never fabricate evidence.
Watch for
- Silent format drift where the model adds or renames fields
- Large claim batches causing truncated outputs; consider batching claims into groups of 5-10
- Evidence quotes that are paraphrased rather than exact, breaking downstream span-matching

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