Inferensys

Prompt

Conflicting Passage Pair Identification Prompt

A practical prompt playbook for identifying pairs of passages that directly contradict each other on a given claim, designed for retrieval evaluation and QA testing pipelines in production AI workflows.
Elegant overhead shot of a polished wooden communal table in a sun-drenched WeWork lounge, laptops and tablets displaying AI workflow dashboards, plants and pendant lights in background.
PROMPT PLAYBOOK

When to Use This Prompt

Understand the job this prompt is designed for, the required inputs, and when a different approach is necessary.

This prompt identifies pairs of passages within a bounded retrieval set that directly contradict each other on a specific claim. It is built for retrieval evaluation engineers and QA pipeline builders who need to measure whether their retrieval systems surface conflicting evidence or hide disagreement. The core job-to-be-done is not open-domain contradiction search; it is a targeted diagnostic: given a claim and a set of candidate passages, which passages cannot both be true? The prompt handles both explicit textual conflicts and implicit contradictions that require inference, but it instructs the model to label the conflict type so your harness can route implicit cases for human review.

Use this prompt when you have a pre-retrieved set of passages and a single claim to test against them. The ideal user is running a RAG evaluation harness, a retrieval quality audit, or a pre-production QA gate. Required context includes the claim string, the passage set with identifiers, and an output schema that captures the conflicting pair, the conflict type, and a brief explanation. Do not use this prompt for open-ended document exploration, for comparing more than two passages at a time, or for determining which side of a conflict is correct. It is a detection tool, not a resolution or ranking tool. For resolution, pair this with a conflict resolution decision prompt; for ranking, use an evidence weighting prompt after conflicts are surfaced.

Before wiring this into a production pipeline, define your tolerance for implicit contradictions. Explicit textual conflicts—where two passages state opposite facts—are the high-confidence case. Implicit conflicts, where inference is required, carry higher error risk. Your harness should log the conflict type from every response, route implicit cases to a review queue, and track false-positive rates over time. If your domain involves nuanced methodological disagreements rather than factual contradictions, consider the source disagreement classification prompt instead. Start with a golden dataset of known conflicting and non-conflicting passage pairs to calibrate the model's sensitivity before relying on this prompt in an automated gate.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Conflicting Passage Pair Identification Prompt delivers reliable results and where it introduces operational risk.

01

Good Fit: Retrieval Evaluation Pipelines

Use when: you need to measure whether your retriever surfaces contradictory passages for the same claim. The prompt excels at pairwise comparison of short-to-medium passages against a single atomic claim. Guardrail: pre-filter passages to those that address the claim; feeding unrelated passages produces noise, not contradictions.

02

Good Fit: QA Test Case Generation

Use when: building golden datasets for grounded QA systems that must detect and surface disagreement. The prompt produces labeled contradiction pairs suitable for eval harnesses. Guardrail: always include a human review step for contradiction pairs that will become eval targets; model judgment on implicit contradiction is not ground truth.

03

Bad Fit: Implicit or Inferential Contradictions

Avoid when: contradictions require multi-hop reasoning, domain expertise, or mathematical derivation to surface. The prompt is tuned for explicit textual conflict, not logical entailment. Guardrail: pair this prompt with a separate entailment-checking step for high-recall contradiction detection in scientific or legal domains.

04

Bad Fit: Long-Form Document Comparison

Avoid when: comparing full documents or sections longer than a few paragraphs. The prompt degrades as passage length exceeds the model's effective attention span for fine-grained comparison. Guardrail: chunk documents into claim-aligned segments before running contradiction detection; never feed entire PDFs.

05

Required Inputs

Must provide: a single atomic claim and a set of candidate passages that each address that claim. Missing or vague claims produce false positives. Guardrail: validate that each passage actually discusses the claim before running contradiction detection; use a relevance filter upstream.

06

Operational Risk: False Positives on Paraphrased Agreement

Risk: the model flags passages as contradictory when they agree but use different terminology, scope, or framing. This inflates contradiction counts and erodes trust in the pipeline. Guardrail: add a verification step that checks whether flagged pairs are genuine contradictions or stylistic differences; log false-positive rate per domain.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A production-ready prompt template for identifying conflicting passage pairs, with placeholders for your data and harness integration.

This prompt template is designed to be copied directly into your AI harness. It instructs the model to analyze a set of passages against a given claim and identify pairs that directly contradict each other. The model is required to return structured JSON with conflict pairs, conflict types, and explanations grounded in the passage text. Before using this prompt, ensure you have a clear claim statement and a set of retrieved passages that may contain conflicting information. This prompt is not suitable for identifying subtle differences in scope or methodology—it targets direct factual contradictions.

text
You are an evidence conflict detection system. Your task is to identify pairs of passages that directly contradict each other regarding a specific claim.

## INPUT
Claim: [CLAIM]

Passages:
[PASSAGES]

## OUTPUT_SCHEMA
Return a JSON object with the following structure:
{
  "conflict_pairs": [
    {
      "passage_a_id": "string",
      "passage_b_id": "string",
      "conflict_type": "direct_contradiction | mutually_exclusive | factual_disagreement",
      "explanation": "string explaining the contradiction, quoting relevant text from both passages",
      "claim_relationship": "supports | refutes | partially_supports | partially_refutes"
    }
  ],
  "no_conflict_pairs": boolean
}

## CONSTRAINTS
- Only identify pairs where passages directly contradict each other on the claim.
- Do not flag differences in scope, methodology, or level of detail as contradictions.
- Each explanation must include verbatim quotes from both passages.
- If no conflicting pairs are found, set no_conflict_pairs to true and return an empty conflict_pairs array.
- Do not invent conflicts that are not explicitly supported by the text.

## EXAMPLES
[EXAMPLES]

To adapt this prompt for your specific use case, replace the [CLAIM] placeholder with the statement you want to verify. The [PASSAGES] placeholder should contain a list of passages, each with a unique identifier and the passage text. For best results, format passages as a JSON array or numbered list with clear IDs. The [EXAMPLES] placeholder should be replaced with 2-3 few-shot examples demonstrating correct conflict identification, including edge cases where passages appear to conflict but actually discuss different aspects of the claim. If your application requires additional output fields—such as confidence scores or source metadata—extend the OUTPUT_SCHEMA section while maintaining the core conflict pair structure. For high-stakes applications, always route outputs through a human review step before taking action on detected conflicts.

IMPLEMENTATION TABLE

Prompt Variables

Variables required by the Conflicting Passage Pair Identification Prompt. Validate each before sending to the model to prevent runtime failures and ambiguous outputs.

PlaceholderPurposeExampleValidation Notes

[CLAIM]

The assertion to check for contradictions across passages

The new pricing model increases revenue by 15%

Must be a single, self-contained declarative sentence. Reject if empty, multi-claim, or a question. Length: 10-300 characters.

[PASSAGES]

Array of text passages to scan for contradictions

[{"id":"p1","text":"Revenue grew 15% after the pricing change."},{"id":"p2","text":"The pricing change had no measurable revenue impact."}]

Must be a JSON array with 2-20 objects. Each object requires 'id' (string) and 'text' (string, 20-2000 chars). Reject if fewer than 2 passages.

[CONTRADICTION_TYPE]

Scope of contradiction detection to apply

explicit

Must be one of: 'explicit', 'implicit', or 'both'. Default to 'explicit' if not provided. Reject unknown values.

[CONFIDENCE_THRESHOLD]

Minimum confidence score for reporting a contradiction pair

0.7

Float between 0.0 and 1.0. Pairs scoring below this threshold are omitted from output. Default: 0.5. Reject values outside range.

[OUTPUT_FORMAT]

Structure of the contradiction pair output

json

Must be 'json' or 'jsonl'. Controls whether output is a single JSON array or newline-delimited JSON objects. Default: 'json'.

[MAX_PAIRS]

Upper limit on contradiction pairs returned

10

Integer between 1 and 50. Model stops after finding this many qualifying pairs. Prevents runaway token usage on large passage sets. Default: 20.

[INCLUDE_EVIDENCE_SPANS]

Whether to extract the specific conflicting text spans

Boolean: true or false. When true, output includes the exact substrings from each passage that conflict. Adds token cost. Default: false.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the conflicting passage pair identification prompt into an evaluation pipeline or QA testing harness.

This prompt is designed to operate as a batch evaluation step inside a retrieval quality or fact-verification pipeline, not as a real-time user-facing endpoint. The typical integration pattern is: retrieve a set of passages for a claim, run this prompt over all passage pairs (or a sampled subset for large retrieval sets), collect contradiction verdicts, and feed results into downstream metrics such as retrieval precision, conflict density, or hallucination risk scores. Because the prompt performs pairwise comparison, the harness must manage the combinatorial explosion—for N passages, there are N*(N-1)/2 pairs—so implement a pair budget (e.g., top-K by retrieval score) or use a lightweight pre-filter to skip obviously non-conflicting pairs before invoking the LLM.

Validation and output contracts are critical here. The prompt should return structured JSON with fields like passage_a_id, passage_b_id, contradiction_detected (boolean), contradiction_type (enum: explicit, implicit, none), conflicting_claim, and explanation. Implement a post-processing validator that checks: (1) both passage IDs exist in the input set, (2) contradiction_detected is consistent with contradiction_type, (3) the conflicting_claim is a non-empty string when contradiction is detected, and (4) the explanation references specific text spans from both passages. Failed validations should trigger a single retry with the validation error message appended to the prompt; if the retry also fails, log the pair for human review rather than silently accepting a malformed output. For high-stakes domains (legal, clinical, financial), route all detected contradictions to a human review queue before they influence downstream decisions.

Model choice and latency planning depend on your throughput requirements. For offline evaluation pipelines processing thousands of passage pairs, batch the pairs into requests of 10–20 comparisons per call to amortize prompt overhead, and use a fast model (e.g., GPT-4o-mini, Claude Haiku) for the initial sweep. Reserve a stronger model (GPT-4o, Claude Sonnet) for edge-case re-evaluation when the primary model returns low-confidence or ambiguous results. Log every comparison with the model version, prompt template hash, input passage IDs, raw output, validation status, and final verdict. This trace data becomes your golden evaluation set for regression testing when you iterate on the prompt or switch models. The most common production failure mode is false positives on paraphrased agreement—two passages saying the same thing in different words flagged as contradictory. Mitigate this by including few-shot examples of paraphrased agreement labeled as contradiction_detected: false and by running periodic spot-checks on a stratified sample of verdicts.

To integrate this into a CI/CD pipeline for prompt regression testing, maintain a curated test suite of 50–100 passage pairs with known contradiction labels (including edge cases: implicit contradictions, numerical disagreements, scope mismatches, and paraphrased agreement). Run the prompt against this suite on every prompt change, and fail the pipeline if precision or recall drops below your threshold (suggested starting point: precision ≥ 0.85, recall ≥ 0.80 on explicit contradictions). Pair this with an LLM-as-judge evaluation step that independently reviews a sample of production verdicts for consistency and correctness, feeding discrepancies back into your test suite. Avoid wiring contradiction detection directly into user-facing answer generation without a human-in-the-loop step for high-severity conflicts.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the structured response for the Conflicting Passage Pair Identification Prompt. Use this contract to validate model output before it enters downstream retrieval evaluation or QA testing pipelines.

Field or ElementType or FormatRequiredValidation Rule

conflict_pairs

array of objects

Array must contain at least 1 object if conflicts exist, or be empty array if none found. Schema check required.

conflict_pairs[].passage_a_id

string

Must match an id from the input passages array. Parse check: non-empty, present in input set.

conflict_pairs[].passage_b_id

string

Must match an id from the input passages array. Parse check: non-empty, present in input set, not equal to passage_a_id.

conflict_pairs[].claim

string

The specific claim on which the two passages contradict. Must be a declarative statement extractable from or directly inferable from both passages. Null not allowed.

conflict_pairs[].conflict_type

enum: explicit | implicit

Explicit: passages contain directly opposing statements. Implicit: contradiction requires inference from context, scope, or implications. Enum check required.

conflict_pairs[].passage_a_evidence

string

Verbatim quote or close paraphrase from passage_a supporting the contradiction claim. Must be traceable to passage_a text. Citation check required.

conflict_pairs[].passage_b_evidence

string

Verbatim quote or close paraphrase from passage_b supporting the contradiction claim. Must be traceable to passage_b text. Citation check required.

no_conflicts_detected

boolean

true if conflict_pairs array is empty and model confirms no contradictions found. false otherwise. Must be consistent with conflict_pairs length.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when identifying conflicting passage pairs and how to guard against it in production.

01

False Positives on Paraphrased Agreement

What to watch: The model flags passages as contradictory when they actually agree but use different terminology, scope, or framing. This is the most common failure mode and inflates conflict counts with noise. Guardrail: Add a pre-check instruction requiring the model to verify whether both passages address the same specific claim before declaring contradiction. Include few-shot examples of paraphrased agreement labeled as non-conflict.

02

Missed Implicit Contradictions

What to watch: The model catches explicit textual conflicts but misses contradictions that require inference—such as when one passage implies a fact that another passage indirectly negates. Guardrail: Include an explicit instruction to check for logical entailment and contradiction, not just surface-level keyword opposition. Test with pairs where contradiction requires one inferential step.

03

Scope Mismatch Misclassification

What to watch: Passages discussing different time periods, populations, conditions, or geographic regions are flagged as contradictory when they are actually compatible within their respective scopes. Guardrail: Require the model to extract and compare scope qualifiers before declaring conflict. Add a validation step that checks whether scope differences explain the apparent disagreement.

04

Over-Confidence on Ambiguous Claims

What to watch: The model confidently labels passages as contradictory when the underlying claim is vague, underspecified, or open to multiple interpretations. Guardrail: Add an uncertainty tier to the output schema. Require the model to flag when the claim itself needs disambiguation before conflict assessment is reliable. Route ambiguous cases to human review.

05

Source Echo Detection Failure

What to watch: The model treats two passages as independent conflicting sources when one is actually quoting, citing, or paraphrasing the other—creating a phantom conflict. Guardrail: Instruct the model to check for citation chains, direct quotes, and shared provenance before treating sources as independent. Include a source-independence check in the output schema.

06

Temporal Drift Without Context

What to watch: Passages from different publication dates conflict because facts changed over time, but the model presents them as equivalent contemporaneous sources rather than flagging temporal relevance. Guardrail: Require date extraction for each passage and add a temporal-comparison field. When dates differ significantly, instruct the model to assess whether the conflict is due to factual change rather than genuine disagreement.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the Conflicting Passage Pair Identification prompt before shipping. Each criterion targets a known failure mode: false positives on paraphrased agreement, missed implicit contradictions, and over-triggering on scope differences.

CriterionPass StandardFailure SignalTest Method

Explicit Contradiction Recall

All pairs with direct, opposite factual claims on [CLAIM] are identified

Output misses a pair where Passage A states X and Passage B states not-X on the same dimension

Golden dataset of 20 known contradictory pairs; require recall >= 0.95

Implicit Contradiction Detection

Pairs requiring one inference step to surface contradiction are identified and flagged with an inference note

Output treats implicit contradictions as agreement or ignores them entirely

Curated set of 10 implicit contradictions; require detection rate >= 0.80 with inference note present

Paraphrased Agreement Precision

Zero false positives on passage pairs that agree but use different wording

Output flags a pair as contradictory when both passages support the same claim with synonymous language

Adversarial set of 15 paraphrased-agreement pairs; require false positive rate = 0

Scope Difference Handling

Pairs discussing different time periods, populations, or conditions are not flagged as contradictory

Output marks a pair as contradictory when passages address non-overlapping scopes

Scope-difference test set of 10 pairs; require contradiction flag rate = 0

Contradiction Type Classification

Each flagged pair includes a correct type label from [CONTRADICTION_TYPES] enum

Type label is missing, incorrect, or defaults to a catch-all category when a specific type applies

Validate output against expected type labels on 15 labeled pairs; require accuracy >= 0.90

Source Span Extraction

Each flagged pair includes the specific contradicting text spans from both passages

Spans are missing, truncated, or cite text that does not contain the contradiction

Manual review of 20 outputs; require span accuracy >= 0.95 with exact text match from source passages

Empty Input Handling

Returns empty array or explicit no-conflict-found indicator when no contradictions exist

Hallucinates a contradiction or returns a non-empty array for a set of agreeing passages

Test with 5 all-agreement passage sets; require empty output or no-conflict indicator

Output Schema Compliance

Output strictly matches [OUTPUT_SCHEMA] with all required fields present and correctly typed

Missing fields, extra fields, or type mismatches in the JSON output

Schema validation check on 50 outputs; require 100% schema compliance

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small hand-labeled dataset of 20–30 passage pairs. Remove strict output schema requirements initially—accept free-text contradiction descriptions. Use a lightweight script to call the model and log raw outputs for manual review.

Add a simple instruction: If no contradiction is found, respond with "NO_CONTRADICTION". This makes initial eval easier.

Watch for

  • The model flagging paraphrased agreement as contradiction
  • Implicit contradictions that require domain inference being missed
  • Inconsistent formatting when you later add schema constraints
Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.