esc
  • WorkflowsPages
  • Case studiesPages
  • Machine Learning FoundationsLearn
  • AI EngineeringLearn
  • AI Guardrails & Red TeamingLearn
  • UI/UXLearn
  • Design SystemsLearn
  • Production System DesignLearn
  • AI papersPages
  • Interview KitPages
  • Book a callContact
Let’s talk

I’ll build the agent for it.

How Do You Handle Conflicting Sources?

Which document wins when two retrieved sources disagree, and how the answer shows its source, for your AI interview.

In short

When two sources disagree, don't leave the choice to the model. Settle it with rules in your data and code: keep the current, approved documents, prefer the newest, name the source in the answer, and escalate to a person when the rules can't decide.

13 min readIntermediateOccasional · estimateFacts checked 27 November 2026

Say it out loud

Read it once, then say it without looking. Start with the short one; use the long one when they ask you to go deeper.

When two sources disagree, I don't let the model pick the winner. Every document carries its status, date and authority, so my code keeps the approved, newest version and drops old drafts. The answer names its source and date. If the rules can't decide, the bot says it can't confirm and hands the question to a person. I also test with planted conflicts, because no setup removes them all.

What is a conflict between sources, in plain words?

Retrieval-augmented generation (RAG) means the app searches your documents first, then gives the best passages to the model to answer from. A conflict happens when two of those passages disagree about the same fact, such as a fee, a deadline or a policy.

A survey of LLM knowledge conflicts names three kinds: context-memory, inter-context and intra-memory conflict. Inter-context conflicts pit two passages against each other. Context-memory conflicts pit a passage against what the model learned in training. Intra-memory conflicts are inconsistencies inside the model's own stored knowledge.

Picture a new hire at a bank who finds two fee sheets in the shared drive, one from 2024 and one from April. She doesn't guess. She checks the date, the status and who approved it. A model needs the same habit, but it can only get it from the labels in your data and the rules in your code.

Key words

Inter-context conflict
Two retrieved passages say different things about the same fact.
Context-memory conflict
A retrieved passage says something the model's training says differently.
Superseded
A document replaced by a newer version, so it should not be used as current.
Authority tier
How official a source is, such as an approved fee sheet above a team wiki.
Escalate
Hand the question to a person instead of letting the bot answer.

Why can't the model sort out a conflict itself?

A model reads its context as one stream of text. Unless your data says which document is newer or more official, it has no reliable way to tell. In a controlled study, researchers found the model's choice was shaped by how convincing the evidence looked and by what it already believed.

  • “LLMs can be highly receptive to external evidence even when that conflicts with their parametric memory, given that the external evidence is coherent and convincing.”

    Xie and colleagues, on LLM behaviour in knowledge conflicts

  • “LLMs also demonstrate a strong confirmation bias when the external evidence contains some information that is consistent with their parametric memory, despite being presented with conflicting evidence at the same time.”

    Xie and colleagues, on LLM behaviour in knowledge conflicts

A survey of knowledge conflicts in LLMs says these conflicts can significantly impact the trustworthiness and performance of LLMs, especially in real-world applications where noise and misinformation are common. Company document sets often hold old and new versions side by side, which is where the clash shows up.

Tip

Don't promise that the model will work out which source is right. Say the rules live in your data and code, and the model only writes from what they let through.

How do you set it up so the right source wins?

Three jobs, in order. Labels on each document say what it is. Retrieval filters and ranks using those labels. The answer then shows its source, or escalates.

How a conflict is settled before the answer

Approved fee sheet

April 2026, approved, current

Old wiki page

2024, marked superseded

Staff draft

this week, not approved

Keep approved, newest

drops superseded and drafts

Model

writes from one source only

Answer with source

names the source and its date

  1. 1The approved fee sheet goes in as a candidate.
  2. 2The 2024 page arrives, but the filter marks it superseded.
  3. 3The draft arrives, but the filter drops it, since it is not approved.
  4. 4Only the approved, newest source moves on to the model.
  5. 5The answer names that source and its date.
Three fee documents go in. The filter keeps only the approved, newest one, the model writes from it, and the answer names its source and date. The model never picks between them.
  1. 1

    Label every document when you index it

    Store the status, effective date, owner and authority tier with each chunk. Mark superseded documents, so a filter can remove them later.

  2. 2

    Filter and rank at retrieval

    Drop superseded and draft documents first. Metadata filters do this: OpenAI's file search says you can filter the search results based on the metadata of the files. Then boost by date: Azure AI Search has a freshness boost on a date field, and its docs say to use it when you want to promote recent (newer) dates. Keep superseded documents for questions about the past, and filter them out for questions about what is true now.

  3. 3

    Label and cite at answer time

    Wrap each document with its source tag, as Anthropic's guide suggests, and add other metadata such as the date if you need it. Ask for a citation for each claim. Anthropic's guide also says to let the model admit uncertainty, and to drop any claim it cannot back with a quote.

  4. 4

    Escalate when the rules can't decide

    If two current sources tie on tier and date and disagree, the bot should say it cannot confirm and pass the question to a person. It should not pick one.

  5. 5

    Fix the source

    The lasting fix is upstream. The owner retires the old page, so only one version stays in the index.

Anthropic's guide on reducing hallucinations asks for the same habit: give the model permission to say when it is unsure, and have it cite where each claim came from. Citations, the feature, return the passages that back each claim, so a reviewer can check the answer.

What does a conflict look like in a real bank bot?

A mid-size bank runs a support assistant for card customers. A customer asks what a late payment costs. Three passages come back. The approved fee sheet from April 2026 says £28. A wiki page last updated in 2024 says £25. A staff draft from this week says £20, a promotion nobody approved. If the bot quotes £20, the bank faces a refund dispute, so the rule has to live in code.

The resolver below keeps only approved documents, takes the top authority tier, and picks the newest of those. Two approved notes with the same date and different figures are a true tie, so the code escalates instead of guessing. The output shown is what the code printed.

Python
# Pick one fee from several retrieved notes. Made-up figures for a bank bot.
SOURCES = [
    {"name": "Fee sheet, April 2026", "status": "approved", "tier": 1, "date": "2026-04-01", "fee": 28},
    {"name": "Wiki page, 2024", "status": "superseded", "tier": 2, "date": "2024-06-10", "fee": 25},
    {"name": "Staff draft, this week", "status": "draft", "tier": 3, "date": "2026-11-20", "fee": 20},
]

def resolve(sources):
    # Only approved documents count. Superseded and draft ones are dropped.
    current = [s for s in sources if s["status"] == "approved"]
    if not current:
        return "ESCALATE: no approved source"
    top = min(s["tier"] for s in current)  # tier 1 = official fee sheet
    tier = [s for s in current if s["tier"] == top]
    newest = max(tier, key=lambda s: s["date"])  # ISO dates sort as text
    tie = [s for s in tier if s["date"] == newest["date"] and s["fee"] != newest["fee"]]
    if tie:
        return "ESCALATE: " + newest["name"] + " and " + tie[0]["name"] + " disagree"
    return "ANSWER: £" + str(newest["fee"]) + " from " + newest["name"] + " (" + newest["date"] + ")"

print(resolve(SOURCES))
approved_now = SOURCES + [
    {"name": "Pricing note, April 2026", "status": "approved", "tier": 1, "date": "2026-04-01", "fee": 30},
]
print(resolve(approved_now))

Output

ANSWER: £28 from Fee sheet, April 2026 (2026-04-01)
ESCALATE: Fee sheet, April 2026 and Pricing note, April 2026 disagree

When two approved sources disagree

Two approved notes

same tier, different figures

Newest date wins?

the tie-break rule runs in code

Newer note wins

answer cites it and its date

Same date too: escalate

the bot says it can't confirm

  1. 1The bot finds two approved notes that disagree.
  2. 2Dates differ, so the newer approved note is used.
  3. 3Same tier and same date: the code does not guess and escalates.
Two approved notes that disagree go through one code rule. Different dates let the newer one win. A true tie goes to a person, and the bot says it cannot confirm the fee.

Is the newest document always the right one?

No. Recency is a good tie-breaker only when the dates are right. A newer draft can be wrong, and an old policy can still be the one in force until its replacement takes effect. So the rule belongs to the business, and someone has to own it.

  • Newest approved

    Good for facts that change often, such as fees and opening hours.

  • Most authoritative

    Good for legal and safety rules, even when a newer draft exists.

  • Ask a person

    Right when the stakes are high and the rules tie.

Tip

Say this in the interview: recency is a default you can justify, and the rule should match how the business actually decides.

How would you test that the bot handles conflicts?

Plant conflicts on purpose. Put an old fee page next to the new one, a draft next to an approved note, and two approved notes with the same date. Then check three things: the bot answers from the approved source, it names that source and its date, and it escalates the true ties.

Run these cases on every release and on every new batch of documents. Track how often the answer names the wrong source. One wrong fee in a customer chat is the failure to watch for.

What does the interviewer want to hear?

A strong answer covers

  • Name the kinds of conflict: inter-context, and context-memory.
  • Say the model can't be trusted to pick the right source on its own.
  • Metadata on each document: status, date, owner and authority tier.
  • Filter and rank at retrieval, dropping superseded and draft documents.
  • Escalate true ties to a person, and say the bot cannot confirm.
  • Test with planted conflicts, and fix the old page at the source.

Common traps

  • Trap"The model will work out which source is right."

    BetterIt can't be trusted to. Settle it with labels and rules in code.

  • Trap"Always use the newest document."

    BetterRecency helps only when the dates are right. A newer draft can be wrong.

  • Trap"A line in the prompt fixes it."

    BetterA prompt rule is a soft layer. Filters and code decide what reaches the model.

Can you spot the bad source?

Spot the bad source

A bot is about to answer from four passages about late fees and statements. Which one is marked superseded and must be dropped before it writes?

Quick check

Two approved fee notes have the same date and give different amounts. What should the bot do?

Can you answer these from memory?

Flash cards · tap a card to flip it

1 / 6

What will they ask next?

  1. Q129What is metadata filtering?10 min
  2. Q134How do you reduce hallucinations in RAG?13 min
  3. Q135How do you add citations?11 min
  4. Q140How do you enforce access control in RAG?11 min
  5. Q149How do you clean and deduplicate documents first?11 min
  6. Q151"The answer was in the docs, but the bot missed it." How do you debug?12 min

Last updated on 27 November 2026

Building a bot on documents that disagree with each other?

I design and build AI products and agents, including the interface and the system behind it. Book a short call and tell me which documents conflict in your setup.