Inferensys

Prompt

Contradiction-Aware Citation Prompt for RAG

A practical prompt playbook for using Contradiction-Aware Citation Prompt for RAG in production AI workflows.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Define the job, the reader, and the constraints for deploying a contradiction-aware citation prompt in a RAG system.

This prompt is for RAG system builders who need to generate answers that do not hide evidential conflict. The core job-to-be-done is producing a citation list where each claim is explicitly linked to both its supporting and contradicting sources, rather than presenting a falsely unified set of references. The ideal user is an engineering lead or AI product developer integrating a research assistant, decision-support tool, or analyst copilot where source transparency is a hard requirement. You need a set of retrieved passages that may disagree, a user query, and a clear output schema for structured citations before this prompt is useful.

Use this prompt when your retrieval set contains documents from multiple authors, time periods, or methodologies that are likely to conflict. It is appropriate for domains like competitive intelligence, medical literature review, legal research, and financial analysis where presenting only the majority view would be misleading. The prompt requires the model to perform two tasks simultaneously: synthesizing an answer and auditing the evidence for disagreement. This means you should only use it when your underlying model has sufficient context window and reasoning capacity to handle both tasks without dropping conflicts. For models with smaller context windows, consider splitting the workflow into separate synthesis and conflict-detection steps.

Do not use this prompt when your retrieval pipeline already filters for consensus, when the user expects a single definitive answer without nuance, or when the cost of surfacing conflict outweighs the benefit. If your application is a consumer Q&A bot where speed and simplicity matter more than evidential completeness, a standard citation prompt is a better fit. Before deploying, validate that your evaluation criteria include both citation accuracy and conflict transparency. The next step is to wire this prompt into a harness that can parse structured conflict annotations, log them for audit, and decide how to present disagreement to the end user without eroding trust.

PRACTICAL GUARDRAILS

Use Case Fit

Where the Contradiction-Aware Citation Prompt works, where it fails, and what you must provide before using it in production.

01

Good Fit: Multi-Source Research

Use when: your RAG pipeline retrieves from multiple independent sources that may disagree. Why: the prompt is designed to surface conflict rather than hide it, making it ideal for research assistants, due diligence, and evidence review.

02

Bad Fit: Single-Source Q&A

Avoid when: all retrieved passages come from one authoritative document. Risk: the prompt will search for contradictions that don't exist, producing false conflict flags or confusing the answer. Use a standard citation prompt instead.

03

Required Input: Ranked Passage Set

What you need: a pre-retrieved, relevance-ranked set of passages with source metadata. Guardrail: the prompt cannot fix bad retrieval. If irrelevant passages dominate the context, conflict detection becomes noise. Run passage relevance filtering upstream.

04

Operational Risk: Latency Budget

What to watch: contradiction detection adds inference overhead. Guardrail: measure end-to-end latency with your largest expected passage set before deploying. If latency exceeds your SLO, consider a two-stage pipeline: fast answer generation, then async conflict audit.

05

Operational Risk: False Conflicts

What to watch: the model may flag paraphrased agreement or scope differences as contradictions. Guardrail: add an eval step that samples flagged conflicts and checks whether they represent genuine disagreement. Track false-positive rate over time.

06

Required Input: Source Reliability Signals

What you need: recency, authority, or trust scores for each source. Guardrail: without reliability signals, the prompt cannot decide which source to prefer when conflicts are genuine. Provide metadata or run a source trustworthiness assessment upstream.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt that generates contradiction-aware citations, linking each claim to both supporting and contradicting sources instead of presenting a falsely unified reference list.

This prompt template is designed for RAG systems where retrieved passages may disagree. Instead of forcing the model to produce a single clean citation list that hides conflict, the prompt instructs the model to surface evidential tension explicitly. Each generated claim must be paired with supporting sources and, where applicable, contradicting sources, with brief explanations of the nature of the disagreement. The template uses square-bracket placeholders that you replace with your application's specific inputs, output schema, constraints, and examples before sending the request to the model.

text
You are a citation-aware research assistant operating inside a retrieval-augmented generation system. Your task is to answer a user question using only the provided retrieved passages, and to generate citations that reflect evidential conflict rather than hiding it.

## INPUT

**User Question:**
[USER_QUESTION]

**Retrieved Passages:**
[RETRIEVED_PASSAGES]

Each passage includes a unique source ID, title, date, and full text. Passages may agree, partially agree, or directly contradict each other on specific claims.

## OUTPUT SCHEMA

Return a JSON object with the following structure:

```json
{
  "answer": "string (the synthesized answer, acknowledging conflicts where they exist)",
  "claims": [
    {
      "claim_id": "string (unique identifier for this claim)",
      "claim_text": "string (a single factual assertion extracted from the answer)",
      "supporting_sources": [
        {
          "source_id": "string",
          "quote": "string (the exact text from the source that supports this claim)",
          "rationale": "string (brief explanation of how this quote supports the claim)"
        }
      ],
      "contradicting_sources": [
        {
          "source_id": "string",
          "quote": "string (the exact text from the source that contradicts this claim)",
          "rationale": "string (brief explanation of the nature of the contradiction)",
          "conflict_type": "direct_factual | methodological_difference | scope_mismatch | temporal_change | interpretation_divergence"
        }
      ],
      "unresolved": "boolean (true if supporting and contradicting sources cannot be reconciled based on available evidence)"
    }
  ],
  "conflict_summary": "string or null (if contradictions exist, a concise summary of the main areas of disagreement across sources)",
  "abstention_notes": "string or null (if the question cannot be answered from the provided passages, explain why and what information is missing)"
}

CONSTRAINTS

[CONSTRAINTS]

EXAMPLES

[EXAMPLES]

INSTRUCTIONS

  1. Read all retrieved passages carefully. Identify where sources agree and where they disagree on specific factual claims.
  2. Synthesize an answer that addresses the user question. When sources conflict, do not pick a winner silently. Instead, present the disagreement explicitly in the answer text and in the claims array.
  3. For each claim in your answer, populate the supporting_sources array with every source that provides positive evidence for that claim. Include exact quotes and rationales.
  4. For each claim, populate the contradicting_sources array with every source that provides evidence against that claim. Classify the conflict type using the enum provided. If no sources contradict a claim, leave the array empty.
  5. Set unresolved to true when the available evidence does not allow you to determine which position is correct. Set it to false only when one side is clearly more reliable based on source recency, authority, methodology, or corroboration, and explain your reasoning in the rationale.
  6. If the retrieved passages are insufficient to answer the question at all, set answer to an abstention message and populate abstention_notes with what is missing. Do not fabricate claims.
  7. Do not cite sources outside the provided retrieved passages. Do not invent source IDs, quotes, or publication details.
  8. If multiple sources support the same claim using identical or near-identical language, note in the rationale whether this represents independent corroboration or likely citation of the same underlying source.

To adapt this template, replace each square-bracket placeholder with your application's concrete values. [USER_QUESTION] should contain the end user's query. [RETRIEVED_PASSAGES] should be a pre-formatted string containing your retrieval results with source IDs, titles, dates, and full text. [CONSTRAINTS] is where you inject domain-specific rules, such as recency thresholds, authority preferences, or output length limits. [EXAMPLES] should contain one or two worked examples showing the desired behavior on conflicting passages, including both the input passages and the expected output JSON. If your application does not need all fields in the output schema, remove them before sending the prompt to reduce token usage and prevent the model from hallucinating unnecessary structure. For high-stakes domains such as legal or medical applications, add a constraint requiring the model to flag claims where human review is necessary before the answer reaches an end user.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Contradiction-Aware Citation Prompt. Each variable must be populated before the prompt is assembled and sent. Missing or malformed inputs are the most common cause of silent citation failures in production.

PlaceholderPurposeExampleValidation Notes

[USER_QUERY]

The original question or claim the user wants answered with citations.

What is the current consensus on the efficacy of drug X for condition Y?

Must be a non-empty string. Check for vague queries that lack a verifiable claim; flag for clarification if under 10 words or missing a subject.

[RETRIEVED_PASSAGES]

The set of passages returned from retrieval, each with a source identifier and content.

[{"source_id": "pmid_12345", "text": "Drug X shows 40% efficacy..."}, {"source_id": "pmid_67890", "text": "Drug X efficacy was not significant..."}]

Must be a valid JSON array with at least 2 objects. Each object requires 'source_id' (string) and 'text' (string). Reject if array is empty or any passage lacks a source_id.

[SOURCE_METADATA]

Optional metadata for each source: recency, authority score, publication type, methodology notes.

[{"source_id": "pmid_12345", "year": 2023, "authority_score": 0.9, "type": "meta-analysis"}]

If provided, must be a JSON array with 'source_id' matching [RETRIEVED_PASSAGES]. Null allowed. Validate that authority_score is a float between 0 and 1 if present.

[CONFLICT_SENSITIVITY]

Threshold for flagging a disagreement as a conflict versus a minor variation. Controls false positive rate.

high

Must be one of: 'low', 'medium', 'high'. 'low' flags more disagreements; 'high' requires direct contradiction. Default to 'medium' if null. Validate enum membership.

[OUTPUT_FORMAT]

Desired structure for the citation output: inline, footnote, or structured JSON with claim-to-source mapping.

structured_json

Must be one of: 'inline', 'footnote', 'structured_json'. Default to 'structured_json' if null. Validate enum membership. Structured JSON is recommended for downstream parsing.

[MAX_CLAIMS]

Maximum number of distinct claims to extract and cite from the answer. Prevents unbounded output.

8

Must be a positive integer between 1 and 20. Default to 8 if null. Validate range. Lower values reduce latency but may oversimplify complex answers.

[ABSTENTION_POLICY]

Instruction for when evidence is insufficient or too conflicted to produce a grounded answer.

refuse_with_explanation

Must be one of: 'refuse_with_explanation', 'express_uncertainty', 'present_both_sides'. Default to 'refuse_with_explanation' if null. Validate enum membership. This variable directly controls hallucination risk.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when generating contradiction-aware citations and how to guard against it.

01

False Consensus from Echoed Sources

What to watch: The model treats multiple sources that all cite the same original study as independent corroboration, producing a falsely unified citation list that hides genuine disagreement. Guardrail: Add a deduplication step before citation generation that traces each claim back to its originating source and flags derivative citations as dependent, not independent, evidence.

02

Overconfident Resolution of Genuine Disagreement

What to watch: The model forces reconciliation between conflicting sources by inventing scope differences or methodological explanations that are not present in the text, producing a misleadingly harmonious answer. Guardrail: Require the model to quote the exact text supporting any reconciliation claim and output unresolved_conflict: true when no textual basis for reconciliation exists.

03

Citation Drift Under Source Pressure

What to watch: When many sources support one position and few support another, the model drops citations to minority-view sources entirely, erasing the conflict rather than presenting it. Guardrail: Enforce a minimum citation quota per detected position by requiring at least one supporting and one contradicting citation block in the output schema, even if the contradicting block contains a single source.

04

Implicit Contradiction Blindness

What to watch: The model detects explicit textual contradictions but misses implicit ones where sources describe the same fact with incompatible values without directly referencing each other. Guardrail: Add a structured fact-extraction pass before contradiction detection that normalizes claims into comparable attribute-value pairs, then run pairwise comparison on the normalized facts rather than raw text.

05

Hallucinated Source Attribution for Conflict Framing

What to watch: The model invents a source or misattributes a position to create a cleaner narrative of disagreement, especially when the real conflict is messy or poorly documented. Guardrail: Require every citation to include a direct quote span from the source document and validate citation existence against the retrieval set before the output is surfaced to users.

06

Conflict Severity Miscalibration Across Domains

What to watch: The model applies the same severity threshold to all conflicts, flagging minor methodological disagreements as critical in legal contexts while underplaying factual contradictions in medical evidence. Guardrail: Pass domain context and a severity rubric into the prompt with explicit examples of low, medium, and high severity conflicts calibrated to the target domain's risk tolerance.

IMPLEMENTATION TABLE

Evaluation Rubric

Criteria for testing the Contradiction-Aware Citation Prompt before shipping. Each row defines a pass standard, a failure signal, and a concrete test method. Run these against a golden set of multi-source RAG examples containing known conflicts.

CriterionPass StandardFailure SignalTest Method

Conflict Detection Recall

All known contradictions in the test set are surfaced in the output

A contradiction present in the source passages is missing from the citation or conflict log

Run against 20+ examples with pre-labeled contradictions; require recall >= 0.95

Conflict Detection Precision

No false contradictions flagged where sources actually agree or discuss different aspects

Output flags a conflict where sources use different terminology for the same claim or address different scopes

Human review of flagged conflicts on a 50-example sample; false positive rate must be < 5%

Citation-to-Claim Accuracy

Every cited source in the output directly supports or contradicts the specific claim it is linked to

A citation is attached to a claim the source does not make, or a supporting source is cited as contradicting

Spot-check 30 claim-citation pairs; verify each against the source passage text

Conflict Transparency

Output explicitly states when sources disagree rather than presenting a falsely unified answer

Answer reads as consensus when sources conflict, or contradictory evidence is buried without attribution

Binary check on 15 conflict-containing examples: output must contain explicit disagreement language and source attribution

Source Position Attribution

Each position in a conflict is correctly attributed to the right source with the right stance

A source's position is mischaracterized or attributed to the wrong source identifier

Compare output positions against pre-labeled source stances for 20 conflicts; attribution accuracy >= 0.98

Abstention on Unresolvable Conflict

Output expresses uncertainty or refuses to pick a side when evidence is evenly split and no resolution rule applies

Output confidently endorses one side of an irresolvable conflict without noting the opposing evidence

Test with 10 examples designed to have no clear resolution; check for uncertainty language or balanced presentation

No Fabricated Citations

All source identifiers in the output correspond to actual sources provided in the input context

Output includes a source ID, title, or quote that does not exist in the input passages

Parse all citation references; cross-reference against input source list; fabricated citation rate must be 0

Schema Compliance

Output matches the expected [OUTPUT_SCHEMA] fields, types, and structure

Output is missing required fields, uses wrong types, or nests data incorrectly

Validate output against JSON Schema; run on 100 examples; structural validity must be 100%

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Start with the base prompt and a small set of 3-5 passages with known contradictions. Remove strict schema enforcement and use a simpler output format like a markdown table. Focus on getting the model to identify conflicts and cite sources correctly before adding production harness complexity.

code
Analyze the following passages and identify any contradictions. For each contradiction, list the conflicting claims and their source passage IDs.

Passages:
[PASSAGES]

Watch for

  • Model inventing conflicts where passages discuss different aspects of the same topic
  • Citations pointing to wrong passage IDs
  • Overlooking implicit contradictions that require inference
  • Format inconsistency when contradictions are nested or multi-faceted
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.