This prompt is designed for the evidence selection stage of a Retrieval-Augmented Generation (RAG) pipeline, specifically when your knowledge base contains documents that disagree on material facts, dates, figures, or interpretations. The core job-to-be-done is to produce a structured, auditable resolution of contradictory evidence before it reaches the answer synthesis step. The ideal user is an AI engineer or technical decision maker building a RAG system for legal, financial, or regulatory domains where surfacing conflict is a feature, not a bug, and where hiding disagreement creates unacceptable compliance or decision risk. You should use this prompt when your retrieval step returns multiple passages that may contradict each other, and you need a deterministic, traceable method to rank them by agreement, source authority, and resolution status.
Prompt
Source Conflict Resolution and Ranking Prompt

When to Use This Prompt
Identify the right conditions and prerequisites for deploying the Source Conflict Resolution and Ranking Prompt in a production RAG system.
The prompt assumes you already have a set of retrieved passages and their associated metadata, including source identifiers, publication dates, and authority classifications. It does not perform retrieval itself, nor does it generate a final answer. Instead, it acts as a conflict-aware re-ranker that applies majority-agreement scoring, source authority weighting, and explicit flagging of unresolved conflicts. The output is a ranked list with scores and conflict flags, which your downstream synthesis prompt can use to decide what to cite, what to caveat, and what to present as contested. This separation of concerns is critical: conflict resolution is a distinct reasoning step that should be logged and audited independently of the final answer generation.
Do not use this prompt when your knowledge base is homogeneous, curated, or known to be conflict-free. In those cases, a simpler relevance or credibility ranking prompt will be more cost-effective and faster. Also avoid this prompt for real-time chat applications where latency is critical and the conflict resolution step adds unacceptable delay. If your system cannot tolerate surfacing any disagreement to the end user, this prompt is not the right tool; you would instead need a prompt that selects a single 'best' answer and suppresses alternatives. Finally, if your source documents lack authority metadata, the source authority weighting component will be ineffective, and you should either enrich your metadata pipeline or use a simpler conflict-flagging prompt that relies solely on content analysis.
Use Case Fit
Where this prompt works and where it does not. Source conflict resolution requires structured evidence, clear authority signals, and a tolerance for surfacing unresolved disagreements rather than forcing consensus.
Good Fit: Multi-Source Legal or Financial Corpora
Use when: your RAG system retrieves from heterogeneous document collections where sources carry explicit authority weights (statutes > commentary, audited financials > press releases). Guardrail: encode source authority tiers in the prompt's ranking schema and require the model to explain weighting decisions.
Bad Fit: Single-Source or Homogeneous Knowledge Bases
Avoid when: all passages come from one document or equally authoritative sources with no meaningful credibility differentiation. Guardrail: use a simpler relevance ranking prompt instead; conflict resolution overhead adds latency and token cost without improving output quality.
Required Inputs: Structured Evidence with Metadata
What to watch: the prompt expects passages with source identifiers, dates, and authority levels. Passing raw text chunks without metadata produces unreliable rankings. Guardrail: validate that each passage object includes source_id, source_type, date, and authority_tier before invoking the prompt.
Operational Risk: Forced Consensus on Irreconcilable Conflicts
What to watch: the model may fabricate a middle-ground resolution when sources genuinely contradict and no resolution exists. Guardrail: require explicit unresolved_conflicts output with severity flags; set a policy that unresolved conflicts trigger human review rather than automated answer synthesis.
Latency Risk: Large Evidence Sets with Pairwise Comparison
What to watch: ranking with conflict detection scales poorly as passage count grows; pairwise comparison across 20+ passages can exceed context windows or timeout budgets. Guardrail: pre-filter to top-K passages with a lightweight relevance scorer before invoking conflict resolution; set a hard cap of 10-12 passages.
Audit Trail Requirement: Explainability for Regulated Use
What to watch: downstream reviewers need to understand why one source was preferred over another. Opaque rankings create compliance risk. Guardrail: require the prompt to output a conflict_resolution_rationale field per decision, and log the full prompt-response pair as an audit artifact before answer synthesis proceeds.
Copy-Ready Prompt Template
A reusable prompt template for resolving conflicts between contradictory source passages, producing a ranked evidence set with majority-agreement scoring, authority weighting, and explicit conflict flags.
This prompt template is designed for legal, financial, and compliance RAG systems where retrieved passages may contradict each other. It instructs the model to identify conflicts, weight sources by authority and recency, compute majority-agreement scores, and produce a conflict-resolved ranking. The output includes explicit flags for unresolved conflicts so downstream answer synthesis can decide whether to present competing views, request more evidence, or escalate for human review. Replace each square-bracket placeholder with your actual data before sending the prompt to the model.
textYou are a source conflict resolution engine operating inside a regulated RAG system. Your output will be audited. ## INPUT Query: [USER_QUERY] Retrieved Passages: [PASSAGES_ARRAY] ## SOURCE AUTHORITY WEIGHTS [SOURCE_AUTHORITY_MAP] ## OUTPUT SCHEMA Return valid JSON matching this schema exactly: { "conflict_resolution": { "total_passages": <int>, "conflicts_detected": <int>, "unresolved_conflicts": <int>, "resolution_summary": "<string describing overall conflict picture>" }, "ranked_passages": [ { "passage_id": "<string>", "rank": <int starting at 1>, "majority_agreement_score": <float 0.0 to 1.0>, "authority_weight": <float 0.0 to 1.0>, "recency_weight": <float 0.0 to 1.0>, "composite_score": <float 0.0 to 1.0>, "conflicting_passage_ids": ["<string>", ...], "conflict_severity": "none" | "minor" | "major" | "direct_contradiction", "resolution_status": "resolved" | "unresolved" | "majority_resolved" | "authority_override", "resolution_rationale": "<string explaining how conflict was resolved or why it remains unresolved>", "key_claim": "<string: the core factual claim from this passage relevant to the query>" } ], "unresolved_conflict_report": [ { "conflict_id": "<string>", "passage_ids_in_conflict": ["<string>", ...], "conflict_description": "<string describing the contradictory claims>", "recommended_action": "escalate_to_human" | "present_both_views" | "retrieve_more_evidence" | "flag_as_uncertain", "risk_level": "low" | "medium" | "high" | "critical" } ], "audit_trail": { "conflict_detection_method": "<string>", "weighting_rationale": "<string>", "exclusion_decisions": [ { "passage_id": "<string>", "reason": "<string>" } ] } } ## CONSTRAINTS [CONSTRAINTS] ## EXAMPLES [FEW_SHOT_EXAMPLES] ## INSTRUCTIONS 1. Read all passages and identify factual claims relevant to the query. 2. Detect contradictions between passages. A contradiction exists when two passages assert mutually exclusive facts about the same subject. 3. For each conflict, attempt resolution using these rules in order: a. Majority agreement: if 3+ independent sources agree, the majority view wins. b. Authority override: if a source with authority_weight >= 0.8 conflicts with lower-authority sources, the high-authority source wins. c. Recency tiebreaker: if authority is comparable, prefer the more recent source. d. If none of the above resolve the conflict, mark it as unresolved. 4. Compute composite_score as: (majority_agreement_score * 0.4) + (authority_weight * 0.35) + (recency_weight * 0.25). 5. Rank passages by composite_score descending. 6. Never fabricate resolution. If evidence is insufficient to resolve a conflict, mark it unresolved. 7. Include every input passage in ranked_passages, even if ranked low. 8. If [RISK_LEVEL] is "high" or "critical", flag all unresolved conflicts for human review.
Adaptation notes: Replace [PASSAGES_ARRAY] with a JSON array of passage objects, each containing at minimum passage_id, text, source_id, and publication_date. [SOURCE_AUTHORITY_MAP] should map each source_id to an authority weight between 0.0 and 1.0, pre-computed by your credibility assessment pipeline. [CONSTRAINTS] should include domain-specific rules such as regulatory precedence, jurisdiction hierarchy, or temporal cutoff dates. [FEW_SHOT_EXAMPLES] should contain 2-3 worked examples showing correct conflict resolution and ranking for your domain. [RISK_LEVEL] should be set dynamically based on the query context—use "high" or "critical" for financial reporting, legal filings, or clinical decisions. Before deploying, validate the output JSON against the schema and run at least 20 test cases with known conflicts to calibrate your authority weights and composite score thresholds.
Prompt Variables
Required inputs for the Source Conflict Resolution and Ranking Prompt. Validate each placeholder before sending to the model to prevent runtime failures and ensure consistent conflict resolution behavior.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[RETRIEVED_PASSAGES] | Array of evidence passages that may contain conflicting claims | [{"id":"doc-1-para-3","source":"2024_10K_filing.pdf","text":"Revenue increased 12% YoY...","date":"2024-03-15","authority":"primary"}] | Must be a non-empty array. Each object requires id, source, and text fields. Reject if text field is empty or missing. Minimum 2 passages required for conflict resolution to be meaningful. |
[QUERY] | The original user question or claim that triggered retrieval | "What was the company's revenue growth rate in fiscal 2024?" | Must be a non-empty string. Validate that query intent is clear enough to assess passage relevance. Reject queries under 10 characters or consisting only of stop words. |
[SOURCE_AUTHORITY_MAP] | Weighting configuration for source credibility tiers | {"primary":1.0,"secondary":0.7,"tertiary":0.4,"unknown":0.2} | Must be a valid JSON object with numeric weights between 0.0 and 1.0. At least one tier must be defined. Reject if weights are negative or exceed 1.0. Default to equal weighting if null. |
[CONFLICT_THRESHOLD] | Minimum agreement score difference that triggers conflict flagging | 0.3 | Must be a float between 0.0 and 1.0. Lower values increase sensitivity to minor disagreements. Validate that threshold is appropriate for domain risk tolerance. Default to 0.25 if null. |
[OUTPUT_SCHEMA] | Expected JSON structure for the conflict-resolved ranking output | {"resolved_ranking":[{"passage_id":"string","rank":"integer","agreement_score":"float","conflict_flags":["string"]}],"unresolved_conflicts":[{"claim_a":"string","claim_b":"string","severity":"string"}],"audit_trail":[{"step":"string","decision":"string"}]} | Must be a valid JSON Schema or example structure. Validate that required fields (resolved_ranking, unresolved_conflicts, audit_trail) are present. Reject schemas missing conflict flagging fields. |
[MAJORITY_WEIGHT] | Weight assigned to majority-agreement scoring versus authority scoring | 0.6 | Must be a float between 0.0 and 1.0. Value of 0.6 means majority agreement counts for 60% of ranking weight, authority for 40%. Validate that complementary weight sums to 1.0 internally. Default to 0.5 if null. |
[DOMAIN_TAXONOMY] | Domain-specific terminology for conflict categorization | ["factual_disagreement","temporal_conflict","methodology_difference","scope_mismatch","data_source_variance"] | Must be a non-empty array of strings. Each category must be distinct. Validate against allowed taxonomy for the deployment domain. Reject if taxonomy contains categories not recognized by downstream audit systems. |
[MAX_RANKED_PASSAGES] | Upper limit on passages included in the resolved ranking output | 10 | Must be a positive integer. Validate against context window budget. Reject if value exceeds available context after prompt overhead. Default to 15 if null. Warn if value is below 3 as conflict resolution quality degrades with too few passages. |
Implementation Harness Notes
How to wire the Source Conflict Resolution and Ranking Prompt into a production RAG pipeline with validation, retries, audit logging, and human review gates.
The Source Conflict Resolution and Ranking Prompt is designed to sit between retrieval and answer synthesis in high-stakes RAG pipelines—legal document review, financial compliance checks, and regulatory filings where contradictory evidence cannot be silently discarded. The prompt expects a pre-retrieved set of passages that may conflict, along with optional source metadata (authority level, publication date, document type). The output is a structured conflict-resolved ranking with majority-agreement scoring, source authority weighting, and explicit flags for unresolved conflicts. This harness must enforce that the model never fabricates a resolution when evidence is genuinely contradictory; it must surface the conflict instead.
Wire this prompt as a pre-synthesis gate in your RAG pipeline. After retrieval returns candidate passages, pass them through a deduplication step first (see the Multi-Passage Deduplication and Selection Prompt), then into this conflict resolution prompt. The model receives the deduplicated passage set, source metadata, and the original user query. Parse the JSON output into a ConflictResolution schema with fields: resolved_ranking (ordered list of passages with conflict-adjusted scores), majority_agreement_score (float 0–1), unresolved_conflicts (array of conflict objects with passage pairs and the disputed claim), and resolution_audit_trail (step-by-step reasoning). Validate the output against this schema immediately. If validation fails, retry once with the error message injected into the prompt as a correction hint. If the retry also fails, route to a human review queue with the raw passages and partial output attached.
Audit trail generation is mandatory for regulated use cases. Store the full prompt input, model output, schema validation result, and any retry attempts in an append-only log with a unique conflict_resolution_id. This ID should propagate downstream into the answer synthesis step and final citation metadata. When the system cites a source, the citation must reference both the source document and the conflict resolution ID that determined its ranking. This creates a traceable chain: retrieval → deduplication → conflict resolution → answer synthesis. For financial audit or legal discovery workflows, this audit trail is what turns an AI-assisted ranking into a defensible process artifact.
Model choice matters here. Use a model with strong reasoning capabilities (GPT-4, Claude 3.5 Sonnet, or equivalent) because conflict resolution requires comparing claims across passages, detecting subtle contradictions, and weighing source authority. Smaller or faster models often collapse contradictory evidence into a false consensus or ignore minority-view sources entirely. If latency constraints force a smaller model, add a second-pass verification step: after the initial ranking, run the Evidence Sufficiency Check Prompt to confirm that unresolved conflicts are still flagged and that no contradictory passage was silently dropped. Set a confidence threshold—if the majority agreement score falls below 0.6 or unresolved conflicts exceed 20% of passages, escalate to human review regardless of schema validity.
Common failure modes to monitor: (1) The model resolves conflicts by inventing a middle-ground claim not present in any source—validate that every claim in the resolution audit trail maps to at least one passage. (2) Source authority weighting overpowers factual correctness—a high-authority but outdated source may contradict a lower-authority but recent source; check that recency is factored into the weighting logic. (3) The model flags too many trivial conflicts (stylistic differences, minor date discrepancies) as unresolved, flooding the review queue—tune the prompt's [CONSTRAINTS] to specify a materiality threshold. Log all three failure patterns and review them weekly to decide whether the prompt needs adjustment or the retrieval step needs better source filtering.
Expected Output Contract
Fields, types, and validation rules for the structured JSON output produced by the Source Conflict Resolution and Ranking Prompt. Use this contract to validate model responses before passing them to downstream synthesis or audit systems.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
conflict_map | array of objects | Array length must be >= 1. Each object must contain conflict_id, claim_a, claim_b, source_a, source_b, and severity fields. | |
conflict_map[].conflict_id | string | Must match pattern ^CONFLICT-\d{4}$. Must be unique within the array. | |
conflict_map[].claim_a | string | Must be a direct quote or close paraphrase from source_a. Length must be <= 500 characters. | |
conflict_map[].source_a | object | Must contain source_id, title, and date fields. source_id must match an input source identifier. | |
conflict_map[].severity | enum | Must be one of: critical, major, minor, informational. Critical conflicts require explicit human review flag in audit_trail. | |
resolution | object | Must contain strategy, majority_agreement_score, and resolved_ranking fields. Cannot be null. | |
resolution.majority_agreement_score | number | Must be a float between 0.0 and 1.0 inclusive. Score represents proportion of sources agreeing on the resolved position. | |
resolution.resolved_ranking | array of objects | Array must contain all source_ids from input. Each object must have source_id, authority_weight, agreement_count, and final_rank fields. final_rank must be an integer starting at 1 with no gaps. | |
resolution.resolved_ranking[].authority_weight | number | Must be a float between 0.0 and 1.0. Derived from source credibility assessment. Must be justified in audit_trail. | |
unresolved_conflicts | array of strings | Array of conflict_ids that could not be resolved. May be empty array. Each entry must reference a valid conflict_id from conflict_map. | |
audit_trail | object | Must contain resolution_timestamp, model_version, and resolution_steps fields. resolution_steps must be an array of strings describing each decision step in order. | |
audit_trail.resolution_timestamp | ISO 8601 string | Must be a valid UTC timestamp in format YYYY-MM-DDTHH:MM:SSZ. Must be parseable by standard datetime libraries. | |
human_review_required | boolean | Must be true if any conflict has severity critical or if unresolved_conflicts is non-empty. Must be false otherwise. |
Common Failure Modes
What breaks first when resolving source conflicts and how to guard against it.
Majority-Rule Blindness
What to watch: The model treats majority agreement as truth, even when the majority consists of low-credibility sources repeating the same error. A single authoritative source can be drowned out by multiple weak sources. Guardrail: Weight sources by credibility before counting agreement. Include a source_authority_weight field in the ranking schema and require the model to explain why a minority source might still be correct.
Silent Conflict Suppression
What to watch: The model resolves conflicts by picking a winner and dropping contradictory evidence from the output entirely, removing the audit trail. Downstream consumers never learn that a conflict existed. Guardrail: Require an explicit unresolved_conflicts array in the output schema. Flag any contradiction that cannot be resolved with high confidence rather than silently discarding it.
Recency Bias Overriding Relevance
What to watch: The model overweights publication date and dismisses older but still-authoritative sources, especially in legal and regulatory contexts where precedent matters more than freshness. Guardrail: Add a freshness_relevance_tradeoff instruction that distinguishes time-sensitive queries from precedent-dependent queries. Require explicit justification when an older source is ranked below a newer but less authoritative one.
Source Authority Hallucination
What to watch: The model invents credibility attributes—fake publication names, imagined author credentials, or assumed regulatory status—when source metadata is sparse. This corrupts the entire ranking. Guardrail: Require that every authority claim in the ranking justification be traceable to a source_metadata field provided in the input. Add a post-ranking validation step that checks for claims not grounded in the supplied metadata.
Conflict Resolution Without Confidence Calibration
What to watch: The model resolves conflicts with high-confidence language even when the evidence is genuinely ambiguous, misleading downstream decision-makers. Guardrail: Require a confidence_score (0.0–1.0) for every resolution decision. Set a threshold below which the conflict is flagged as unresolved and escalated for human review rather than presented as settled.
Schema Drift Under Complex Conflicts
What to watch: When multiple sources conflict across several dimensions, the model abandons the structured JSON output contract and reverts to free-text narrative, breaking downstream parsing. Guardrail: Use a strict output schema with required array fields for resolved_rankings, unresolved_conflicts, and excluded_sources. Add a schema validator in the harness that rejects any response missing these keys and triggers a retry with the schema re-emphasized.
Evaluation Rubric
Run these checks on a golden dataset of 50+ query-passage sets with known conflicts. Each row validates a specific quality dimension of the conflict-resolved ranking output.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Conflict Detection Recall | All known contradictory claim pairs in the golden set are identified and flagged | Known contradiction present in input but absent from [CONFLICT_MAP] output | Compare [CONFLICT_MAP] entries against golden-set conflict annotations; require exact claim-pair match |
Majority-Agreement Score Accuracy | Computed agreement score matches golden-set calculation within ±5 percentage points | Score deviates by more than 5 points or inverts majority/minority assignment | Parse [MAJORITY_SCORE] field; compute expected score from golden-set source labels; assert absolute difference ≤ 5 |
Source Authority Weighting | Higher-authority sources receive higher weight when relevance is equivalent; weighting rationale is documented | Low-authority source outranks high-authority source without explicit justification in [RANKING_RATIONALE] | Pairwise comparison of source pairs with known authority tiers; check that [AUTHORITY_WEIGHT] ordering matches golden-set authority labels unless overridden by documented relevance difference |
Unresolved Conflict Flagging | All conflicts that cannot be resolved by evidence are marked with [RESOLUTION_STATUS] = 'unresolved' | Unresolved conflict receives status 'resolved' or is silently omitted from output | Filter [CONFLICT_MAP] for entries where golden-set labels indicate insufficient evidence; assert [RESOLUTION_STATUS] equals 'unresolved' |
Audit Trail Completeness | Every ranking decision includes a traceable [RANKING_RATIONALE] referencing specific passage content | Ranking change between input and output lacks rationale or cites passage content not present in source | Extract all [RANKING_RATIONALE] strings; verify each references at least one passage ID and one content-specific reason; flag empty or generic rationales |
Output Schema Compliance | JSON output validates against the defined [OUTPUT_SCHEMA] with all required fields present and correctly typed | Schema validation fails; required field missing; field type mismatch | Run JSON Schema validator against output using the published schema; require zero validation errors |
Confidence-Weighted Resolution Quality | Resolved conflicts include [CONFIDENCE_SCORE] ≥ 0.7 and resolution aligns with golden-set expected outcome | Resolved conflict has confidence below 0.7 or resolution contradicts golden-set expected outcome | Filter resolved conflicts; assert [CONFIDENCE_SCORE] ≥ 0.7; compare [RESOLUTION] against golden-set expected resolution; require exact match for high-confidence resolutions |
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 small set of 3–5 conflicting passages. Use a frontier model (GPT-4o, Claude 3.5 Sonnet) with default temperature. Focus on getting the conflict map structure right before adding scoring weights.
Simplify the output schema to: conflict_id, claim_a, claim_b, resolution_status (resolved/unresolved), and majority_view. Skip source authority weighting and audit trail fields initially.
Watch for
- Model inventing conflicts where passages actually agree
- Over-resolving: forcing consensus when evidence is genuinely split
- Missing the
unresolvedcategory entirely and defaulting to majority rule - Output drifting from the JSON schema when conflicts are complex

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