This prompt is designed for quality assurance teams, compliance reviewers, and AI operations engineers who need to systematically verify that AI-generated answers are properly supported by their cited sources. The primary job-to-be-done is a post-generation audit: you have an AI-generated answer, the set of sources it claims to cite, and the full text of those sources, and you need a structured report that flags unsupported claims, missing citations, fabricated references, and citation-to-claim misalignment. This is not a real-time generation guardrail. It belongs in review queues, batch QA pipelines, and compliance verification workflows where human reviewers need a systematic first-pass analysis before signing off on AI outputs.
Prompt
Citation Completeness Audit Prompt

When to Use This Prompt
Defines the job-to-be-done, ideal user, required context, and boundaries for the Citation Completeness Audit Prompt.
The ideal user has access to the complete source text for every cited reference. Without full source text, the audit cannot verify whether a claim is actually supported by the cited passage. The prompt expects explicit citation markers in the AI-generated answer—inline numbers, footnote references, or structured citation arrays. If your answer format lacks explicit citation markers, you should first apply a citation marker prompt or restructure the output before running this audit. The prompt also assumes that the set of sources provided is the complete set the model was allowed to cite; missing sources in the audit input will produce false positives for fabrication detection.
Do not use this prompt when you lack access to the full source text, when the answer format does not include explicit citation markers, or when you need real-time intervention during generation. For real-time hallucination prevention, use a mandatory citation prompt that enforces citation requirements during generation. For cases where you need to verify claims against a broader knowledge base rather than a fixed set of provided sources, use a fact-checking and claims verification prompt instead. After running this audit, route outputs with high-severity findings to human review and consider using the findings to improve your retrieval pipeline or citation instructions.
Use Case Fit
Where the Citation Completeness Audit Prompt delivers value and where it introduces risk. Use these cards to decide if this prompt fits your workflow before integrating it into a production harness.
Good Fit: Post-Generation QA Gate
Use when: You have a RAG pipeline generating answers and need an automated second pass to verify that every factual claim is backed by a cited source. Guardrail: Run the audit prompt as a mandatory step before the answer reaches the user. If the audit fails, route to human review or trigger a regeneration with stricter citation constraints.
Good Fit: Regulated or High-Trust Domains
Use when: Your outputs are subject to audit, compliance review, or professional standards that require traceable evidence. Guardrail: Store the structured audit report alongside the answer as an evidence artifact. Ensure the audit prompt itself is version-controlled and its eval criteria are approved by domain experts.
Bad Fit: Real-Time Chat Without Retrieval
Avoid when: The model is generating free-form conversational responses without a retrieval step. The audit prompt expects explicit citation markers and source passages to validate against. Guardrail: If you need factuality checks in a non-RAG setting, use a standalone fact-checking prompt with web search or knowledge base retrieval instead.
Required Input: Cited Answer Plus Source Passages
Risk: The audit prompt cannot function without both the generated answer (with citation markers) and the full text of every cited source passage. Missing sources produce false negatives. Guardrail: Build a preflight check that verifies all citation IDs in the answer resolve to actual passages in the context before invoking the audit prompt.
Operational Risk: Audit Prompt Hallucination
Risk: The audit prompt itself can hallucinate, flagging valid citations as unsupported or missing fabricated claims. This creates a false sense of security or triggers unnecessary human reviews. Guardrail: Periodically run the audit prompt against a golden dataset of known-good and known-bad answers. Measure precision and recall of the audit verdicts. Escalate discrepancies to prompt refinement.
Operational Risk: Latency and Cost Amplification
Risk: Adding an audit step doubles inference calls for every user-facing answer, increasing latency and token costs. Guardrail: Use the audit prompt selectively based on risk tier. Low-risk queries can skip the audit. High-risk or regulated queries must pass. Implement caching for repeated source passages to reduce token duplication.
Copy-Ready Prompt Template
A reusable prompt template for auditing AI-generated answers for citation completeness, claim support, and fabrication risks.
This prompt template is designed to be dropped directly into your quality assurance workflow. It instructs the model to act as an auditor, systematically comparing an AI-generated answer against a set of provided source documents. The goal is not to re-answer the question, but to produce a structured, pass/fail audit report that flags unsupported claims, verifies citation accuracy, and identifies potential fabrication. The placeholders allow you to inject the original user question, the final AI-generated answer, and the raw retrieved source context that was available to the generation model.
textYou are a citation completeness auditor. Your task is to audit an AI-generated answer against a set of provided source documents. You must determine if every factual claim in the answer is supported by at least one source, if the citations are accurate, and if there is any risk of fabrication. ## INPUTS **User Question:** [USER_QUESTION] **AI-Generated Answer:** [AI_ANSWER] **Source Documents (with IDs):** [SOURCE_DOCUMENTS] ## AUDIT INSTRUCTIONS 1. **Claim Extraction:** Decompose the AI-Generated Answer into a list of discrete, verifiable factual claims. 2. **Evidence Matching:** For each claim, search the Source Documents for direct supporting evidence. A claim is supported only if a source explicitly states the fact. 3. **Citation Verification:** Check every citation marker in the AI-Generated Answer (e.g., [1], [Doc A]). Verify that the cited source exists and that its content directly supports the specific claim it is attached to. 4. **Fabrication Risk Flagging:** Flag any claim that appears factual but has no supporting evidence in the Source Documents. Also flag any citation that points to a non-existent source or a source that does not support the claim. ## OUTPUT FORMAT You must produce a valid JSON object conforming to this exact schema: { "audit_result": "PASS" | "FAIL", "overall_score": <number 0-100>, "claims": [ { "claim_text": "string", "support_status": "SUPPORTED" | "UNSUPPORTED" | "CONTRADICTED", "source_ids": ["string"], "auditor_notes": "string" } ], "citation_issues": [ { "citation_marker": "string", "issue_type": "FABRICATED_SOURCE" | "MISMATCHED_CLAIM" | "MISSING_SOURCE", "details": "string" } ], "fabrication_risk_flags": ["string"], "summary": "string" } ## CONSTRAINTS - The `overall_score` must be 100 if `audit_result` is PASS. Any UNSUPPORTED claim or citation issue must result in a FAIL and a score less than 100. - `source_ids` must only contain IDs that exist in the provided Source Documents. - If no factual claims are made in the answer, `audit_result` is PASS with a score of 100. - Do not add any commentary outside the JSON object.
To adapt this template, replace the placeholders with your actual data. The [SOURCE_DOCUMENTS] placeholder should be filled with a pre-formatted string that clearly separates each document and assigns it a unique ID (e.g., [Doc 1] ..., [Doc 2] ...). This prompt is most effective when used as a post-generation validation step in a RAG pipeline. For high-stakes domains, the structured JSON output should be logged and reviewed before the answer is shown to an end-user. A common failure mode is the auditor model hallucinating source IDs; mitigate this by strictly enforcing the source_ids constraint in your output validator and retrying the audit if a violation is detected.
Prompt Variables
Inputs the Citation Completeness Audit Prompt needs to work reliably. Validate these before sending to the model. Missing or malformed inputs are the most common cause of audit report errors.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[GENERATED_ANSWER] | The AI-generated text to audit for citation coverage and claim support | The Paris Agreement was signed in 2015 and set a goal of limiting warming to 1.5°C above pre-industrial levels. | Must be non-empty string. Truncate if over model context limit. Strip any prior audit markup before passing. |
[CITED_SOURCES] | The source passages the answer claims to cite, with identifiers | [{"source_id": "doc-12", "text": "The Paris Agreement was adopted on 12 December 2015..."}, {"source_id": "doc-7", "text": "Parties aim to limit global temperature increase to 1.5°C..."}] | Must be valid JSON array. Each object requires source_id and text fields. Empty array is valid and should trigger full citation-failure audit. |
[RETRIEVED_CONTEXT] | All passages retrieved for the query, including those not cited in the answer | [{"source_id": "doc-12", "text": "The Paris Agreement was adopted on 12 December 2015..."}, {"source_id": "doc-7", "text": "Parties aim to limit..."}, {"source_id": "doc-3", "text": "The Kyoto Protocol preceded..."}] | Must be valid JSON array. Should be a superset of CITED_SOURCES. If identical to CITED_SOURCES, flag in audit as no-uncited-context-available. |
[AUDIT_OUTPUT_SCHEMA] | The expected JSON structure for the audit report | {"claim_audits": [{"claim_text": "...", "cited_source_ids": ["doc-12"], "support_level": "SUPPORTED", "fabrication_risk": "LOW"}], "overall_score": "PASS", "summary": "..."} | Must be valid JSON Schema or example object. Include support_level enum values: SUPPORTED, PARTIALLY_SUPPORTED, UNSUPPORTED, CONTRADICTED. Include fabrication_risk enum: NONE, LOW, MEDIUM, HIGH. |
[FABRICATION_THRESHOLD] | Risk level at which the audit should escalate for human review | MEDIUM | Must be one of: NONE, LOW, MEDIUM, HIGH. NONE disables escalation. HIGH only escalates on clear fabrication signals. Validate against allowed enum before inference. |
[REQUIRE_VERBATIM_QUOTES] | Whether the audit must include exact source quotes for each claim-support check | Must be boolean true or false. When true, audit report must include quote_text field per claim. When false, source_id reference is sufficient. Set true for regulated or high-trust domains. | |
[ABSTENTION_ALLOWED] | Whether the audit can return INCONCLUSIVE when evidence is insufficient to judge support | Must be boolean true or false. When false, auditor must make a best-effort SUPPORTED or UNSUPPORTED call. When true, INCONCLUSIVE is a valid support_level. Required for domains where false certainty is riskier than acknowledged uncertainty. |
Implementation Harness Notes
How to wire the Citation Completeness Audit Prompt into a QA pipeline with validation, retries, and human review gates.
The Citation Completeness Audit Prompt is designed to sit inside a quality assurance pipeline, not as a one-off manual check. In production, it typically runs after an answer generation step, receiving the original user query, the generated answer, and the set of retrieved source passages as input. The prompt's structured audit report becomes the decision point for whether an answer passes automated QA, requires human review, or triggers a regeneration loop. This means the implementation harness must handle input assembly, output validation, retry logic, and routing based on the audit verdict.
Start by constructing the prompt input from three pipeline artifacts: the user's original query, the generated answer text, and the full set of retrieved passages with their source metadata. The prompt expects these as structured inputs. Before calling the model, validate that all required fields are present and non-empty. An empty source list should immediately fail the audit without calling the model, since citation completeness is undefined when no sources were retrieved. After receiving the model's response, parse the structured audit report and validate it against an expected schema. At minimum, check that the verdict field contains a valid enum value such as PASS, FAIL, or REVIEW, and that any flagged claims include the specific passage IDs they reference. If the output fails schema validation, retry once with a repair prompt that includes the validation error message. If the retry also fails, escalate to a human review queue with the raw output attached.
For high-trust domains such as legal, healthcare, or finance, the audit verdict should never be the final word without additional safeguards. Route PASS verdicts to a sampling-based human review queue where a configurable percentage of passing audits are spot-checked. Route FAIL verdicts to either an automated regeneration loop that re-queries the RAG system with expanded retrieval, or directly to a human reviewer if the failure count exceeds a threshold. Route REVIEW verdicts to a dedicated human review queue with the full audit report, source passages, and generated answer presented side by side. Log every audit run with a trace ID, the prompt version, the model used, the raw audit output, and the final routing decision. This trace data is essential for debugging citation quality trends and for producing audit evidence if downstream consumers question the system's outputs.
Model choice matters here. The audit task requires careful comparison between claims and source text, which benefits from models with strong instruction-following and long-context reasoning. GPT-4o, Claude 3.5 Sonnet, and Gemini 1.5 Pro are all suitable. Avoid smaller or faster models that may miss subtle mismatches between claims and evidence. If latency is critical, consider running the audit asynchronously after the answer is delivered to the user, flagging problematic answers for retrospective correction rather than blocking the response. Finally, treat the audit prompt itself as a product artifact: version it, test it against a golden dataset of known citation failures and correct citations, and run regression tests before deploying changes. A broken audit prompt is worse than no audit at all, because it creates a false sense of safety.
Expected Output Contract
Defines the fields, data types, and validation rules for the structured audit report produced by the Citation Completeness Audit Prompt. Use this contract to build downstream parsers, evaluation harnesses, and logging pipelines.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
audit_id | string (UUID v4) | Must be a valid UUID v4 string generated by the auditor. Parse check: regex match. | |
claim_id | string | Must correspond to a claim identifier from the input [CLAIMS_LIST]. Parse check: exists in input set. | |
claim_text | string | Must exactly match the claim text provided in [CLAIMS_LIST] for the given claim_id. Parse check: string equality. | |
citation_completeness | enum: COMPLETE | PARTIAL | MISSING | Must be one of the three defined enum values. Schema check: enum membership. | |
cited_sources | array of source_id strings | Must contain valid source_id values from [SOURCE_MAP]. If citation_completeness is MISSING, array must be empty. Parse check: array validation and source_id lookup. | |
support_level | enum: FULLY_SUPPORTED | PARTIALLY_SUPPORTED | CONTRADICTED | UNVERIFIABLE | Must be one of the four defined enum values. If citation_completeness is MISSING, value must be UNVERIFIABLE. Schema check: enum membership and conditional consistency. | |
fabrication_risk_flag | boolean | Must be true if any cited source does not contain evidence supporting the claim. Requires source content verification against [SOURCE_CONTENTS]. Approval required for true flags. | |
auditor_notes | string or null | If not null, must be a non-empty string explaining the audit decision. Null allowed only when citation_completeness is COMPLETE and support_level is FULLY_SUPPORTED. Parse check: conditional null allowance. |
Common Failure Modes
What breaks first when auditing AI outputs for citation completeness and how to guard against it.
Hallucinated Citations
What to watch: The model fabricates plausible-looking source references, DOIs, or page numbers that don't exist in the provided evidence. This is the most dangerous failure mode because fabricated citations create false confidence. Guardrail: Require exact string matching between cited text and source passages. Implement a post-generation verification step that searches for each quoted string in the original documents. Flag any citation where the quoted text cannot be located verbatim.
Citation-Content Mismatch
What to watch: A citation marker points to a real source passage, but the passage doesn't actually support the claim being made. The model correctly identifies a relevant document but misattributes a specific claim to the wrong section or misinterprets what the passage says. Guardrail: Implement a natural language inference check that compares each cited claim against its source passage. Use a separate verification prompt that asks: 'Does this passage support this specific claim?' and require a yes/no judgment with evidence.
Selective Citation Bias
What to watch: The model cites sources that support its preferred answer while ignoring contradictory evidence from equally authoritative sources. This produces a well-cited but misleading output that passes basic citation checks. Guardrail: Before finalizing the audit, run a coverage check that identifies which provided sources were never cited. Require the audit prompt to explicitly note uncited sources and explain why they weren't used. Flag outputs where contradictory sources are present but absent from citations.
Citation Density Collapse on Long Outputs
What to watch: Citation frequency drops sharply in later sections of long answers. The model starts strong with dense citations but gradually drifts into uncited synthesis as the output length grows. Guardrail: Segment the audit into per-section citation density checks. Set a minimum citation-per-paragraph threshold and flag sections that fall below it. Consider breaking long audit tasks into multiple shorter prompts, each with its own citation requirements.
Paraphrase Drift from Source Meaning
What to watch: The model paraphrases a source passage to fit its narrative but subtly changes the meaning, tense, scope, or certainty level. The citation is technically present but the paraphrased claim no longer accurately represents the source. Guardrail: Add a semantic similarity threshold between cited claims and source passages. When similarity drops below a configurable threshold, flag for human review. Include explicit instructions in the audit prompt to preserve original meaning, hedging, and scope when paraphrasing.
Fake Precision in Citation Metadata
What to watch: The model invents specific but incorrect metadata such as section numbers, paragraph indices, or timestamp ranges that weren't present in the source context. This makes citations look more precise than they actually are. Guardrail: Constrain the citation schema to only include metadata fields that are explicitly present in the provided source context. Reject any citation that includes location information not extractable from the original source material. Validate metadata fields against the source document structure.
Evaluation Rubric
Criteria for testing the Citation Completeness Audit Prompt before production deployment. Each row defines a pass standard, a failure signal, and a concrete test method to validate output quality.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Citation Coverage Completeness | Every factual claim in the [TARGET_ANSWER] is mapped to at least one [RETRIEVED_SOURCE] in the audit report | Audit report lists claims as 'uncited' or 'missing source' when a source exists in the provided context | Run with a golden answer containing 10 known claims and 10 matching sources; assert claim-to-source mapping count equals 10 |
Source Support Verification Accuracy | Audit correctly identifies that a cited source does NOT support the claim when the source text contradicts or is irrelevant | Audit marks a contradictory or irrelevant source as 'supporting' the claim | Inject a claim with a deliberately mismatched source; assert audit verdict is 'unsupported' or 'contradicts' |
Citation Fabrication Detection | Audit flags any citation reference that does not match a provided [RETRIEVED_SOURCE] identifier as 'fabricated' | Fabricated citation is marked as 'verified' or 'present' | Remove one source ID from the context and keep a citation to it in the answer; assert audit report contains 'fabricated' flag for that citation |
Structured Output Schema Compliance | Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and correctly typed | Output is missing required fields, contains extra untyped fields, or fails JSON parse | Validate output against JSON Schema using a programmatic validator; assert zero schema violations |
Abstention and Uncertainty Handling | When [TARGET_ANSWER] contains hedged language or explicit uncertainty, audit report preserves that uncertainty rather than marking it as a hard failure | Audit report converts a hedged statement into a definitive 'pass' or 'fail' without noting the uncertainty | Provide an answer containing 'may indicate' or 'suggests'; assert audit report includes uncertainty qualifier or confidence note |
Empty or Null Input Handling | Audit produces a valid empty report or explicit 'no claims to audit' message when [TARGET_ANSWER] is empty or null | Audit hallucinates claims, fabricates sources, or throws an unhandled error | Pass an empty string and a null value as [TARGET_ANSWER]; assert output is valid JSON with zero claims and no fabricated sources |
Multi-Source Claim Attribution | When a claim is supported by multiple sources, audit correctly lists all supporting source IDs rather than only the first match | Audit truncates to a single source when multiple provided sources support the same claim | Provide a claim and three sources that all support it; assert audit report lists all three source IDs for that claim |
Adversarial Citation Injection Resistance | Audit treats citations embedded in [TARGET_ANSWER] that reference sources not in [RETRIEVED_SOURCES] as fabrication risks, not as valid citations | Audit accepts an injected citation to an external source as valid without flagging it | Insert a citation to 'Source_99' in the answer when only sources 1-5 exist in context; assert audit flags Source_99 as fabricated |
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
Use the base prompt with a frontier model (GPT-4o, Claude 3.5 Sonnet). Remove the strict JSON output schema and ask for a structured markdown report instead. Focus on catching obvious fabrication (cited sources that don't exist) and blatant unsupported claims. Run 10-20 manual spot checks to calibrate before adding automation.
Prompt modification
- Replace
[OUTPUT_SCHEMA]with: "Return a markdown report with sections: Summary, Claim-by-Claim Audit, Overall Verdict." - Remove
[CONSTRAINTS]related to exact field validation. - Add: "Flag any citation that looks fabricated or doesn't match the source title."
Watch for
- Over-flagging: the model marks paraphrased claims as unsupported when they are reasonable summaries.
- Under-flagging: the model trusts citation markers without checking if the source actually says what's claimed.
- Inconsistent verdict thresholds across runs without explicit pass/fail criteria.

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