Most RAG pipelines treat retrieval as a ranking problem. Pull the nearest chunks, stuff them into the prompt, and hope the model picks the right one. That works until two good documents say opposite things. Then the model doesn't resolve the conflict. It averages it, or it picks whichever passage was written more confidently.
Harmonic RAG starts from a different assumption: contradictory documents are a retrieval problem, not a generation problem. Before the model writes an answer, the pipeline should notice the disagreement and try to put the documents back in harmony.
The plan for resolving a contradiction
Start wide. Pull about three times as many documents as you mean to keep. Take the entities off that set, then go fetch the facts that change which document should win: place, time, user info, things like that. Rank on those facts. A small NLI(LLM, based on use-case) model then reads the ranked chunks and says whether they actually disagree.
If they don't, stop. Score what's left with a plain rubric: how recent it is, who published it, whether the scope matches, and how many other chunks say the same thing. Keep that score next to the rank, pass the model the top n, and cite them.
Each document hangs on to the entities we pulled out of it, and later lookups use those. If we know what to search for, it's a vector search. If we don't, we walk a graph of documents that share a scope.
If they do disagree, don't rush off to fetch more. Name the fight first.
A lot of the time it's just a date, a place, an organization, or how official the source is(contextual). A rule can finish that. Newer beats older. The place the question named beats the one next door. An official source beats a wiki. Write down the weights and the reason, and answer from that.
The hard case is a real disagreement(factual) about the facts, or a rule that didn't settle it. Then there's a loop, and it gets three(avoid infinite looping) tries. Each try picks one missing fact(not one entity or dimension - but a fact) and goes after only that. A query means a vector search. No query means a walk on the graph. Rank what comes back, cut it down to three times the top n, and turn the competing claims into something you could prove wrong. Score them with the same rubric. Stop early if the conflict is gone, or if one side is clearly ahead. Don't fetch a document or an entity you've already seen.
If a tool call fails, or the three tries run out and it's still a tie, don't pretend you have a winner.
For interactive cases - ask which of the leading guesses they meant, and retrieve again from their answer.
For non-interactive cases - break the tie with graph centrality, show every weighted document, and write the answer with the method, the reasons, and a caveat.
Does this seem like a good way to break the tie, or would you do it differently?

Top comments (0)