AI agents
Key points

Key points

  1. 1Detect disagreement before generation by comparing retrieved chunks field by field on numbers, dates, named entities and policy clauses, using an explicit tolerance per field type.
  2. 2Resolve with a fixed precedence order (authoritative source, then explicit timestamp, then specificity) and record the rule that fired, never an improvised judgment.
  3. 3When the rule cannot decide, stop and route to a human reviewer with both chunks attached, rather than letting the model average two incompatible facts.
  4. 4Keep a durable conflict record containing both chunks verbatim, the deciding rule and the reviewer decision, so later summaries and audits can explain why one value won.

Why conflicts reach the prompt at all

A retrieval pipeline ranks chunks by similarity to the query. Similarity says a passage is about the right topic; it says nothing about whether the passage is correct, current, or about the same entity. That gap is where conflicts enter. Atlan's analysis of retrieval-augmented generation failures reports that 73% of RAG failures originate at retrieval rather than at the generation step, and it points at stale, conflicting or poorly governed source content as a root cause (Atlan). No amount of prompt tuning repairs a context window that already contains two incompatible facts.

Research on conflicting evidence makes the same point from the modeling side. Wang and colleagues built a dataset that mixes ambiguity, misinformation and noise in the same query, and found that even a strong instruction-tuned baseline topped out at 32.60 exact match on that combined setting (RAG with Conflicting Evidence). Their multi-agent debate approach improved results but left a substantial gap, especially as the balance of supporting versus misleading evidence shifted. Google's conflict taxonomy work adds a practical finding: telling the model explicitly which category of conflict it is looking at improves response quality and appropriateness, yet leaves "vast room for improvement" (Detecting and Addressing Conflicting Sources).

The lesson for a practitioner is unglamorous. If you want a reliable answer, resolve the conflict in code before the model reads the context. The model is a poor arbiter of which of its own sources to trust, and asking it to be one produces fluent text that hides the disagreement.

There is a second reason to handle this upstream: fidelity. A controlled ablation found that verbatim conversation chunks beat LLM-extracted artifacts by 15.9 points on LoCoMo and 22.0 points on LongMemEval-S, and the authors attribute the gap to lossy distillation, where extraction quietly deletes the qualifier that made a fact actionable (Verbatim Chunks Beat Extracted Artifacts). The same mechanism explains why a merge step that paraphrases two conflicting clauses into one smooth sentence is worse than useless: it destroys the evidence a reviewer would need. Merging must preserve the losing chunk, not erase it.

Step 1: detect disagreement on the fields that matter

Treat each retrieved chunk as a set of typed fields before you treat it as prose. You do not need a perfect parser; you need a small, auditable extractor per field type, and you need to compare only chunks that are about the same thing.

Start with an entity key. Two chunks both mentioning a dosage are not in conflict if one is about adults and one about children. Build the key from the query plus the entities the chunks share, then compare only within a key group.

Field typeWhat to extractConflict testTolerance
Money or quantityNumber plus unitAbsolute difference against the larger value0 for counts and rates; 1% for measured quantities
Date or deadlineNormalized ISO dateExact date inequality0 days for deadlines and effective dates
PercentageValue plus baseDifference in percentage points0.1 points
Named entityPerson, org, product identifiersMismatch on the identifying stringNone; mismatched IDs are a conflict
Policy clauseModal verb plus condition plus exceptionCondition or exception differsNone; clause text must match
Version or statusStatus word (active, revoked, draft)Any differenceNone

Two rules make this usable in practice. First, normalize before you compare: parse "March 3" and "3 March" to the same date object, and strip currency symbols into an explicit unit. Second, treat missing fields as unknown, not zero. A chunk that omits a date is not in conflict with a dated chunk; it is simply undated, which matters for the precedence step. The provenance discipline described in practical retrieval write-ups is the right mental model here: for every claim you should be able to say which source supports it, where exactly in the source, and whether it was quoted, summarized or inferred (provenance checks for RAG).

A useful detection order, cheapest first:

  1. Compare numeric fields and dates. These are deterministic and catch most operational conflicts.
  2. Compare entity identifiers. Two different account numbers for the same customer name is a hard conflict.
  3. Compare policy clauses by normalized form, then by condition and exception.
  4. Only if the first three pass, check free-text claims for entailment contradiction, and treat a low-confidence contradiction as advisory rather than decisive.

Worked example. A support query asks for the return window for a specific product. Chunk A says 30 days from delivery. Chunk B says 14 days from purchase. The numeric field differs (30 versus 14, outside a zero tolerance), and the date basis differs (delivery versus purchase), so the pair is flagged on two fields. Had both said 14 days and differed only on the basis, the pair would still be flagged, because the basis changes the deadline for a slow shipment. That is the sort of clause-level difference that a keyword search would miss entirely.

Step 2: apply a fixed precedence rule

Once a pair is flagged, the resolution must be mechanical. A model reasoning about credibility mid-generation will drift across runs; a fixed rule will not. Use this order and stop at the first criterion that separates the chunks:

  1. Authoritative source. A designated primary source wins over a secondary one. The policy document beats a support email; the contract beats a wiki summary. Authority is a property you assign per collection in metadata, not a judgment the model makes.
  2. Explicit timestamp. An explicitly dated chunk wins over an undated one, and the later date wins when both are dated and both are authoritative at the same level. Prefer the date the source states about itself over thecrawl date, and record both.
  3. Specificity. The chunk that names the condition and the exception wins over the one that states the rule alone. "Returns accepted within 30 days, except for perishable goods" beats "Returns accepted within 30 days" when the query concerns perishable goods.
  4. Else escalate. If the chunks tie on all three, the rule cannot decide. Stop and route to a human.

That order is not arbitrary. Source authority is the strongest signal you can encode cheaply, and timestamps come second because a dated revocation of an undated policy is usually the truthful reading. Specificity comes third because a more specific rule is normally the operative exception, and because preferring specificity keeps exceptions from being flattened by a general clause. Escalation is the honest default; a system that always produces an answer will occasionally produce a confident wrong one, and that failure is expensive.

The empirical support for telling the model what kind of conflict it faces is relevant here too. Google's work showed measurable gains from explicit conflict-category information rather than leaving the model to infer credibility from surface text (the conflict taxonomy study). Your rule engine produces exactly that category, so pass it downstream instead of discarding it.

A caution on the timestamp rule: it must be applied to the value the source is about, not to the document's age. A price sheet from a later date that lists an older effective period is not more current on the question of which price applies during that period. Store the effective date separately from the publication date, and prefer effective date when both chunks carry one.

Step 3: write the merged context and the conflict record

Two artifacts leave the merge step: a merged context for the model, and a conflict record for humans and for later retrieval.

The merged context should be minimal and structured. Hand the model the resolved value, one supporting snippet per field, the conflict category, and an instruction to state the basis of the answer. A layered prompt that separates task, source boundary, evidence rules, conflict handling, missing information, citations and stop conditions is more reliable than an open-ended "use the context" instruction (RAG prompting guide). Keep retrieved text framed as evidence, never as instruction authority, since retrieved chunks can carry injected instructions.

The conflict record is the durable part, and it should contain:

{
  "conflict_id": "cf_88213",
  "entity_key": "product:PB-441 return-window",
  "detected_fields": ["quantity", "date_basis"],
  "chunks": [
    {"chunk_id": "c_1021", "source_tier": "primary",
     "effective_date": "2024-11-01", "verbatim": "Returns accepted within 30 days of delivery."},
    {"chunk_id": "c_2388", "source_tier": "secondary",
     "effective_date": null, "verbatim": "Returns accepted within 14 days of purchase."}
  ],
  "rule_applied": ["authoritative_source"],
  "winner": "c_1021",
  "loser_retained": true,
  "reviewer": null,
  "reviewer_decision": null,
  "status": "auto_resolved"
}

Three properties matter. The chunks are stored verbatim, in line with the finding that verbatim units retrieve and reason better than extracted summaries (the memory representation ablation). The rule that fired is stored by name, not by narrative. And the reviewer fields exist even when empty, so escalation writes into the same schema.

Record retention is not optional paperwork. Compaction and summarization erode exact wording: one study of long-running agent memory found production compaction preserving 53% of safety rules after one round and 10% after five, naming the effect the Compaction Cliff (Compaction Cliff). If the counterfactual chunk lives only inside a summary, the reviewer cannot check it later. Store the record outside the working context, in the pattern operating-system-style memory management calls archival storage, which is paged back in only when needed (MemGPT).

Step 4: give the reviewer a decision, not a wall of text

Escalation fails when the reviewer receives two paragraphs and no framing. Design the review surface around the conflict record.

The reviewer sees, in order: the query, the two (or more) conflicting values side by side, the field or clause that differs, the rule engine's verdict and why it declined, and any prior decisions on the same entity key. Their job is a single choice among a small set: accept the winner, accept both with a condition, accept neither because both are wrong, or request a fresher source. Each choice writes back to the record with an identifier and a timestamp.

A worked example with numbers shows why this matters. Suppose a pricing query returns chunk A at 42.00 per seat from the primary price sheet effective in March, and chunk B at 37.50 per seat from a secondary partner deck with no date. The value differs by 4.50, about 12%, well outside a 1% tolerance, so it is flagged. The authoritative-source rule picks A. The model answers 42.00 and cites the price sheet. The partner deck is retained in the conflict record, and if a reviewer later marks B as an approved partner discount, the record shows the correction and the next retrieval on that key can surface both with the condition attached. Without the record, the same disagreement reappears next week with no memory of how it was settled, which is the failure mode that episodic memory designs exist to prevent (semantic vs episodic vs procedural memory).

Reviewer load is the practical constraint. Instrument escalation rate per entity key and per field type. A key that escalates repeatedly usually needs a source-authority fix, not more reviewers: either the secondary source should be demoted in metadata or the primary source should be refreshed. Treat repeat escalations as a data governance signal.

For summaries that mention resolved conflicts, prefer extractive phrasing. Guidance on production summarization distinguishes extractive from abstractive approaches and notes that abstractive paraphrase carries higher hallucination risk, which is why legal and compliance text is usually summarized extractively (production summarization systems). A merger that must mention a conflict should quote the clause that lost, not describe it.

Step 5: test the merge before production

You cannot validate conflict handling on queries that never conflict. Build a small adversarial set, and score the pipeline on behaviors rather than prose quality.

Test caseExpected behaviorPass condition
Same value, different wordingNo conflict flaggedNo escalation, no record
Number differs beyond toleranceFlag, apply timestamp ruleWinner recorded with rule name
Primary vs secondary, same recencyFlag, authoritative source winsSecondary chunk retained
Tied on tier, timestamp and specificityEscalateRecord status is pending review
Undated chunk vs dated chunkFlag, dated chunk winsTimestamp rule recorded
Policy clause missing an exceptionFlag, specificity ruleException present in merged context
Two entities, no shared keyNo comparisonNo false-positive record

Score four rates: false positives (harmless pairs flagged), misses (real conflicts passing through), correct rule attribution, and time to reviewer decision. Then, for the answer layer, track citation fidelity separately, since a valid citation that does not contain the asserted fact is a distinct failure from a wrong citation (summarization troubleshooting). A compact evaluator harness that runs these cases on every pipeline change is cheap compared with the cost of one confidently wrong policy answer.

If you want a single API to reach several models while you compare merge and answer behavior across them, that is one of the things Quanta Inference is for (https://quantaintelligence.ai/inference). For teams that would rather hand the whole retrieval-and-merge pipeline to specialists who return a working implementation, Quanta experts take the brief and deliver it (https://quantaintelligence.ai/agents).

FAQ

FAQ

What counts as a conflict between two retrieved chunks?

A conflict exists when two chunks retrieved for the same entity key disagree on a checkable field: a number outside tolerance, a different date, a mismatched identifier, or a policy clause whose condition or exception differs. Chunks that are merely about different entities are not conflicting, so always group by entity key before comparing. Missing fields are unknown, not conflicting.

Why not just let the model weigh the two sources?

Because the model's judgment is not stable or auditable, and the failure looks like success: a fluent answer that silently picks one value. Research on conflicting evidence shows strong baselines struggling when ambiguity, noise and misinformation arrive together (the RamDocs study). A fixed rule in code is reproducible, and recording which rule fired makes the outcome reviewable.

When should the system stop and escalate?

Escalate when two chunks tie on source authority, on explicit effective timestamp and on specificity. Also escalate when the disagreement concerns a clause with legal, safety or financial consequence, even if a rule appears to decide it, because the cost of a wrong automatic resolution is higher than the cost of a review. Write the escalation into the same conflict record as an auto-resolution, so nothing is lost.

How long should conflict records be kept?

Keep them as long as the underlying source is retrievable plus the retention period your policy requires, because they are the audit trail for a decision. This matters more than it seems: summarization and compaction lose exact wording over repeated rounds, so an old counterfactual chunk may survive only in the record (the compaction study). Store the record outside the working context and page it back in only when a related query arrives.

Does the merged context still need the losing chunk?

No, the model does not need it for a routine answer, and including it invites the model to re-litigate the conflict. The losing chunk belongs in the conflict record, verbatim, where a reviewer and a later audit can reach it. The model should receive the winning value, its supporting snippet, the conflict category and an instruction to state the basis of the answer.

Sources

Sources

  1. RAG Accuracy Problems: Why RAG Fails and How to Fix It
  2. Retrieval-Augmented Generation with Conflicting Evidence
  3. (D)RAGged Into a Conflict: Detecting and Addressing ...
  4. Verbatim Chunks Beat Extracted Artifacts: A Controlled ...
  5. The Provenance Checks Your RAG Stack Is Missing
  6. RAG Prompting: How to Write Better Retrieval-Augmented ...
  7. The Compaction Cliff in Long-Running AI Agent Memory
  8. 2310.08560 MemGPT: Towards LLMs as Operating Systems - arXiv
  9. Semantic vs Episodic vs Procedural Memory in AI Agents - Medium
  10. How to Build Production-Grade LLM Summarization Systems
  11. How to Troubleshoot LLM Summarization Tasks
About the author

About the author

Antonio Evans
Antonio Evans

Antonio Evans is the founder of Quanta Intelligence and a fractional CTO who builds HIPAA-ready AI systems for health and life-science companies. Before that he was technical co-founder of FriendsEAT for twenty years, CEO of Socialdraft, and a data engineer at IBM. Antonio lives with his dog Santino in Lisbon, Portugal.

All articles