This prompt is designed for AI engineers and evaluation pipeline builders who need to verify that a generated answer is factually consistent across multiple retrieved source documents. The core job-to-be-done is detecting when a RAG system synthesizes an answer that is supported by one source but directly contradicted by another, or when the answer ignores a conflict that exists in the provided context. The ideal user is someone operating a production RAG system who already has a retrieval step in place and needs an automated judge to catch cross-document inconsistencies before the answer reaches the end user. Required context includes the full generated answer and the complete set of retrieved documents that were provided to the generator, with each document clearly delimited and identified by a source label.
Prompt
Multi-Document Factual Consistency Prompt

When to Use This Prompt
Define the job, reader, and constraints for the Multi-Document Factual Consistency Prompt.
Use this prompt when your retrieval pipeline pulls from multiple documents that may disagree with each other—for example, financial filings from different periods, medical literature with conflicting study results, or policy documents with version discrepancies. The prompt is specifically designed to catch three failure patterns: claims supported by one document but contradicted by another, claims that synthesize information from multiple documents in a way that creates a false implication, and answers that present a consensus where none exists in the source material. Do not use this prompt for single-document grounding checks, for detecting hallucinations where no source conflict exists, or for evaluating the quality of the retrieval step itself. This prompt assumes the retrieved documents are already provided and focuses exclusively on cross-document consistency analysis.
Before implementing this prompt, ensure your pipeline can reliably separate and label each source document with a persistent identifier that the judge can reference in its output. The prompt works best when documents are chunked at a granularity that preserves document boundaries—mixing sentences from different documents into the same chunk will defeat cross-document conflict detection. For high-stakes domains such as healthcare or legal applications, always route detected conflicts to a human reviewer rather than attempting automated resolution. The next section provides the copy-ready prompt template with placeholders for your specific document format and output schema requirements.
Use Case Fit
Where the Multi-Document Factual Consistency Prompt delivers value and where it introduces risk. Use this to decide if the prompt fits your pipeline before investing in integration.
Good Fit: Multi-Source RAG Pipelines
Use when: your system retrieves from 3+ documents that may conflict. The prompt excels at surfacing contradictions and partial support across sources. Guardrail: Always provide full document text, not just snippets, to avoid false conflict signals from missing context.
Bad Fit: Single-Source Verification
Avoid when: you only have one source document. The multi-document conflict detection logic adds latency and token cost without benefit. Guardrail: Route single-source checks to a simpler factual consistency prompt and reserve this for cross-document scenarios.
Required Inputs
Must provide: the generated answer text, all retrieved source documents with identifiers, and a conflict resolution preference. Guardrail: Missing document IDs make it impossible to trace which source supports or contradicts each claim. Validate inputs before calling the prompt.
Operational Risk: Source Count Explosion
What to watch: latency and token costs grow with document count. At 10+ documents, the prompt may exceed context windows or produce incomplete comparisons. Guardrail: Cap documents at 5-7, pre-rank by relevance, and chunk long documents before passing them in.
Operational Risk: False Conflict Cascades
What to watch: the model may flag contradictions where documents actually agree but use different terminology. Guardrail: Include a terminology normalization step before consistency checking, and log all flagged conflicts for human spot-checking during initial deployment.
Not a Replacement for Human Adjudication
What to watch: the prompt identifies conflicts but cannot resolve which source is correct. Guardrail: Route all detected source conflicts to a human review queue with the conflicting passages highlighted. Never auto-resolve contradictions in regulated or high-stakes domains.
Copy-Ready Prompt Template
A reusable prompt template for checking an answer's factual consistency across multiple source documents, detecting contradictions and unsupported claims.
This template is designed to be dropped into a RAG evaluation pipeline. It instructs the model to act as a factual consistency judge, comparing a generated answer against a set of retrieved documents. The core job is to identify claims that are supported, unsupported, or contradicted by the evidence, with special attention to conflicts between sources. Use this template when you have multiple documents that may disagree and you need a structured consistency report before the answer reaches a user or a downstream system.
textYou are a factual consistency auditor. Your task is to evaluate a generated answer against a set of source documents. You must identify every factual claim in the answer and determine its grounding status relative to the provided sources. ## INPUT **Generated Answer:** [ANSWER] **Source Documents:** [DOCUMENTS] ## INSTRUCTIONS 1. Extract every discrete factual claim from the Generated Answer. 2. For each claim, search all Source Documents for supporting or contradicting evidence. 3. Classify each claim as one of: - **SUPPORTED**: At least one source clearly supports the claim. - **UNSUPPORTED**: No source provides evidence for the claim. - **CONTRADICTED**: One or more sources directly contradict the claim. - **SOURCE_CONFLICT**: Multiple sources provide conflicting information on this claim. 4. For each claim, cite the specific source document(s) and relevant passage(s) that inform your classification. 5. If a claim is CONTRADICTED or SOURCE_CONFLICT, explain the nature of the contradiction. 6. Do not judge the truth of the sources themselves. Only judge consistency between the answer and the provided documents. ## OUTPUT FORMAT Return a valid JSON object with this exact schema: { "overall_consistency_score": number (0.0 to 1.0, where 1.0 means all claims are fully supported with no contradictions), "total_claims": number, "supported_claims": number, "unsupported_claims": number, "contradicted_claims": number, "source_conflict_claims": number, "claims": [ { "claim_text": "string (the exact claim from the answer)", "status": "SUPPORTED | UNSUPPORTED | CONTRADICTED | SOURCE_CONFLICT", "source_references": [ { "document_id": "string", "passage": "string (the relevant excerpt)", "relationship": "SUPPORTS | CONTRADICTS" } ], "explanation": "string (brief reasoning, required for CONTRADICTED and SOURCE_CONFLICT)" } ], "source_conflicts_summary": [ { "claim_text": "string", "conflict_description": "string (explain what the sources disagree on)", "conflicting_documents": ["document_id_1", "document_id_2"], "recommendation": "string (suggest whether human review is needed)" } ] } ## CONSTRAINTS - Only use information present in the provided Source Documents. - If the answer contains no factual claims, return an empty claims array with total_claims set to 0. - Do not fabricate source references. If no source supports or contradicts a claim, mark it as UNSUPPORTED. - For SOURCE_CONFLICT claims, always populate the source_conflicts_summary array.
To adapt this template, replace [ANSWER] with the generated text under evaluation and [DOCUMENTS] with your retrieved context, formatted with clear document identifiers. For production use, pre-process your documents to include stable IDs that persist across retrieval calls, enabling traceable source references in the output. If your RAG system already includes citation markers in the answer, add an optional [CITATIONS] input field and modify the instructions to cross-check those citations against the source documents. For high-stakes domains like healthcare or legal review, add a [RISK_LEVEL] parameter that adjusts the strictness of the contradiction detection and always route SOURCE_CONFLICT claims to a human review queue before any downstream action.
Prompt Variables
Required inputs for the Multi-Document Factual Consistency Prompt. Each variable must be populated before the prompt is assembled and sent to the model. Missing or malformed inputs are the most common cause of false negatives in consistency evaluation.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[ANSWER] | The generated answer or claim set to evaluate for factual consistency across multiple documents | The Acme 3000 uses a lithium-polymer battery with a 12-hour runtime under normal load. | Must be non-empty string. If answer is empty, skip evaluation and log null result. Truncate to model context window minus prompt overhead. |
[DOCUMENTS] | Array of retrieved source documents with identifiers, each containing text to check the answer against | [{"doc_id": "doc-1", "text": "Acme 3000 battery: lithium-polymer, 10-hour runtime."}, {"doc_id": "doc-2", "text": "Acme 3000 runtime: 12 hours under normal load."}] | Must contain at least 2 documents. Each document must have doc_id and text fields. Validate JSON structure before prompt assembly. Reject if any text field is empty or null. |
[CLAIM_TYPE] | The granularity at which claims should be extracted and checked for cross-document consistency | sentence-level | Must be one of: sentence-level, clause-level, entity-level, numerical-only. Default to sentence-level if not specified. Reject unknown values before prompt assembly. |
[CONFLICT_RESOLUTION] | Instruction for how the model should handle detected contradictions between source documents | flag_all_and_require_human_review | Must be one of: flag_all_and_require_human_review, prefer_majority_source, prefer_most_recent_source, prefer_highest_authority_source. Default to flag_all_and_require_human_review for safety. |
[OUTPUT_SCHEMA] | The expected JSON structure for the consistency report, defining fields and their types | {"claim": "string", "support_status": "supported|contradicted|unsupported", "supporting_docs": ["doc_id"], "contradicting_docs": ["doc_id"], "explanation": "string"} | Must be valid JSON schema definition. Parse and validate before prompt assembly. Reject if schema contains circular references or undefined types. Include in prompt as formatted JSON block. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score required for the model to assert a consistency determination without flagging for human review | 0.85 | Must be float between 0.0 and 1.0. Claims below threshold should be marked as uncertain. Default to 0.80 if not specified. Log all below-threshold claims separately for monitoring. |
[MAX_CLAIMS] | Upper limit on the number of claims to extract and evaluate, preventing runaway token usage on long answers | 50 | Must be positive integer. If answer yields more claims than limit, prioritize claims with highest apparent factual density. Log truncation events. Default to 100 if not specified. |
Common Failure Modes
Multi-document factual consistency checks break in predictable ways. Here are the most common failure modes and how to guard against them before they reach production.
Source Conflict Blindness
What to watch: The model treats all retrieved documents as equally authoritative, producing an answer that blends contradictory claims without flagging the conflict. When Document A says 'revenue grew 12%' and Document B says 'revenue declined 3%,' the output may average them or silently pick one. Guardrail: Add an explicit conflict detection step before consistency checking. Require the prompt to enumerate all factual disagreements across sources and mark them as CONFLICT rather than resolving them automatically.
Temporal Inconsistency Drift
What to watch: Retrieved documents span different time periods, and the model fails to account for temporal context. A claim supported by a Q1 report may be contradicted by Q3 data, but the consistency check treats both as equally current. Guardrail: Include document timestamps in the prompt context and require the model to weight recency when assessing consistency. Add a TEMPORAL_MISMATCH flag for claims where older sources conflict with newer ones.
Partial Support Overconfidence
What to watch: The model marks a claim as SUPPORTED when only part of it is grounded. A claim like 'Acme Corp increased revenue by 15% and expanded into three new markets' might have evidence for the revenue figure but none for the market expansion. Guardrail: Decompose compound claims into atomic sub-claims before verification. Require the prompt to score each sub-claim independently and flag any claim where partial support exists as PARTIALLY_SUPPORTED with explicit gap documentation.
Implicit Inference Creep
What to watch: The model treats reasonable inferences as grounded facts. If a document states 'the team worked weekends throughout Q4,' the model may mark 'the project was behind schedule' as supported, even though the document never states causation. Guardrail: Add a strict instruction that only explicit statements count as support. Require the prompt to distinguish between DIRECTLY_STATED, REASONABLY_INFERRED, and UNSUPPORTED evidence levels, and treat inferences as insufficient for factual grounding.
Citation-to-Claim Mismatch
What to watch: The model cites a source that exists and is relevant but does not actually contain the specific claim being attributed to it. The citation looks legitimate on surface inspection but fails under close reading. Guardrail: Require the prompt to extract the exact passage from each cited document that supposedly supports the claim, then verify the passage contains the claim verbatim or in unambiguous paraphrase. Flag any citation where the supporting passage cannot be located as MISATTRIBUTED.
Document Boundary Leakage
What to watch: The model uses its parametric knowledge to fill gaps when retrieved documents are insufficient, then marks those filled claims as grounded. A RAG answer about a company's latest earnings may include accurate-but-unretrieved figures that the model knows from training data. Guardrail: Add a hard constraint that every grounded claim must include a direct quote or specific passage reference from the provided documents. Require the prompt to output NOT_IN_CONTEXT for any claim that cannot be traced to an explicit document span, regardless of whether the claim is factually correct.
Evaluation Rubric
Use this rubric to test whether the Multi-Document Factual Consistency Prompt correctly identifies supported claims, contradictions, and unsupported statements before shipping to production.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Supported claim detection | All claims with verbatim or paraphrased support across all documents are marked as SUPPORTED with correct source citations | Supported claim flagged as UNSUPPORTED or CONTRADICTED; missing or wrong source document ID | Run against 20 golden examples with known supported claims; measure recall >= 0.95 |
Cross-document contradiction flagging | Claims supported by one document but contradicted by another are marked CONTRADICTED with both conflicting sources cited | Contradiction missed entirely; only one source cited; claim incorrectly marked as SUPPORTED | Test with 10 document pairs containing known contradictions; verify both source IDs appear in output |
Unsupported claim identification | Claims with no evidence in any provided document are marked UNSUPPORTED with confidence score | Unsupported claim marked as SUPPORTED with hallucinated citation; confidence score missing or always 1.0 | Feed claims with no grounding in provided context; check UNSUPPORTED label and confidence < 0.9 |
Source document grounding | Every SUPPORTED or CONTRADICTED claim references at least one specific [DOCUMENT_ID] from the input | Citation references fabricated document ID; citation points to wrong document; no document ID provided | Validate all output document IDs exist in input document set; check for hallucinated IDs |
Claim extraction completeness | All factual claims in [ANSWER] are extracted and evaluated; no claim is silently dropped | Factual claim present in answer but absent from evaluation output; selective omission of weak claims | Count claims in answer manually; verify output contains equal or greater number of evaluated claims |
Partial support handling | Claims partially supported across documents are noted with PARTIAL label and explanation of what is and isn't supported | Partial support treated as full SUPPORTED or full UNSUPPORTED without nuance | Test with claims where one document supports part and another supports different part; check PARTIAL label presence |
Output schema compliance | Output matches [OUTPUT_SCHEMA] exactly: all required fields present, correct types, valid enum values for labels | Missing required fields; wrong types; invalid enum values; extra fields not in schema | Validate output against JSON Schema; reject if validation fails; check enum values are SUPPORTED, UNSUPPORTED, CONTRADICTED, or PARTIAL |
Confidence score calibration | Confidence scores correlate with evidence strength: direct quotes > 0.9, weak paraphrases 0.7-0.9, ambiguous 0.5-0.7 | All confidence scores are 1.0 regardless of evidence quality; scores below 0.5 for clearly supported claims | Compare confidence scores against human-annotated ground truth on 50 claim-evidence pairs; correlation >= 0.8 |
Implementation Harness Notes
How to wire the multi-document factual consistency prompt into a production RAG evaluation pipeline with validation, retries, and human review gates.
This prompt is designed to operate as a post-generation evaluation step in a RAG pipeline, not as a real-time user-facing response. After your primary LLM generates an answer from multiple retrieved documents, this prompt acts as a judge that compares the generated answer against all source documents simultaneously. The implementation harness must feed the prompt three structured inputs: the generated answer text, an array of source documents with unique identifiers, and a defined output schema for the consistency report. The prompt returns a structured JSON object containing per-claim analysis, source-level support/contradiction flags, and an overall consistency score. This output should never be shown directly to end users—it feeds your monitoring dashboards, alerting systems, and human review queues.
Wire this prompt into your application as an asynchronous evaluation worker. After the primary RAG response is generated, enqueue an evaluation job that calls this prompt with the answer and all retrieved documents. Use a model with strong instruction-following and JSON output capabilities—GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro are suitable defaults. Implement a validation layer that parses the JSON output and checks for required fields: claim_id, claim_text, source_id, support_status (must be one of supported, contradicted, unsupported, ambiguous), and explanation. If validation fails, retry once with the validation errors appended to the prompt as feedback. If the second attempt also fails, route the evaluation to a human review queue with the raw output and validation failure details attached. Log every evaluation result—including retries and failures—to your observability platform with the prompt version, model, latency, and consistency score for trend analysis.
For high-stakes domains like healthcare, legal, or finance, add a human-in-the-loop gate before any action is taken based on the consistency report. When the prompt detects source conflicts or flags claims as contradicted, automatically escalate the entire answer-document set to a review interface that shows the conflicting passages side by side. Do not suppress or auto-resolve contradictions—the prompt's job is detection, not adjudication. For production monitoring, track the rate of contradicted and unsupported claims over time as a key groundedness metric. Set thresholds that trigger alerts when hallucination rates exceed acceptable bounds. Finally, version this prompt alongside your primary RAG prompt in the same repository, and run regression tests against a golden dataset of known answer-document pairs with human-annotated consistency labels before any prompt change reaches production.
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 single document pair. Remove the multi-document conflict resolution section and focus on binary consistency: supported vs. unsupported. Use a simple JSON output with claim, source_id, and status fields. Run against 10–20 known examples manually.
code[SYSTEM] You are a factual consistency checker. Compare the [ANSWER] against the [SOURCE_DOCUMENT]. For each claim, output: {"claim": "...", "status": "supported|unsupported"}
Watch for
- Single-document mode misses contradictions across sources
- No severity grading means all unsupported claims look equal
- Manual review doesn't scale past ~50 examples

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