This prompt is designed for RAG application developers and AI quality engineers who need to surface disagreements in retrieved passages rather than silently resolving or ignoring them. The core job-to-be-done is: given a user query and a set of retrieved passages, produce a structured output that identifies areas of agreement, specific points of contradiction, and the evidence on each side of the disagreement. This is essential for decision-support systems, research assistants, and any application where presenting a false consensus is more harmful than acknowledging uncertainty.
Prompt
Multi-Passage Contradiction Flagging Prompt

When to Use This Prompt
Define the job, reader, and constraints for the Multi-Passage Contradiction Flagging Prompt.
The ideal user is an engineering lead or AI builder integrating this prompt into a RAG pipeline where multiple sources may conflict on facts, interpretations, or recommendations. Required context includes the original user query, the full text of each retrieved passage with source identifiers, and a defined output schema for contradiction flags. This prompt should not be used when the retrieval set is homogeneous, when all sources are known to agree, or when the application requires a single unified answer without exposing internal disagreement. It is also inappropriate for low-latency chat applications where structured contradiction analysis adds unacceptable response time.
Before deploying this prompt, verify that your retrieval pipeline is returning diverse enough sources for contradictions to surface. If your retrieval always returns passages from a single authoritative document or consistently agrees, this prompt will produce empty contradiction arrays and waste tokens. Pair this prompt with a pre-check that assesses whether multiple distinct sources or viewpoints exist in the retrieval set. For high-stakes domains such as medical, legal, or financial applications, always route flagged contradictions to human review before presenting them to end users. The prompt identifies disagreement; it does not resolve which side is correct.
Use Case Fit
Where the Multi-Passage Contradiction Flagging Prompt works and where it does not. Use these cards to decide if this prompt fits your pipeline before integrating it.
Good Fit: RAG Systems with Multiple Sources
Use when: your retrieval pipeline returns 3+ passages that may disagree on facts, dates, or interpretations. Guardrail: Run this prompt before answer synthesis so contradictions are surfaced rather than silently averaged into a hallucinated consensus.
Good Fit: Research and Decision-Support Tools
Use when: users need to see where sources disagree before making a decision. Guardrail: Present the structured contradiction output alongside the final answer so users can assess evidence quality themselves.
Bad Fit: Single-Source or Homogeneous Corpora
Avoid when: only one passage is retrieved or all passages come from the same document. Guardrail: Skip contradiction flagging and fall back to a simpler faithfulness check to avoid false flags from paraphrased repetition.
Bad Fit: Real-Time or Ultra-Low-Latency Pipelines
Avoid when: response latency must stay under 200ms and contradiction analysis adds unacceptable delay. Guardrail: Use a lightweight heuristic pre-filter to detect likely agreement before invoking the full contradiction prompt.
Required Inputs
Requires: a list of retrieved passages with source identifiers, the user query, and an output schema specifying contradiction fields. Guardrail: Validate that each passage has a unique source ID before calling the prompt to prevent attribution errors.
Operational Risk: False Contradictions
Risk: the model flags passages as contradictory when they actually describe different aspects of the same fact. Guardrail: Add an eval step that measures false-positive rate against a labeled dataset and tune the prompt's contradiction threshold accordingly.
Copy-Ready Prompt Template
A reusable prompt template for detecting and flagging contradictions across multiple retrieved passages in RAG systems.
This section provides a copy-ready prompt template for the Multi-Passage Contradiction Flagging task. The template is designed to be dropped into a RAG pipeline after retrieval but before answer generation. It instructs the model to surface disagreements rather than silently harmonizing them, producing structured output that downstream systems or human reviewers can act on. The template uses square-bracket placeholders that you replace with your specific passages, output schema requirements, and operational constraints before sending the request to the model.
textYou are a contradiction detection system. Your job is to compare multiple text passages and identify where they agree, where they disagree, and where they address different aspects of the same topic without direct conflict. ## INPUT PASSAGES [PASSAGES] ## OUTPUT SCHEMA Return a JSON object with the following structure: { "areas_of_agreement": [ { "claim": "A specific factual claim that appears consistently across sources", "supporting_passage_ids": ["passage_1", "passage_3"], "confidence": "high | medium | low" } ], "contradictions": [ { "contradiction_id": "contra_1", "topic": "Brief label for the disputed point", "position_a": { "claim": "What one side asserts", "passage_ids": ["passage_2"], "evidence_excerpt": "Relevant quote from the passage" }, "position_b": { "claim": "What the other side asserts", "passage_ids": ["passage_4"], "evidence_excerpt": "Relevant quote from the passage" }, "contradiction_type": "direct_factual | scope_difference | temporal | definitional | methodological", "resolvability": "resolvable_with_more_context | potentially_reconcilable | irreconcilable_given_evidence", "severity": "critical | moderate | minor" } ], "independent_points": [ { "point": "A claim made by only one source that others do not address", "passage_ids": ["passage_5"], "relationship_to_other_passages": "complementary | orthogonal | unverifiable" } ], "synthesis_notes": "A 2-3 sentence summary of the overall evidence picture, explicitly noting whether the passages converge, diverge, or address different questions.", "requires_human_review": true, "human_review_reason": "Explain why human review is recommended, if applicable." } ## CONSTRAINTS [CONSTRAINTS] ## INSTRUCTIONS 1. Compare every passage against every other passage for factual claims. 2. Only flag a contradiction when passages make claims that cannot all be true simultaneously. 3. Do not flag differences in emphasis, wording, or level of detail as contradictions. 4. When passages address different subtopics without overlapping claims, classify them as independent points, not contradictions. 5. For each contradiction, extract the exact evidence text that supports each position. 6. If no contradictions exist, return an empty contradictions array and explain why the passages are consistent. 7. Set requires_human_review to true if any contradiction has severity critical or if any claim affects a [RISK_DOMAIN] decision. 8. Do not invent claims not present in the passages. 9. If passages are too vague to compare, note this in synthesis_notes and return empty arrays.
Adapting the template: Replace [PASSAGES] with your retrieved text, formatted with clear passage identifiers (e.g., passage_1: "..."). Replace [CONSTRAINTS] with domain-specific rules such as 'Do not flag contradictions in opinion statements' or 'Treat passages from peer-reviewed sources as higher authority.' Replace [RISK_DOMAIN] with your application's risk context (e.g., 'clinical', 'financial', 'legal') to trigger human review for critical contradictions. If your application requires a different output format, modify the JSON schema but preserve the core fields: areas of agreement, contradictions with evidence excerpts, and a resolvability assessment.
What to do next: After copying this template, pair it with the eval criteria in the Testing and Evaluation section of this playbook. Run the prompt against a golden dataset of passage sets with known contradictions and known-consistent sets to calibrate your contradiction detection threshold. If the model produces false flags (flagging differences in wording as contradictions), add a constraint or few-shot example. If it misses contradictions, lower the detection threshold by adding an instruction like 'Flag even subtle factual disagreements.' For high-stakes domains, always route outputs with requires_human_review: true to a review queue before the contradiction report reaches end users.
Prompt Variables
Required inputs for the Multi-Passage Contradiction Flagging Prompt. Each placeholder must be populated before the prompt is sent to the model. Validation notes describe how to verify the input is well-formed before execution.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[PASSAGES] | Array of retrieved text passages to analyze for contradictions. Each passage must include a unique identifier and the full text content. | [{"id": "doc-1", "text": "The event occurred on March 15, 2024."}, {"id": "doc-2", "text": "The event was scheduled for March 16, 2024."}] | Must be a valid JSON array with at least 2 objects. Each object requires non-empty id and text fields. Reject if text fields are empty strings or ids are duplicated. |
[CLAIM_FOCUS] | Optional claim or topic to scope the contradiction analysis. When provided, the model only flags contradictions relevant to this claim rather than all disagreements across passages. | "The date of the product launch" | If null, model performs open-ended contradiction detection across all claims. If provided, must be a non-empty string under 500 characters. Validate that the claim is specific enough to scope analysis meaningfully. |
[OUTPUT_SCHEMA] | Structured schema definition specifying the exact JSON fields the model must return, including agreement areas, contradiction points, and per-side evidence. | {"agreement_areas": [{"claim": "string", "supporting_passage_ids": ["string"]}], "contradictions": [{"point": "string", "side_a": {"passage_id": "string", "evidence": "string"}, "side_b": {"passage_id": "string", "evidence": "string"}, "severity": "direct|partial|apparent"}]} | Must be a valid JSON Schema or example structure. Validate that required fields include agreement_areas, contradictions, and per-side evidence. Reject schemas that allow contradictions without evidence attribution. |
[CONFIDENCE_THRESHOLD] | Minimum confidence score (0.0 to 1.0) required for the model to flag a contradiction. Contradictions below this threshold are suppressed to reduce false flags. | 0.7 | Must be a float between 0.0 and 1.0. Default to 0.5 if not provided. Values below 0.3 produce excessive false flags; values above 0.9 risk missed contradictions. Log threshold in trace for eval comparison. |
[MAX_CONTRADICTIONS] | Upper limit on the number of contradictions the model should return. Prevents output bloat when many passages disagree on minor details. | 5 | Must be a positive integer between 1 and 20. If null, default to 10. Validate that the limit does not exceed the number of passage pairs being compared. Warn if set above 15 for latency-sensitive pipelines. |
[SEVERITY_FILTER] | Optional filter to return only contradictions at or above a specified severity level. Useful for triage workflows that prioritize direct contradictions over apparent or partial ones. | "direct" | Must be one of: direct, partial, apparent, or null. If null, all severity levels are returned. Validate against the enum. Direct contradictions indicate factual incompatibility; apparent contradictions may be resolvable with context. |
[CONTEXT_WINDOW] | Additional background context that may resolve apparent contradictions, such as document metadata, publication dates, or domain definitions. | "Document A is a draft from January. Document B is the final version from March." | If null, model analyzes passages without external resolution context. If provided, must be a string under 2000 characters. Validate that context does not contain the passages themselves to avoid leakage. |
Common Failure Modes
Multi-passage contradiction flagging is brittle in production. These are the most common failure modes and the specific guardrails that prevent them.
False Positives on Stylistic Differences
What to watch: The prompt flags passages as contradictory when they use different wording, scope, or granularity to describe the same fact. A source saying 'revenue grew 12%' and another saying 'revenue increased by approximately 12% year-over-year' are not contradictory, but the model may treat them as conflicting. Guardrail: Include explicit instructions and few-shot examples distinguishing semantic contradiction from paraphrasing, hedging, or rounding differences.
Missed Contradictions from Implicit Disagreement
What to watch: The model fails to detect contradiction when sources disagree through omission, framing, or indirect language rather than direct factual clash. One source may describe an event while another omits key participants entirely, creating contradiction by absence. Guardrail: Add a secondary check that asks the model to identify claims present in one source but absent from others, and flag material omissions as potential contradictions.
Temporal Context Collapse
What to watch: Sources from different time periods are compared as if they describe the same moment. A Q1 report and a Q3 report may both discuss 'current revenue' but refer to different periods, producing false contradiction flags. Guardrail: Require the prompt to extract and compare publication dates, reporting periods, or temporal anchors before declaring contradiction. Include a temporal alignment check in the output schema.
Over-flagging Low-Confidence Contradictions
What to watch: The model flags every possible disagreement regardless of materiality or confidence, flooding downstream systems with noise. Minor terminological differences or speculative language get treated as hard contradictions. Guardrail: Require a confidence score and materiality assessment per flagged contradiction. Set a minimum confidence threshold before surfacing to users, and route low-confidence flags to a review queue.
Source Authority Blindness
What to watch: The prompt treats all sources as equally authoritative, flagging contradictions between a peer-reviewed study and an outdated blog post as equivalent conflicts. This misleads users about the weight of disagreement. Guardrail: Include source authority metadata in the input and instruct the model to weight contradiction severity by source credibility. Flag when a low-authority source contradicts a high-authority source as an asymmetric conflict.
Synthesis Drift into False Resolution
What to watch: The model attempts to resolve or harmonize contradictions rather than flagging them, producing a synthesized answer that papers over genuine disagreement. This is especially common when the prompt is too close to a synthesis prompt. Guardrail: Use strict output formatting that separates flagging from resolution. Include an explicit instruction: 'Do not resolve, harmonize, or explain away contradictions. Your task is to surface them.' Validate output structure to ensure no resolution language appears in the contradiction fields.
Evaluation Rubric
Criteria for evaluating the quality of a Multi-Passage Contradiction Flagging output before it ships to users or downstream systems. Use this rubric to build automated tests, human review checklists, and acceptance gates.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Contradiction Recall | All genuine factual contradictions between passages are flagged in the output. | A known contradiction from the golden test set is missing from the | Run against a curated dataset of passage pairs with labeled contradictions. Measure recall at the contradiction level. |
False Flag Precision | No more than 1 false flag per 10 passage pairs. A false flag is a reported contradiction where passages actually agree or address different scopes. | Output flags a contradiction for passages that are temporally distinct, scoped to different entities, or semantically equivalent. | Human review of a random sample of flagged contradictions. Automated check: compare flags against a ground-truth set of non-contradictions. |
Agreement Area Completeness | The | A material shared fact present in both passages is omitted from the agreement summary. | Parse the |
Evidence Sidedness | Each contradiction point includes verbatim or near-verbatim evidence from both sides, correctly attributed to the source passage. | Evidence for one side of a contradiction is missing, paraphrased beyond recognition, or attributed to the wrong passage. | Schema check: |
Output Schema Validity | The output is valid JSON matching the expected schema with all required fields present and correctly typed. | JSON parse failure. Missing required field | Automated schema validation against the JSON Schema definition. Run on every output before acceptance. |
Confidence Calibration | The | A genuine contradiction receives a confidence score below 0.5. A non-contradiction receives a confidence score above 0.8. | Run on a labeled test set. Calculate Expected Calibration Error (ECE) or check that mean confidence for correct flags exceeds mean confidence for incorrect flags. |
Neutral Framing | The output describes contradictions without favoring one side, using neutral language and avoiding editorializing. | Output uses language like 'Passage A correctly states' or 'Passage B is mistaken'. Output declares a winner. | LLM-as-judge evaluation with a rubric focused on neutrality and lack of adjudication. Human spot-check on sensitive topics. |
Abstention on Ambiguity | When passages are ambiguous or address different scopes, the output either does not flag a contradiction or flags it with low confidence and an explanation. | Output confidently flags a contradiction for passages that use different definitions, timeframes, or entity scopes without noting the distinction. | Test with passage pairs designed to be ambiguous. Check that |
Implementation Harness Notes
How to wire the Multi-Passage Contradiction Flagging Prompt into a production RAG pipeline with validation, retries, and human review gates.
This prompt is designed as a post-retrieval, pre-response analysis step in a RAG pipeline. It should be invoked after the retrieval system returns a set of candidate passages but before the final answer is generated for the user. The prompt expects a structured input containing the user's query and the full text of each retrieved passage, each with a unique identifier. The model's job is to produce a structured contradiction report, not to answer the user's question. This separation of concerns—analysis first, synthesis later—is critical for production reliability. Do not combine contradiction detection with answer generation in a single prompt; the tasks compete for attention and degrade both outputs.
Wire this prompt into your application as a dedicated analysis step with its own validation layer. The output schema should be strictly enforced: expect a JSON object with areas_of_agreement (array of strings), contradictions (array of objects, each containing point_of_contention, side_a with source_ids and claim, and side_b with source_ids and claim), and unresolvable_flags (array of objects with description and source_ids). Implement a post-processing validator that checks: (1) every source_id referenced in the output exists in the input passages, (2) no contradiction entry is self-contradictory (same source on both sides), (3) areas_of_agreement entries do not appear in contradictions, and (4) the output is valid JSON. If validation fails, retry once with the error message appended to the prompt as a correction instruction. If the retry also fails, log the failure and escalate to a human review queue rather than silently proceeding.
Model choice matters here. Use a model with strong reasoning and structured output capabilities, such as GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro. Avoid smaller or older models that may conflate contradiction with simple difference or fail to maintain the output schema under pressure. Set temperature to 0 or near-zero to maximize consistency across runs. If your retrieval system returns more than 8-10 passages, pre-filter to the most relevant and authoritative sources before invoking this prompt; the model's contradiction detection accuracy degrades as passage count increases. For high-stakes domains such as legal, medical, or financial applications, always route outputs with unresolvable_flags to human review before any downstream answer generation. Log every contradiction report alongside the input passages and final user-facing answer for auditability.
The output of this prompt should feed into your answer generation step. If contradictions are detected, your synthesis prompt should receive the contradiction report as additional context and be instructed to surface disagreements rather than fabricate consensus. If unresolvable_flags are present, the synthesis prompt should refuse to produce a unified answer and instead present the conflicting evidence to the user with an explanation of why resolution is not possible from the available sources. Test this end-to-end flow with a golden dataset of known contradictory passage sets, measuring both contradiction recall (did the prompt catch all known contradictions?) and false-flag rate (did it invent contradictions where none exist?). A healthy target is recall above 0.85 and false-flag rate below 0.10 before you ship to users.
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 contradiction flagging prompt and a simple JSON schema. Use a single model call with no retry logic. Accept raw text output and parse it leniently. Focus on getting the contradiction detection logic right before adding production harness.
Prompt modification
- Remove strict schema enforcement; use a simple markdown table or bullet list as output format
- Reduce the number of required fields to
contradiction_found,areas_of_agreement, andcontradiction_points - Use a shorter system prompt: "You flag contradictions between passages. Be precise."
- Skip confidence scoring and evidence excerpt requirements
Watch for
- Missing schema checks leading to parse failures downstream
- Overly broad contradiction flags on minor wording differences
- False positives when passages use different terminology for the same fact
- Model conflating "different detail level" with "contradiction"

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