This prompt is for teams shipping AI-generated content that includes citations—RAG answers, research briefs, legal summaries, or any output where the model claims to reference a specific source. The job is to verify that every citation in the generated response accurately reflects the cited source's content. This means detecting misattributed quotes, fabricated references, citation-to-claim mismatches, and cases where the model cites a real document but misrepresents what it says. The ideal user is an AI engineer, evaluation lead, or content verification specialist who needs automated, repeatable checks before cited outputs reach users or reviewers.
Prompt
Source Attribution Verification Prompt

When to Use This Prompt
Define the job, reader, and constraints for source attribution verification in production AI systems.
Use this prompt when citations are a product requirement, not optional decoration. It fits into CI/CD pipelines as a pre-release gate, into human review queues as a triage filter, and into production monitoring as a drift detector. You need the generated text, the full cited source content, and the citation mapping before running this prompt. Do not use it when citations are absent, when source documents are unavailable, or when you need real-time streaming verification—this is a post-generation audit step. For high-stakes domains like legal, healthcare, or finance, this prompt should feed a human review queue, not make autonomous pass/fail decisions.
Before implementing, define your tolerance for false positives and false negatives. A strict configuration will flag minor paraphrasing differences as misattributions, increasing reviewer burden. A lenient configuration will miss subtle misrepresentations. Start by running this prompt against a golden dataset of known-good and known-bad citation pairs to calibrate thresholds. Then integrate it into your evaluation harness with structured logging, per-citation pass/fail scores, and clear escalation paths for failures that require human judgment.
Use Case Fit
Where the Source Attribution Verification Prompt works, where it fails, and the operational preconditions for reliable citation auditing.
Good Fit: RAG Systems with Explicit Citations
Use when: your AI output contains inline citations or numbered references that map to a provided source corpus. Guardrail: The prompt expects a deterministic mapping between a citation marker and a source chunk. If your system uses vague 'according to the document' language without pointers, pre-process the output to extract claim-citation pairs before running verification.
Bad Fit: Implicit or Missing Source Boundaries
Avoid when: the AI output synthesizes information from its training data or an opaque retrieval step without surfacing which source was used for each claim. Guardrail: If you cannot provide the exact source text that was available to the model at generation time, attribution verification is impossible. Add source provenance logging to your RAG pipeline before deploying this prompt.
Required Inputs: Claim-Source Pairs and Full Context
What to watch: Running verification without the complete source document context leads to false negatives where a claim appears unsupported only because the relevant passage was truncated. Guardrail: Always supply the full source chunk or document section that was available during generation, not just a snippet. Include surrounding context to prevent boundary-effect mismatches.
Operational Risk: Paraphrase vs. Fabrication Ambiguity
What to watch: The model may flag legitimate paraphrases as unsupported or, conversely, accept subtly distorted claims as supported because they share keywords with the source. Guardrail: Calibrate the prompt with a clear rubric distinguishing acceptable paraphrase from meaning-altering distortion. Run a human-annotated calibration set before trusting automated pass/fail decisions on citation accuracy.
Operational Risk: Citation-to-Claim Mismatch Cascades
What to watch: A single misattributed citation can cause downstream systems to treat fabricated evidence as verified, especially in multi-step agent workflows where one output becomes the input for the next. Guardrail: Gate any workflow that consumes cited outputs on a passing attribution score. If verification fails, quarantine the output and request regeneration with stricter source-grounding instructions.
Scale Limit: Human Review for High-Stakes Attribution
What to watch: Automated citation verification can miss subtle misrepresentations where a source is quoted accurately but in a context that changes its meaning. Guardrail: For legal, medical, or financial outputs where misattribution carries regulatory or safety risk, route all flagged or borderline cases to a human review queue. The prompt is a filter, not a replacement for expert judgment.
Copy-Ready Prompt Template
A reusable prompt for verifying that every citation in a generated response accurately reflects the cited source's content.
This prompt template is designed to be dropped directly into your evaluation pipeline. It instructs the model to act as a strict auditor, comparing each citation in a generated response against the provided source material. The template uses square-bracket placeholders for all dynamic inputs, making it easy to parameterize for different documents, responses, and risk tolerances. Copy the block below and replace the placeholders with your application's data before sending it to the model.
textYou are a strict citation auditor. Your task is to verify that every citation in the [RESPONSE_TO_AUDIT] accurately reflects the content of the cited source provided in [SOURCE_MATERIAL]. For each citation found in the response, perform the following checks and output a structured report: 1. **Source Existence**: Does the cited source identifier (e.g., [1], [doc_alpha]) exist in the provided [SOURCE_MATERIAL]? 2. **Quote Accuracy**: If a direct quote is used, does it match the source text exactly, including punctuation? Flag any discrepancies. 3. **Claim Support**: Does the source genuinely support the specific claim it is attached to? Classify the relationship as `SUPPORTS`, `PARTIALLY_SUPPORTS`, `CONTRADICTS`, or `UNRELATED`. 4. **Contextual Fidelity**: Is the source's meaning distorted, overstated, or taken out of context to support the claim? Flag any misrepresentation. **Output Format**: Return a single JSON object with the following schema: { "audit_results": [ { "citation_id": "string", "source_exists": boolean, "quote_accurate": boolean or null, "claim_support_level": "SUPPORTS" | "PARTIALLY_SUPPORTS" | "CONTRADICTS" | "UNRELATED", "contextual_fidelity_issues": ["string"] or [], "overall_verdict": "PASS" | "FAIL", "auditor_notes": "string" } ], "summary": { "total_citations": number, "passed": number, "failed": number, "critical_failures": ["citation_id"] } } **Constraints**: - If a citation is a fabricated reference (source does not exist), the `overall_verdict` must be `FAIL` and this must be flagged as a `critical_failure`. - If the [RISK_LEVEL] is `HIGH`, any `FAIL` verdict should halt the pipeline and require human review. - Base your audit strictly on the provided [SOURCE_MATERIAL]. Do not use outside knowledge. - If no citations are found in the response, return an empty `audit_results` array and a note in the summary. [SOURCE_MATERIAL]:
[INSERT_SOURCE_DOCUMENTS_HERE]
code[RESPONSE_TO_AUDIT]:
[INSERT_GENERATED_RESPONSE_HERE]
To adapt this template, start by mapping your source documents into the [SOURCE_MATERIAL] block. Each source should have a clear, unique identifier that matches the citations in the response. The [RISK_LEVEL] placeholder is a control lever: set it to LOW for internal development checks where a logged warning is sufficient, and HIGH for customer-facing outputs where a FAIL verdict must trigger an immediate block and human review queue. For production systems, you should validate the output JSON against the schema before accepting the audit result, as a malformed response from the auditor is itself a failure mode.
Prompt Variables
Required inputs for the Source Attribution Verification Prompt. Each placeholder must be populated before the prompt is sent. Missing or malformed inputs are the most common cause of false negatives in citation audits.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[RESPONSE_TEXT] | The AI-generated text containing citations to verify | According to Smith (2023), revenue grew 14% year-over-year. | Must be non-empty string. Strip markdown formatting before passing. Max 8000 tokens recommended for single-pass verification. |
[CITATION_MAP] | Structured mapping of citation keys to full source text | {"Smith2023": "Annual Report: Revenue increased 14%..."} | Must be valid JSON object. Each key must match a citation reference in [RESPONSE_TEXT]. Values must contain the complete source passage, not summaries. |
[CITATION_FORMAT] | Regex or pattern describing how citations appear in the response | ([A-Za-z]+\s*(?\d{4})?) | Must be a valid regex string. Test against sample citations before production use. Null allowed if using named-reference format. |
[VERIFICATION_SCOPE] | Enum specifying which claims to verify | all_claims | Must be one of: all_claims, direct_quotes_only, numerical_claims_only, statistical_claims_only. Default to all_claims if null. |
[ACCEPTABLE_PARAPHRASE_THRESHOLD] | Semantic similarity floor for accepting paraphrased claims as verified | 0.85 | Float between 0.0 and 1.0. Values below 0.80 increase false positives. Values above 0.95 may reject legitimate paraphrases. Recommend 0.85 as starting point. |
[OUTPUT_SCHEMA] | Expected structure for the verification report | {"citation_id": "string", "claim": "string", "verdict": "enum", "evidence": "string", "confidence": "float"} | Must be valid JSON Schema or example structure. Include verdict enum values: verified, misattributed, fabricated, partial_match, insufficient_context. |
[SOURCE_METADATA] | Optional metadata about each source for context-aware verification | {"Smith2023": {"type": "annual_report", "date": "2023-03-15", "page": 42}} | Null allowed. If provided, must be valid JSON object with keys matching [CITATION_MAP]. Use for date-sensitive claims and page-level precision requirements. |
[FAILURE_MODE_CONFIG] | Instructions for handling ambiguous or borderline cases | {"tie_break": "flag_for_review", "low_confidence_threshold": 0.70} | Null allowed. If provided, must specify tie_break as flag_for_review, assume_verified, or assume_fabricated. low_confidence_threshold must be float between 0.0 and 1.0. |
Common Failure Modes
Source attribution verification fails in predictable ways. These are the most common failure modes when verifying that citations accurately reflect their cited sources, with concrete guardrails to catch them before they reach users.
Fabricated Citation Detection
What to watch: The model invents a plausible-sounding citation that doesn't exist in the provided sources, often matching the style and author naming conventions of real references. This is the most dangerous failure because fabricated citations look authoritative. Guardrail: Pre-extract all valid citation keys from source material and include them as a closed set in the prompt. Require the verifier to reject any citation not present in that set, with a citation_exists: false flag in the output schema.
Citation-to-Claim Mismatch
What to watch: A real citation is present, but the cited source doesn't actually support the specific claim it's attached to. The model correctly identifies the source exists but misattributes content—often pulling a general topic match rather than verifying the specific factual statement. Guardrail: Require the verifier to extract the exact supporting passage from the source and compare it against the claim. Use a structured output that pairs each citation with its claimed passage and a supports_claim: true/false judgment with reasoning.
Paraphrase Drift and Quote Distortion
What to watch: The model accepts a paraphrased version of a source quote as accurate when the paraphrase changes meaning, softens caveats, or omits critical qualifiers. This is especially common with technical or legal content where precise wording matters. Guardrail: Include a quote-accuracy check that compares the generated text against the original source at the string level, not just semantic similarity. Flag any paraphrase that alters hedging language, numerical values, or conditional statements.
Context-Stripping and Selective Quoting
What to watch: The model verifies a citation against a narrow excerpt while ignoring surrounding context that contradicts or qualifies the claim. A source may technically contain the quoted words but use them in a different context, with caveats, or in a negative framing. Guardrail: Require the verifier to examine a wider context window around each cited passage—at minimum the full paragraph or section. Add a context_consistent: true/false field that checks whether the surrounding text supports or undermines the attributed claim.
Source Confusion Across Multiple Documents
What to watch: When multiple sources discuss similar topics, the model attributes a claim to the wrong source—correctly identifying that a claim is supported somewhere in the corpus but assigning it to the wrong citation. This is common in RAG systems with overlapping retrieved documents. Guardrail: Require the verifier to check each claim against all provided sources, not just the cited one. Output a correct_source field that identifies which source actually supports the claim, and flag mismatches where the cited source doesn't match the supporting source.
Ambiguous Attribution and Over-Confidence
What to watch: The model marks a citation as verified when the source only partially or ambiguously supports the claim, often because the verifier defaults to leniency rather than flagging uncertainty. This produces false negatives in hallucination detection. Guardrail: Use a three-tier judgment schema (supported, partially_supported, unsupported) rather than binary pass/fail. Require explicit reasoning for partially_supported judgments and treat them as requiring human review in production pipelines.
Evaluation Rubric
Use this rubric to evaluate the quality of a Source Attribution Verification output before integrating it into a production pipeline. Each criterion includes a concrete pass standard, a failure signal to watch for, and a test method that can be automated.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Citation Completeness | Every citation in [INPUT_RESPONSE] appears in the output with a verification status | A citation from the input is missing from the verification report | Parse input citations and output citations; check set equality |
Source Existence Check | Every cited source ID in [INPUT_RESPONSE] is matched to a source in [SOURCE_DOCUMENTS] | Output marks a citation as 'verified' when the source ID is not in [SOURCE_DOCUMENTS] | Cross-reference cited source IDs against provided source ID list |
Quote Accuracy | Every direct quote in [INPUT_RESPONSE] is checked for exact or near-exact match in the cited source | A fabricated or significantly altered quote is marked as 'verified' | String similarity check between quoted text and source text; flag if similarity < 0.95 |
Claim-to-Citation Alignment | Each claim-citation pair is assessed for whether the cited source genuinely supports the claim | A claim is marked 'supported' when the source text contradicts or does not mention the claim | LLM-as-judge spot check on a sample of claim-citation pairs; human review for borderline cases |
Misattribution Detection | Output correctly flags claims attributed to a source that does not contain the supporting evidence | A misattributed claim receives a 'verified' status | Provide a test case with a known misattribution; confirm output status is 'misattributed' or 'unsupported' |
Output Schema Compliance | Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present | Output is missing required fields, contains extra fields, or has incorrect types | JSON Schema validation against the defined output contract |
Confidence Score Calibration | Confidence scores correlate with actual verification accuracy on a held-out test set | High confidence scores on known-fabricated citations or low confidence on trivially verifiable ones | Run on a golden dataset with known labels; compute correlation between confidence and accuracy |
Abstention Handling | Output uses a clear 'unverifiable' status when source content is ambiguous or insufficient | Ambiguous cases are forced into 'verified' or 'fabricated' without an abstention option | Test with intentionally vague source passages; confirm 'unverifiable' status is used appropriately |
Implementation Harness Notes
How to wire the Source Attribution Verification Prompt into a production application with validation, retries, and human review gates.
The Source Attribution Verification Prompt is designed to operate as a post-generation audit step, not a real-time guardrail. In a typical RAG or cited-generation pipeline, the primary model produces a response with inline citations. This prompt then takes the generated response and the full text of each cited source as input, producing a structured verification report. The implementation harness should treat this as an asynchronous evaluation job: enqueue the verification request, run it against a judge model (typically a capable model like GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro), and route the results to a review queue or automated gate. Do not block the user-facing response on this verification completing unless the use case demands synchronous grounding guarantees and your latency budget can absorb the additional model call.
The harness must validate the output schema before acting on the results. The prompt returns a JSON object with a citations array, where each element contains citation_id, claim_summary, source_text_excerpt, verification_status (one of accurate, misattributed, fabricated, partial_match, or unverifiable), and explanation. Implement a post-processing validator that checks: (1) every citation_id in the output matches a citation present in the original generated response, (2) no citation_id is missing from the verification report, (3) all verification_status values are from the allowed enum, and (4) the source_text_excerpt field contains a non-empty substring that can be located in the provided source document. If validation fails, retry the verification call once with an explicit error message injected into the prompt context. If the retry also fails, flag the output for mandatory human review and log the validation failure details for prompt debugging.
For high-stakes domains such as legal, medical, or financial content, implement a tiered escalation path based on the verification results. Any citation marked fabricated or misattributed should trigger immediate human review before the response reaches the end user. Citations marked partial_match can be surfaced with a confidence warning in the UI. Citations marked accurate can pass through without intervention. Store the full verification report alongside the generated response in your logging or observability system, including the judge model version, prompt version, and timestamp. This audit trail is essential for governance, prompt regression testing, and debugging hallucination patterns over time. For cost optimization, consider batching verification requests during off-peak hours for non-urgent content, or implement a sampling strategy where only a percentage of responses undergo full citation verification if your volume exceeds your evaluation budget.
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 citation-claim pairs. Run the prompt against a frontier model (GPT-4o, Claude 3.5 Sonnet) without schema enforcement. Manually review outputs to calibrate your definition of misattribution vs. acceptable paraphrase.
Simplify the output schema to a flat list: citation_id, claim_text, verdict (accurate/misattributed/fabricated), and explanation. Skip confidence scores and severity levels until you've validated the verdicts against human judgment.
Watch for
- The model marking close paraphrases as misattributions when the semantic meaning is preserved
- Overly strict literal matching that flags minor word-order changes as failures
- Missing edge cases: citations that are real but irrelevant to the claim they're attached to

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