DEV Community

Cover image for When Two Correct Documents Disagree With Each Other And The Bot Has To Pick One
FARHAN HABIB FARAZ
FARHAN HABIB FARAZ

Posted on

When Two Correct Documents Disagree With Each Other And The Bot Has To Pick One

A knowledge base rarely stays perfectly internally consistent for long, especially once it grows past a certain size and gets updated by more than one person over time. Two documents can both be technically accurate, each written correctly at the time it was created, and still directly contradict each other, because one reflects an older policy that was never formally removed and the other reflects the current one, sitting side by side with no explicit marker telling a retrieval system which one actually wins.

This is a different failure from a simple outdated document problem, because neither document is wrong in isolation. The pricing figure in one file was correct when it was written. The updated pricing figure in a newer file is correct now. Both chunks are equally well formed, equally confident in tone, equally retrievable by a standard similarity search, and a model asked a pricing question can easily retrieve both, then either blend them into something incoherent or simply pick whichever one happened to score slightly higher in that particular query, with no consistency across repeated identical questions.

The inconsistency itself is often the first symptom anyone notices, before the actual content error is even flagged. The same question, asked twice within the same day, returns two different answers, and that alone is enough to damage trust in the system even before anyone works out which of the two answers was actually correct. A caller who gets two different prices for the same product in two different conversations does not wait around to find out which one was accurate, they just conclude the bot cannot be trusted.

Fixing this requires accepting that a knowledge base needs an explicit recency and authority hierarchy built into its structure, not just its content. Every document that can plausibly become outdated needs a clear, machine readable effective date, and the retrieval and generation instructions need an explicit rule that when multiple chunks addressing the same fact are retrieved together, the one with the most recent effective date takes precedence, full stop, rather than leaving the model to weigh them by some implicit sense of which one reads more authoritative.

That sounds simple stated plainly, and the mechanics of adding a date field are genuinely simple. What is harder is building the habit, organizationally, of actually retiring or explicitly superseding old documents rather than just adding new ones alongside them indefinitely, because the technical fix only works if outdated material is either removed from the retrievable set entirely or clearly marked as superseded rather than left to compete on equal footing with its replacement forever. A dated document that nobody ever goes back and marks as retired is still going to get pulled into a retrieval result years later, and the date field alone does not help if the generation instruction is not explicitly told to actively check for and discard older competing information rather than simply noting the date and moving on.

The other necessary piece is instructing the system to flag the conflict itself when the contradiction is significant enough that silently picking the newer document feels risky, particularly for anything touching pricing, compliance, or eligibility, where being confidently wrong carries real consequence. Rather than always resolving silently to whichever document is newest, a well built instruction set distinguishes between minor, safe to auto resolve inconsistencies and larger ones worth surfacing explicitly, something like I'm seeing two different figures for this, let me confirm the current one with our team before I answer, rather than picking one and presenting it with the same confidence either way.

Written by Mohammad Farhan Habib Faraz
Senior Prompt Engineer and Prompt Team Lead at PowerinAI
www.powerinai.com

Top comments (0)