Inferensys

Prompt

Claim Extraction and Source Verification Prompt

A practical prompt playbook for extracting, mapping, and verifying factual claims against source evidence in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Defines the ideal use cases, required inputs, and critical limitations for the claim extraction and source verification prompt.

This prompt is designed for accuracy-critical workflows where every factual assertion in a model's output must be traced back to a source document or explicitly flagged as unsupported. Use it as a post-generation verification step in RAG pipelines, document intelligence systems, compliance review tools, and any product where fabricated claims create unacceptable risk. The ideal user is an AI engineer or product team building a system that requires auditable, evidence-backed outputs, such as a legal document analyzer, a medical summarization tool, or a financial report generator. The core job-to-be-done is transforming a generated text and its source context into a structured, machine-readable verification report that can trigger downstream actions like regeneration, human review, or confidence scoring.

The prompt requires two critical inputs to function: the [GENERATED_TEXT] to be verified and the [SOURCE_CONTEXT] from which all supporting evidence must be drawn. Without a well-defined source context, the prompt cannot perform its core function and will correctly flag all claims as unsupported. It is not a general-purpose fact-checker for claims about the world outside the provided context, and it does not replace human review in regulated domains. For high-stakes applications in healthcare, law, or finance, the structured output from this prompt should be treated as a triage and routing mechanism, directing a human reviewer's attention to the most critical unsupported claims rather than serving as a final arbiter of truth.

Do not use this prompt when the source context is unavailable, when the generated text is purely creative or subjective, or when the cost and latency of a second verification pass are unacceptable for the use case. It is also inappropriate for real-time chat applications where a structured verification report would disrupt the user experience. Instead, consider using a constrained generation prompt like the 'Context-Only Answer Constraint Prompt Template' to prevent hallucination upfront. For production deployments, always pair this prompt with a validation harness that checks the output schema, logs verification reports for audit trails, and implements a retry budget with escalation to human review when unsupported claims persist.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Claim Extraction and Source Verification Prompt delivers value and where it creates risk. Use these cards to decide if this prompt fits your workflow before you integrate it into a production harness.

01

Good Fit: Accuracy-Critical RAG Pipelines

Use when: your product serves cited answers from retrieved documents and a single hallucinated claim can break user trust or create compliance exposure. Guardrail: run verification before the user sees the output; block or flag responses that fall below your evidence-coverage threshold.

02

Good Fit: Pre-Publication Content Review

Use when: model-generated summaries, reports, or briefs will be published or shared externally. Guardrail: treat the verification report as a release gate—require zero unsupported claims before the content leaves draft state.

03

Bad Fit: Open-Domain Creative Generation

Avoid when: the task is brainstorming, story generation, or speculative ideation where no source context exists. Guardrail: the prompt will flag nearly every statement as unsupported, creating noise without value. Use a different eval rubric for creative tasks.

04

Bad Fit: Real-Time Chat Without Retrieved Context

Avoid when: latency budget is under 500ms and no retrieval step populates source evidence. Guardrail: this prompt adds a full verification pass that doubles latency. Reserve it for async or batch workflows unless you can parallelize verification.

05

Required Inputs: Source Context Is Mandatory

Risk: without explicit source passages, the prompt cannot distinguish between model knowledge and fabrication. Guardrail: always supply the retrieved chunks, document excerpts, or reference text that the original output claimed to use. Empty context must trigger immediate abstention.

06

Operational Risk: Verification Exhaustion Loops

Risk: a response with many unsupported claims can trigger repeated regeneration cycles that never converge. Guardrail: set a hard retry budget (recommended: 2 attempts) and escalate to human review when the budget is exhausted. Log the failure pattern for prompt improvement.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt that extracts discrete factual claims from a model output, maps each claim to source evidence, and flags unsupported assertions.

This template is the core instruction set for the Claim Extraction and Source Verification workflow. It instructs the model to decompose a generated response into atomic, verifiable claims, then cross-reference each claim against the provided source context. The output is a structured verification report that downstream systems can parse, log, and act on. Replace every square-bracket placeholder with your actual data before sending this to the model. The prompt is designed to be stateless and idempotent—running it multiple times on the same input should produce a structurally identical report.

text
You are a factual accuracy auditor. Your task is to extract every discrete factual claim from the [MODEL_OUTPUT] below, verify each claim against the [SOURCE_CONTEXT], and produce a structured verification report.

## INPUT
[MODEL_OUTPUT]:
"""
[PASTE_MODEL_OUTPUT_HERE]
"""

[SOURCE_CONTEXT]:
"""
[PASTE_SOURCE_CONTEXT_HERE]
"""

## INSTRUCTIONS
1. Decompose the [MODEL_OUTPUT] into atomic, self-contained factual claims. Each claim must be a single verifiable statement. Do not group multiple facts into one claim.
2. For each claim, search the [SOURCE_CONTEXT] for direct supporting evidence. A claim is SUPPORTED only if the evidence explicitly states the fact. Inferences and implications are not sufficient.
3. Assign a verification status to each claim:
   - SUPPORTED: The claim is directly stated in the [SOURCE_CONTEXT]. Include the exact quote and its location.
   - UNSUPPORTED: The claim cannot be verified from the [SOURCE_CONTEXT]. This includes plausible inferences, background knowledge, and statements that feel true but lack explicit evidence.
   - CONTRADICTED: The claim directly conflicts with evidence in the [SOURCE_CONTEXT].
4. If no factual claims are present in the [MODEL_OUTPUT], return an empty claims array.
5. Do not evaluate the quality, style, or usefulness of the [MODEL_OUTPUT]. Only assess factual grounding.

## OUTPUT_SCHEMA
Return a JSON object with this exact structure:
{
  "verification_report": {
    "total_claims": <integer>,
    "supported_claims": <integer>,
    "unsupported_claims": <integer>,
    "contradicted_claims": <integer>,
    "claims": [
      {
        "claim_id": <integer>,
        "claim_text": "<string>",
        "status": "SUPPORTED | UNSUPPORTED | CONTRADICTED",
        "source_quote": "<string or null if unsupported>",
        "source_location": "<string or null if unsupported>",
        "contradicting_evidence": "<string or null if not contradicted>",
        "notes": "<string: brief explanation of the verification decision>"
      }
    ]
  }
}

## CONSTRAINTS
- Do not fabricate source quotes. If no evidence exists, set source_quote and source_location to null.
- Do not skip claims that seem obvious or common knowledge. Every factual statement must be checked.
- If the [SOURCE_CONTEXT] is empty or irrelevant, mark all claims as UNSUPPORTED.
- Return ONLY the JSON object. No preamble, no commentary, no markdown fences.

Adaptation guidance: The [MODEL_OUTPUT] placeholder should receive the complete text you want to audit—do not truncate or summarize it beforehand. The [SOURCE_CONTEXT] should contain the full set of retrieved passages, documents, or ground-truth data the model was supposed to use. If your system uses multiple source documents, concatenate them with clear document boundary markers (e.g., [DOC_ID: abc123]) so the verification report can reference specific locations. For high-stakes domains like healthcare or finance, add a [RISK_LEVEL] parameter that gates whether UNSUPPORTED claims trigger an automatic regeneration or a human review queue. The output schema is intentionally flat to simplify downstream parsing; if you need nested claim grouping, extend the schema but preserve the claim_id and status fields as the minimum contract.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Claim Extraction and Source Verification Prompt. Validate each placeholder before sending to prevent garbage-in-garbage-out verification failures.

PlaceholderPurposeExampleValidation Notes

[MODEL_OUTPUT]

The complete model-generated text to audit for factual claims

The Acme 3000 processor achieves 2.4x throughput improvement over the previous generation, making it the fastest chip on the market.

Must be non-empty string. Truncate if over context window. Preserve original formatting for accurate claim boundary detection.

[SOURCE_CONTEXT]

The ground-truth evidence against which claims are verified

Acme 3000 Datasheet: Single-core throughput increased 1.8x over Acme 2500. Competitor benchmarks not included in this document.

Must be non-empty string. Prefer raw source text over summaries. Validate that context actually covers the domain of [MODEL_OUTPUT] before verification.

[DOMAIN_TAXONOMY]

Domain-specific entity types, relationship labels, and claim categories for structured extraction

{"entities": ["processor", "benchmark", "generation"], "claim_types": ["performance", "comparison", "superlative"]}

Must be valid JSON object. Use null if domain-agnostic. Inject only when domain precision matters for claim classification.

[EVIDENCE_SUFFICIENCY_RULES]

Rules defining when context is sufficient to verify a claim versus when to flag as unverifiable

{"require_explicit_mention": true, "allow_numeric_inference": false, "disallow_cross_document_synthesis": true}

Must be valid JSON object. Default to strict rules: require explicit source mention, disallow inference. Loosen only with explicit risk acceptance.

[CONFIDENCE_THRESHOLD]

Minimum confidence score for treating a claim as verified rather than flagged for review

0.85

Must be float between 0.0 and 1.0. Values below 0.7 produce noisy verification. Values above 0.95 may over-flag legitimate claims. Default 0.85 for accuracy-critical workflows.

[OUTPUT_SCHEMA]

Expected structure for the verification report output

{"claims": [{"claim_text": "string", "claim_type": "string", "source_evidence": "string|null", "verification_status": "supported|unsupported|partially_supported|unverifiable", "confidence": 0.0-1.0, "correction": "string|null"}]}

Must be valid JSON schema. Validate that downstream consumers can parse this exact shape. Reject if schema includes fields the verifier cannot populate.

[MAX_CLAIMS]

Upper bound on number of claims to extract to prevent runaway extraction on long outputs

25

Must be positive integer. Default 25 for typical outputs. Increase only when [MODEL_OUTPUT] is known to contain dense factual content. Prevents cost explosion on long documents.

[ABSTENTION_POLICY]

Instruction for handling outputs where no verifiable claims exist or context is entirely insufficient

return_empty_claims_with_insufficient_context_flag

Must be one of: return_empty_claims, flag_insufficient_context, escalate_for_human_review. Choose based on downstream workflow tolerance for empty verification results.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Claim Extraction and Source Verification Prompt into a production application with validation, retries, and observability.

This prompt is designed to be called as a post-generation verification step, not a user-facing endpoint. In a typical harness, you first generate a model response (e.g., a RAG answer, a summary, or an analysis), then pass that output along with the original source context into this prompt. The prompt extracts discrete factual claims, maps each to source evidence, and flags unsupported assertions. The output is a structured verification report that your application can parse and act on programmatically.

Integration pattern: Wrap this prompt in a verification service that accepts (generated_text, source_context, claim_schema) and returns a structured payload. Validate the output against a strict JSON schema before processing. Key fields to enforce: claim_id (string), claim_text (string), source_reference (string or null), verification_status (enum: supported, unsupported, partially_supported, contradicted), evidence_excerpt (string or null), and confidence (float 0-1). If the model returns malformed JSON, use a repair prompt from the Output Repair pillar rather than retrying the verification prompt blindly. Log every verification result with a trace ID that links back to the original generation request for debugging.

Retry and escalation logic: If the verification report indicates unsupported claims above a configurable threshold (e.g., more than 10% of extracted claims are unsupported), trigger a grounded answer regeneration prompt from the Hallucination and Factual Error Self-Correction group. Pass the flagged claims and source context into that regeneration prompt. Track retry counts per request. After three regeneration attempts, if unsupported claims persist, escalate to a human review queue with the full verification report and regeneration history. Never loop indefinitely—set a hard retry budget and log exhaustion events for monitoring.

Model choice and latency: This prompt works best with models that have strong instruction-following and structured output capabilities. For high-throughput pipelines, consider routing to a smaller, faster model for initial claim extraction and a larger model only when the smaller model's confidence scores fall below a threshold. Cache verification results keyed by a hash of (generated_text, source_context) to avoid redundant verification of identical outputs. If latency is critical, run verification asynchronously and surface results in a follow-up event rather than blocking the user response.

Observability and evals: Instrument the verification pipeline with metrics: claim extraction rate, supported vs. unsupported ratio, average confidence, JSON parse failure rate, and retry escalation rate. Build an eval set of known hallucinated outputs with ground-truth verification labels. Run this eval set on every prompt change and model migration. Compare verification reports across versions to detect regression in detection accuracy. Store verification reports alongside generation logs so you can trace any user-reported hallucination back to whether the verifier caught it, missed it, or was never invoked.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the structure, types, and validation rules for the verification report produced by the Claim Extraction and Source Verification Prompt. Use this contract to build downstream parsers, validation checks, and retry logic.

Field or ElementType or FormatRequiredValidation Rule

verification_report

JSON Object

Top-level object must parse as valid JSON. Schema check required.

verification_report.report_id

String (UUID v4)

Must match UUID v4 regex. Null or malformed triggers retry.

verification_report.generated_at

String (ISO 8601 UTC)

Must parse to valid UTC datetime. Timestamp in future triggers retry.

verification_report.claims

Array of Objects

Must be non-empty array. Empty array allowed only if input contained zero factual claims.

verification_report.claims[].claim_id

String

Must be unique within the claims array. Duplicate IDs trigger repair.

verification_report.claims[].claim_text

String

Must be non-empty string. Must be a discrete, verifiable factual statement extracted from the original output.

verification_report.claims[].verification_status

Enum: SUPPORTED | UNSUPPORTED | CONTRADICTED | UNVERIFIABLE

Must be one of the four enum values. Any other value triggers schema repair.

verification_report.claims[].source_evidence

Array of Objects or null

Required when status is SUPPORTED or CONTRADICTED. Must be null for UNSUPPORTED or UNVERIFIABLE. Null violation triggers retry.

verification_report.claims[].source_evidence[].source_id

String

Must reference a source_id present in the input context. Unmatched IDs trigger citation accuracy check.

verification_report.claims[].source_evidence[].quote

String

Must be a verbatim excerpt from the referenced source. Fuzzy match below 90% triggers hallucination flag.

verification_report.claims[].confidence_score

Number (0.0 to 1.0)

Must be a float between 0.0 and 1.0 inclusive. Scores below 0.7 with SUPPORTED status trigger human review.

verification_report.claims[].correction

String or null

Required when status is CONTRADICTED. Must provide corrected statement grounded in source evidence. Null otherwise.

verification_report.summary

Object

Must contain total_claims, supported_count, unsupported_count, contradicted_count, unverifiable_count fields. Sum of counts must equal total_claims.

verification_report.escalation_required

Boolean

Must be true if any claim has UNSUPPORTED status and confidence_score below 0.5. Triggers human-in-the-loop workflow.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when extracting claims and verifying them against source evidence, and how to guard against each failure mode in production.

01

Claim Fragmentation Errors

What to watch: The model splits a single compound claim into fragments that lose meaning, or merges distinct claims into one unverifiable blob. Fragmented claims become impossible to map to source evidence accurately. Guardrail: Include explicit claim boundary rules in the prompt—each claim must be a single, independently verifiable atomic statement. Add a post-extraction validator that checks for conjunctions and splits compound claims before verification.

02

Source-Text Misattribution

What to watch: The model maps a claim to the wrong source passage, citing evidence that appears relevant but doesn't actually support the specific claim. This creates false confidence in hallucinated content. Guardrail: Require exact quote matching in the verification step—the model must extract the specific sentence or phrase from the source that supports each claim. Add a string-similarity check between the claim and cited passage as a secondary validator.

03

Implied Claim Over-Extraction

What to watch: The model treats reasonable inferences or background knowledge as explicit claims in the source text, flagging statements the author never made. This inflates hallucination rates and triggers false alarms. Guardrail: Add a distinction tier in the output schema: 'explicitly stated,' 'reasonably inferred,' and 'unsupported.' Only flag 'unsupported' as a failure. Include few-shot examples showing the boundary between inference and fabrication.

04

Verification Blindness to Paraphrase

What to watch: The model fails to recognize that a claim is supported when the source uses different wording, marking accurate paraphrases as unsupported. This produces false-positive hallucination flags that erode trust in the verification system. Guardrail: Instruct the model to verify semantic equivalence, not lexical overlap. Include examples of valid paraphrases that should pass verification. Add a semantic similarity threshold as a secondary check using embeddings.

05

Context Window Truncation During Verification

What to watch: When source documents are long, the verification step operates on truncated context, missing the evidence that would support a claim. Claims get flagged as unsupported because the evidence fell outside the window. Guardrail: Chunk source documents and run verification per chunk, then aggregate results. If a claim cannot be verified against any chunk, flag it with a 'context incomplete' marker rather than 'unsupported.'

06

Claim Extraction Drift on Long Outputs

What to watch: For long model outputs with many claims, extraction quality degrades in later sections—claims get skipped, merged, or misrepresented as the model loses focus. Guardrail: Process long outputs in sections with overlapping windows. Run extraction independently per section, then deduplicate claims across sections. Add a claim-count consistency check between the extraction output and a rough count estimate.

IMPLEMENTATION TABLE

Evaluation Rubric

Run this rubric against a golden dataset of generated texts with known ground-truth claim classifications. Each row defines a pass/fail criterion for the claim extraction and source verification prompt before shipping.

CriterionPass StandardFailure SignalTest Method

Claim recall

= 95% of ground-truth factual claims are extracted

Extracted claim count is less than 95% of expected claims in golden set

Compare extracted claim IDs to golden set claim IDs; compute recall

Claim precision

= 90% of extracted claims are true factual claims, not opinions or instructions

More than 10% of extracted items are non-claims or meta-commentary

Human review of 100 random extracted claims; classify as claim or non-claim

Source mapping accuracy

= 90% of claims mapped to correct source passage

Claim-to-source mapping mismatch rate exceeds 10%

For each claim, verify that the mapped source contains the claimed fact

Unsupported claim flagging

= 85% of unsupported claims correctly flagged

Unsupported claims in golden set are marked as supported or missing flag

Check flag status for known unsupported claims in golden dataset

Fabrication detection

Zero fabricated claims marked as supported

A claim not present in any source is mapped to a source passage

Cross-reference each supported claim against all provided sources

Structured output validity

100% of outputs parse as valid JSON matching [OUTPUT_SCHEMA]

JSON parse error or schema validation failure on any output

Run schema validator against every output in the test batch

Confidence score calibration

Mean confidence for correct mappings >= 0.8; mean for incorrect <= 0.5

High confidence on wrong mappings or low confidence on correct ones

Compute mean confidence scores stratified by mapping correctness

Abstention behavior

Prompt returns empty claims array when input contains no factual claims

Claims returned for input with zero ground-truth claims

Feed input with no factual content; verify empty claims array

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Add strict schema validation, retry logic, and structured output contracts. Require the model to output a typed verification report with claim ID, claim text, source passage, support status, and confidence score.

code
For each claim in [OUTPUT], produce a JSON object with:
- claim_id: string
- claim_text: string
- source_passage: string | null
- support_status: "supported" | "unsupported" | "partially_supported"
- confidence: 0.0-1.0
- rationale: string

If no source passage supports a claim, set source_passage to null and support_status to "unsupported". Do not fabricate source text.

Wire this into a post-generation validation harness: parse the JSON, check that every claim has a non-null source passage when support_status is "supported", and trigger a retry if validation fails.

Watch for

  • Silent format drift where the model drops fields
  • Confidence scores that don't correlate with actual support
  • Partially supported claims being treated as fully supported downstream
  • Retry loops that don't converge—set a retry budget of 3 attempts before escalation
Prasad Kumkar

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.