Inferensys

Prompt

Multi-Source Conflict Detection Prompt Template

A practical prompt playbook for detecting contradictory claims across retrieved documents and outputting structured conflict reports in production RAG workflows.
Stylish WeWork-like workspace with hot desks and document wall, professional searching through enterprise knowledge base on a mounted ultrawide display, warm industrial pendants overhead.
PROMPT PLAYBOOK

When to Use This Prompt

Understand the job-to-be-done, ideal user, required context, and when not to use the Multi-Source Conflict Detection Prompt Template.

This prompt is designed for knowledge base operators and RAG pipeline builders who need to detect when retrieved documents make contradictory claims about the same fact, entity, or event. Use it when your retrieval system returns multiple sources and you must surface disagreements rather than silently averaging or ignoring them. The prompt expects pre-retrieved document chunks with source identifiers and outputs a structured conflict report with source pairs, claim excerpts, conflict type classification, and severity indicators.

This is a detection prompt, not a resolution prompt. It identifies contradictions but does not decide which source is correct. Pair it with source credibility weighting or temporal conflict resolution prompts when you need to resolve conflicts after detection. The prompt works best with 3-15 document chunks. Fewer than 3 sources makes conflict detection trivial. More than 15 may exceed context windows or produce noisy results.

Do not use this prompt when you have a single source, when all sources are known to be authoritative and consistent, or when your application should present a unified answer without exposing internal disagreements. For high-stakes domains such as healthcare, legal, or finance, always route detected conflicts to human review before surfacing them to end users. The prompt identifies contradictions but does not assess their materiality to the user's question—you must apply domain-specific severity thresholds downstream.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Multi-Source Conflict Detection Prompt Template delivers value and where it introduces risk. This prompt is designed for structured contradiction surfacing, not for resolving disputes or generating final answers.

01

Good Fit: Pre-Generation Audit

Use when: you need to scan retrieved chunks for contradictions before generating a user-facing answer. Guardrail: Run this prompt as a filter step in your RAG pipeline; route conflicting sets to a separate synthesis or abstention prompt.

02

Bad Fit: Open-Domain Chat

Avoid when: the user expects a single, conversational answer without a structured conflict report. Guardrail: Do not inject this prompt into general chat flows. Use it only in explicit 'audit' or 'review' modes where structured output is expected.

03

Required Inputs

What you need: A list of document chunks with stable source_id and text fields. Guardrail: Validate that every chunk has a unique, traceable identifier before calling the prompt. Missing IDs make the conflict report unactionable.

04

Operational Risk: False Positives

What to watch: The model flags paraphrased agreement as a contradiction. Guardrail: Implement a confidence threshold in the harness. Route low-confidence conflicts to a secondary verification prompt or human review queue.

05

Operational Risk: Missed Contradictions

What to watch: Implicit contradictions or conflicts requiring domain knowledge are missed. Guardrail: Pair this prompt with a domain-specific conflict taxonomy. Run periodic eval suites with seeded contradictions to measure recall.

06

Scale Limit: Large Document Sets

What to watch: Pairwise comparison explodes with many chunks. Guardrail: Pre-filter chunks by topic or entity before running conflict detection. Batch into manageable windows and merge reports in a post-processing step.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable system prompt for detecting contradictory claims across multiple retrieved documents and producing a structured conflict report.

This template is designed to be dropped directly into your system prompt or user message template within a RAG pipeline. It instructs the model to act as a contradiction detector, comparing claims across a set of provided documents. The prompt is structured to force a systematic, claim-by-claim comparison rather than a superficial summary, which is critical for high-recall conflict detection. Before using this template, ensure your retrieval step has already gathered a candidate set of documents that are topically related; this prompt does not perform retrieval, only analysis of the provided context.

markdown
You are a contradiction detection engine. Your task is to analyze the provided [DOCUMENTS] and identify all pairs of claims that directly contradict each other. A contradiction exists only when two claims cannot both be true at the same time and in the same respect.

## INPUT
[DOCUMENTS]: A JSON array of document objects. Each object has an `id` (string), `text` (string), and optional `metadata` (object with `date`, `source`, `authority`).

## TASK
1. Extract all discrete, verifiable factual claims from each document.
2. Compare every claim against every other claim from a different document.
3. Identify pairs that are logically contradictory.
4. Classify each contradiction by type: `factual` (direct fact dispute), `numerical` (conflicting numbers), `temporal` (date/sequence conflict), `categorical` (mutually exclusive classifications), or `definitional` (conflicting definitions of a term).
5. Assess the severity of each conflict: `critical` (impacts a core decision or regulatory requirement), `major` (significant disagreement on an important point), `minor` (disagreement on a peripheral detail), or `informational` (notable but low impact).

## CONSTRAINTS
- Do not flag differences in phrasing or emphasis as contradictions unless the underlying facts are mutually exclusive.
- If a claim in Document A is more specific than a claim in Document B, and the specific claim does not logically contradict the general one, do not flag it.
- Ignore contradictions that are resolved by a clear temporal precedence rule (e.g., Document B is an explicit update to Document A) unless the [TEMPORAL_PRECEDENCE_RULES] field specifies otherwise.
- If [RISK_LEVEL] is `high`, you must flag borderline cases and include a `confidence` score (0.0 to 1.0) for each contradiction.

## OUTPUT_SCHEMA
Return a valid JSON object with the following structure:
{
  "contradictions": [
    {
      "id": "string, unique contradiction identifier",
      "claim_a": {
        "document_id": "string",
        "excerpt": "string, the exact text of the claim",
        "paraphrase": "string, a normalized version of the claim"
      },
      "claim_b": {
        "document_id": "string",
        "excerpt": "string",
        "paraphrase": "string"
      },
      "conflict_type": "factual | numerical | temporal | categorical | definitional",
      "severity": "critical | major | minor | informational",
      "explanation": "string, a concise explanation of why these claims cannot both be true",
      "confidence": number, // only if RISK_LEVEL is high
      "resolution_hint": "string or null, a suggestion for how a human might resolve the conflict"
    }
  ],
  "analysis_metadata": {
    "total_documents_analyzed": number,
    "total_claims_extracted": number,
    "total_contradictions_found": number,
    "execution_notes": "string, any caveats about the analysis"
  }
}

## EXAMPLES
[EXAMPLES]

## TEMPORAL PRECEDENCE RULES
[TEMPORAL_PRECEDENCE_RULES]

## RISK_LEVEL
[RISK_LEVEL]

To adapt this template, start by populating the [DOCUMENTS] placeholder with your retrieved chunks, ensuring each has a stable id that maps back to your source system. The [EXAMPLES] field is critical for aligning the model with your definition of contradiction; include at least two positive examples (clear contradictions with correct classifications) and one negative example (similar claims that are not contradictory). Set [RISK_LEVEL] to high for regulated domains like healthcare or finance to enable confidence scoring and force the model to surface borderline cases for human review. The [TEMPORAL_PRECEDENCE_RULES] field should be a short natural-language policy, such as "Documents with a later date field supersede earlier documents on the same fact." After generating the output, always validate the JSON structure and run the eval checks described in the Testing and Evaluation section of this playbook before integrating the results into a downstream workflow.

IMPLEMENTATION TABLE

Prompt Variables

Validate these inputs before sending the prompt. Missing or malformed variables are the most common cause of silent failures in conflict detection pipelines.

PlaceholderPurposeExampleValidation Notes

[DOCUMENTS]

Array of retrieved document objects to scan for contradictions

[{"id": "doc-42", "text": "The API was deprecated in Q3 2024.", "metadata": {"source": "changelog", "date": "2024-09-15"}}]

Must be a non-empty array. Each object requires id and text fields. metadata is optional but strongly recommended for source attribution. Reject if text fields are empty or whitespace-only.

[CLAIM_TYPES]

List of contradiction categories the prompt should detect

["factual", "temporal", "numerical", "definitional"]

Must be a non-empty array of strings. Supported values: factual, temporal, numerical, definitional, methodological, jurisdictional. Unknown values should trigger a pre-flight warning but not block execution.

[CONFIDENCE_THRESHOLD]

Minimum confidence score for reporting a conflict

0.7

Must be a float between 0.0 and 1.0. Values below 0.5 increase false positives. Values above 0.9 risk missed contradictions. Default to 0.7 if not provided. Reject non-numeric inputs.

[OUTPUT_SCHEMA]

Expected JSON structure for the conflict report

{"conflicts": [{"claim_pair": ["...", "..."], "type": "factual", "severity": "major"}]}

Must be a valid JSON Schema object or a plain-text description of expected fields. If omitted, the prompt uses a default schema. Validate that required fields (claim_pair, type, severity) are present in the schema definition.

[MAX_CONFLICTS]

Upper bound on reported conflicts to prevent runaway output

20

Must be a positive integer. Prevents token blowout on large document sets. Default to 15 if not provided. Values above 50 should trigger a warning about response latency and cost.

[SOURCE_METADATA_MAP]

Mapping from document IDs to credibility weights or recency scores

{"doc-42": {"credibility": 0.9, "recency_days": 30}}

Optional. If provided, must be a valid JSON object with document IDs as keys. Credibility values must be floats 0.0-1.0. Recency values must be non-negative integers. Null values allowed for unknown metadata.

[ABSTENTION_RULES]

Conditions under which the prompt should refuse to classify a conflict

{"insufficient_overlap": true, "single_source_only": true}

Optional. If provided, must be a valid JSON object with boolean values. Supported keys: insufficient_overlap, single_source_only, low_confidence, out_of_domain. All default to true if the object is omitted.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Multi-Source Conflict Detection prompt into a production RAG pipeline with validation, retries, and human review routing.

The Multi-Source Conflict Detection prompt is designed to operate as a post-retrieval, pre-generation step in a RAG pipeline. After your retriever returns a set of candidate documents for a user query, batch those documents into this prompt to produce a structured conflict report. The report then becomes a decision point: if no conflicts are found, proceed to answer generation; if conflicts are detected, route the output to a conflict-aware answer prompt or escalate to a human review queue. This prompt is not a user-facing answer generator—it is an analysis tool that feeds downstream logic.

Wire this prompt into your application as a dedicated service with a strict JSON output contract. Use a model that supports structured outputs (e.g., GPT-4o with response_format or Claude with tool use) and set the [OUTPUT_SCHEMA] to match your internal conflict report schema. Implement a validation layer that checks for required fields (source_pairs, claim_excerpts, conflict_type, severity) and rejects malformed responses. On validation failure, retry once with the error message appended to the prompt. Log every conflict detection call with the input document count, detected conflict count, and validation status for observability. For high-stakes domains, add a human review step when severity is critical or when the number of detected conflicts exceeds a configurable threshold.

Common failure modes include false positives from paraphrased agreement (the model flags two sources saying the same thing differently as a conflict) and missed contradictions when documents use different terminology for the same entity. Mitigate the first by tuning the [CONSTRAINTS] field to require semantic equivalence checks before flagging a conflict. Mitigate the second by ensuring your retrieval step includes query expansion and that documents are pre-processed with entity resolution. Build an eval set with known conflict and no-conflict document pairs, and measure precision and recall against human labels before deploying. Start with a low severity threshold for human review and tighten it as your eval metrics improve.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, format, and validation rules for the structured conflict report generated by the Multi-Source Conflict Detection Prompt. Use this contract to parse, validate, and route outputs before they reach downstream systems or human reviewers.

Field or ElementType or FormatRequiredValidation Rule

conflict_id

string (UUID v4)

Must be a valid UUID v4 string. Generate if not present in model output. Used for deduplication and audit trails.

source_pair

array of 2 objects

Array must contain exactly 2 elements. Each object must have 'source_id' (string) and 'excerpt' (string, max 500 chars). Excerpts must be non-empty and distinct.

claim_summary

string

Must be 10-200 characters. Cannot be identical to either source excerpt. Must describe the contradictory point, not restate a single source.

conflict_type

enum string

Must be one of: 'direct_contradiction', 'temporal_conflict', 'definitional_conflict', 'numerical_discrepancy', 'jurisdictional_conflict', 'methodological_conflict'. Reject any other value.

severity

enum string

Must be one of: 'critical', 'major', 'minor', 'informational'. Default to 'major' if model output is missing or invalid.

confidence_score

number (0.0-1.0)

Must be a float between 0.0 and 1.0 inclusive. If null or out of range, set to 0.5 and flag for human review. Scores below 0.6 should route to review queue.

resolution_status

enum string

Must be one of: 'unresolved', 'resolved_by_recency', 'resolved_by_authority', 'escalated'. Default to 'unresolved' if missing.

recommended_action

string

Must be one of: 'human_review_required', 'surface_to_user', 'suppress_low_confidence', 'auto_resolve'. If severity is 'critical', this field must be 'human_review_required' or validation fails.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when detecting contradictions across multiple sources and how to guard against it in production.

01

False Positives from Paraphrasing

What to watch: The model flags two passages as contradictory when they actually say the same thing using different wording, terminology, or granularity. This inflates conflict counts and erodes user trust. Guardrail: Add a pre-check instruction requiring the model to verify semantic equivalence before classifying a conflict. Include few-shot examples of paraphrased agreement vs. genuine contradiction.

02

Missed Temporal Conflicts

What to watch: Sources with different effective dates contain conflicting facts, but the model treats them as equally valid because it ignores document timestamps or version metadata. Guardrail: Explicitly pass [DOCUMENT_DATE] or [EFFECTIVE_DATE] in the context for each source. Add a temporal precedence rule in the prompt: newer authoritative sources supersede older ones unless flagged as historical reference.

03

Silent Conflict Suppression

What to watch: The model resolves ambiguity by picking one source and ignoring the other, producing a clean answer that hides the disagreement entirely. This is dangerous in legal, medical, and financial contexts. Guardrail: Require the output schema to include a conflicts array even when empty. Add an explicit instruction: 'If sources disagree, you MUST surface the conflict. Do not silently choose one side.'

04

Granularity Mismatch Over-Flagging

What to watch: One source makes a broad claim while another makes a narrow exception, and the model flags this as a contradiction when it is actually a scope difference. Guardrail: Add a conflict type classification step that distinguishes 'direct contradiction' from 'scope or condition difference.' Include a severity field so minor scope mismatches don't trigger high-priority alerts.

05

Source Credibility Blindness

What to watch: The model treats all sources as equally credible, so a conflict between an authoritative primary source and an outdated tertiary source gets equal weight. Guardrail: Pass source metadata including [SOURCE_TYPE], [AUTHORITY_SCORE], and [RECENCY]. Add a weighting instruction: 'When sources conflict, prefer sources with higher authority and more recent publication dates. Explain your weighting in the output.'

06

Context Window Truncation Drops Evidence

What to watch: When many documents are retrieved, the context window cuts off later passages, and the model misses contradictions that would have been visible with full evidence. Guardrail: Implement pre-retrieval deduplication and salience filtering. Add a completeness check: 'If you suspect evidence is incomplete or truncated, set evidence_complete: false and note what context may be missing.'

IMPLEMENTATION TABLE

Evaluation Rubric

Run these checks on a golden dataset of 20-50 document sets with known conflicts. Each row targets a specific failure mode for the Multi-Source Conflict Detection Prompt Template.

CriterionPass StandardFailure SignalTest Method

Recall of Known Conflicts

= 90% of human-annotated conflicts are detected

Missed contradictions in the golden set; output reports fewer conflicts than expected

Compare detected conflict count against annotated ground truth; compute recall per document set

Precision of Detected Conflicts

= 85% of detected conflicts are genuine contradictions

Output flags paraphrased agreement as conflict; false positives on synonymous statements

Human review of a random sample of 50 detected conflicts; label each as true or false positive

Conflict Type Classification Accuracy

= 80% of classified conflict types match human labels

Factual contradiction mislabeled as temporal drift; definitional conflict confused with data quality issue

Confusion matrix comparing model-assigned type to human-annotated type across all detected conflicts

Source Pair Identification

Both source IDs are correct for >= 95% of detected conflicts

Wrong document cited; source ID hallucinated; single-source conflict reported

Validate each source ID in the output against the input document set; flag missing or fabricated IDs

Claim Excerpt Fidelity

= 90% of excerpts are verbatim or near-verbatim from source text

Paraphrased or fabricated claim text that does not appear in the source document

String similarity check between output excerpt and source document; flag similarity below 0.85 threshold

Output Schema Compliance

100% of outputs parse as valid JSON matching the defined schema

Missing required fields; wrong data types; extra fields; malformed JSON

Automated schema validation against the expected JSON Schema definition; count parse failures

Empty Input Handling

Returns empty conflict array with no errors when no contradictions exist

Hallucinates conflicts in consistent document sets; returns error or malformed output

Test with 10 document sets containing zero known conflicts; verify empty results and valid schema

Severity Scoring Calibration

Severity scores correlate with human severity ratings (Spearman rho >= 0.7)

Critical conflicts scored as minor; trivial wording differences scored as critical

Rank correlation between model-assigned severity and human-annotated severity across 30 conflicts

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a frontier model (GPT-4o, Claude 3.5 Sonnet) and minimal post-processing. Focus on getting the conflict report structure right before adding validation. Start with 2-3 source documents and a small set of known conflicts to calibrate output shape.

Simplify the output schema to essential fields only: conflict_id, source_a, source_b, claim_excerpt_a, claim_excerpt_b, conflict_type, severity. Drop confidence scoring and resolution recommendations until the detection logic stabilizes.

Watch for

  • Over-detection: the model flags stylistic differences or paraphrasing as contradictions
  • Missing conflict_type classification when sources disagree on degree rather than fact
  • Output drift when document length varies significantly across test cases
  • Model hallucinating source excerpts that don't appear in the provided context
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.