Entity Resolution for RAG: Why Duplicate Records Kill Retrieval Quality

Search for entity resolution and you get two kinds of page. One explains what it is, in the register of a glossary. The other proposes a multi-agent architecture for it, in the register of a conference paper. Neither tells you the thing you need if you run a retrieval pipeline in production: what duplicate entities are actually costing you, and where in the pipeline to fix them.
That gap matters because the intuitive story is wrong. Ask an engineer why duplicates hurt a RAG system and you will usually hear that the model gets confused, or that repetition makes it over-weight a claim. The controlled experiments published this year say something different and more useful. A duplicated passage barely moves answer correctness at all. What it does is take up a slot.
There are three things worth getting right here, and we will take them in order: what the damage mechanism really is, why deduplication does not solve it, and which of four pipeline stages to put entity resolution in. We will also spend time on how this goes wrong, because a resolution step that merges too aggressively does more damage than the duplicates it removed.
Quick Digest
- The mechanism is displacement, not confusion. Adding duplicate copies of a retrieved document produces no significant change in answer correctness for most generators. Adding diverse documents raises it by 0.112 to 0.240 at k=5. A duplicate costs you whatever the diverse document it evicted would have been worth.
- Top-k is a fixed budget. You are not choosing whether to include a duplicate. You are choosing it instead of something else, and dense retrieval gets worse at telling those apart as the corpus grows.
- Deduplication is not entity resolution. Byte-exact dedup removes identical strings and does nothing about "Acme Corp" against "ACME Corporation". General-purpose embeddings are not optimised to separate identity-preserving variation from a genuinely similar non-match.
- Redundancy is regime-dependent. Byte-exact dedup cut retrieved bytes by 0.16% on clean academic corpora, 24.03% on enterprise-shaped ones, and 80.34% on multi-turn conversational traffic. Find out which regime you are in before you spend a sprint.
- Most teams do not know their duplicate rate. In AHIMA's patient identification survey, 29% of respondents could not state theirs, and only 22% were at or below the 1% benchmark.
- Index time is where the leverage is. Resolving entities before graph construction let one team remove around 40% of entities and improve downstream question answering, with a 52-58% winning rate across four datasets and four graph-RAG systems.
- Context assembly is the cheapest insurance. Exact dedup immediately before the prompt runs in microseconds and held answer quality across four production LLM APIs at up to 71.98% byte reduction.
- Over-merging is the failure that hurts. Transitive closure quietly collapses distinct entities into one, and in a retrieval setting a false merge is far more expensive than a missed one, because the evidence for the entity you wanted stops being reachable.
What do duplicate records actually do to retrieval quality?
Start with the constraint that makes this a real problem rather than a tidiness complaint. Your retriever returns a fixed number of chunks. Whether k is 5, 10 or 40, it is a budget, and everything that goes into the prompt displaces something that did not. That is the frame the rest of this article sits inside.
Now the measurement. A team at the University of Queensland and CSIRO ran the cleanest test of this we have seen, published in August 2026. They built a synthetic corpus of 1,500 documents covering 100 fictional events across five genres, so no generator could answer from parametric memory, and then varied what filled the context: k identical copies of an anchor document, k paraphrased versions of it, or k documents from different genres.
The duplicate condition did almost nothing. Across generators, "no generator differs significantly from its single-source baseline" beyond a marginal gain for the smallest 1B model. The diverse condition was a different story.
Note
Diversity is worth more than any prompt-engineering trick you are likely to run this quarter. At k=5, correctness gains over a single-document baseline: Llama-3.2-1B +0.240 (0.532 to 0.772), Llama-3.2-3B +0.173, Llama-3.1-8B +0.152, Gemma-3-12B +0.112. Duplicates at the same k delivered no significant gain. Source: Ross, Koopman, van der Vegt and Zuccon, University of Queensland and CSIRO, arXiv:2608.13956, August 2026.
Put those two results next to each other and the cost of a duplicate becomes calculable. It is not the damage the duplicate does. It is the value of the diverse document that did not fit. At matched k, diverse retrieval beat duplicate retrieval by +0.074 to +0.092 at k=2, widening to +0.157 to +0.247 at k=5. The more slots you have, the more a duplicate costs you, which is the opposite of the intuition that a bigger context window makes redundancy harmless.
One honest caveat about that study, because it changes how far you should carry the numbers. The corpus is synthetic by design, which is what makes the causal claim clean, and it also means these are not production benchmarks. The direction is trustworthy. The magnitudes are for a controlled setting.

There is a second reason the slot is scarce, and it gets worse as you succeed. Researchers at the University of Wyoming measured what happens to dense retrieval as a corpus grows, in work published in June 2026, and found that source attribution degrades badly at scale: the probability that a retrieved chunk came from the correct source fell from 0.84 to 0.90 under scoped retrieval down to 0.59 under a single monolithic index. Their term for it is vector search dilution. In practice it means the bigger your corpus, the more of your top-k gets spent on near-misses, and the less room there is for anything you can afford to waste.
Note
The popular explanation is not the one the evidence supports. "Lost in the middle" (Liu et al., TACL 2024) is the usual answer when someone asks why extra context hurts, and follow-up work through 2026 does not strongly corroborate the effect across context lengths and task types. More to the point, the redundancy experiments found the damage in what got displaced, not in where it sat. If you are optimising chunk position to solve a duplicates problem, you are fixing the wrong thing.

Quick Summary
Q: How do duplicate records affect RAG retrieval quality?
A: By displacement rather than confusion. Controlled experiments show that adding duplicate copies of a retrieved document produces no significant change in answer correctness, while adding diverse documents raises correctness by 0.112 to 0.240 at k=5 depending on the generator. Because top-k is a fixed budget, every slot a duplicate occupies is a slot a diverse document would have occupied, so the real cost of a duplicate is the value of what it evicted. That cost grows with k, not shrinks.
Expert Insights
The Queensland and CSIRO team tested this on a screened queryset of 252 queries where no document contained the answer string, to rule out the possibility that models were pattern-matching rather than reasoning. Diverse retrieval still rose monotonically from 0.496 at k=2 to 0.647 at k=5, while duplicate and paraphrased conditions showed no significant improvement at any k. That is the result worth carrying into a design review: paraphrase is not diversity, and neither is volume.

Why deduplication is not entity resolution
If the fix is to stop wasting slots, the obvious next move is to strip duplicates out of the corpus. That is where most teams reach for deduplication, and it is where most teams stall, because these two words get used interchangeably in design docs and the cheap technique ends up deployed against a problem it cannot touch.
Deduplication compares strings. Byte-exact deduplication removes chunks that are identical, and it is genuinely useful, which we will come back to. Near-duplicate dedup goes a little further with shingling or MinHash and catches small edits. Both operate on surface form.
Entity resolution compares identities. It asks whether two records refer to the same thing in the world, which is the question that survives a change of surface form entirely. "Acme Corp", "ACME Corporation", "Acme Corp." and a subsidiary filed as "Acme Holdings Ltd" share almost no bytes. In your index they are four entities. In reality they may be one, or two, and no string comparison will tell you which.
This is the enterprise case, and it is why the cheap fix keeps disappointing. Your corpus is a decade of contracts, CRM exports, support tickets and filings, each written by people who spelled the customer name however they felt that day.
Note
Semantic search does not close this gap either. General-purpose text embedding models "are not optimised for distinguishing entity records that represent the same real-world business or person", because small textual variations can preserve identity or destroy it and the objective those models were trained on does not distinguish the two. Domain-specific triplet fine-tuning substantially improved separation of true matches from highly similar non-matches. Source: Sapram, Raju and Konda, arXiv:2608.16161, August 2026.
That finding deserves a moment, because it is the one people resist. An embedding model will happily place "Acme Corp" and "Acme Holdings Ltd" close together. It will also place "Acme Corp" and "Apex Corp" close together, and a nearby competitor closer still. Semantic similarity is not identity, and the failure is symmetric: it merges what it should separate and separates what it should merge.
So, stated once and properly. Entity resolution is three operations, not one. Blocking, which reduces the comparison space so you are not scoring every record against every other. Matching, which scores candidate pairs and decides. Canonicalisation and merge, which picks a surviving representation and rewrites references to it. The probabilistic foundation goes back to Fellegi and Sunter's 1969 record linkage model and the maths has aged well. If you want the mechanics of the middle step at implementation depth, we have written that up separately in our guide to automated entity matching for multi-source datasets.
Quick Summary
Q: What is the difference between deduplication and entity resolution?
A: Deduplication compares surface form and removes chunks that are identical or near-identical. Entity resolution compares identity and decides whether two records refer to the same real-world thing regardless of how differently they are written. Byte-exact dedup will never merge "Acme Corp" with "ACME Corporation", and semantic embeddings will not reliably do it either, because general-purpose models are not trained to separate identity-preserving variation from a similar non-match. Entity resolution is blocking, matching, then canonicalisation and merge.

Measure your redundancy regime before you spend anything
Before committing a sprint to entity resolution, find out whether you have the problem it solves. Redundancy is not a constant property of corpora. It varies by roughly two orders of magnitude depending on where your documents came from, and that single fact decides whether entity resolution is your highest-value work this quarter or a distraction.
A 2026 study measured byte-exact chunk deduplication across three corpus types and found three distinct regimes.
| Regime | Corpus tested | Byte reduction from exact dedup | What it means for you |
|---|---|---|---|
| Clean academic | BeIR, 22.2M passages across six sources | 0.16% | Curated, deduplicated at source. Exact dedup buys you nothing |
| Enterprise | Wiki revisions, arXiv versions, Stack Exchange | 24.03% | Versioned documents and near-identical restatements. This is where most business corpora sit |
| Multi-turn conversational | WildChat, 5,000 conversations | 80.34% | Conversation history replayed into every turn |
If your corpus looks like the middle row, roughly a quarter of your retrieved bytes are carrying no new information. That is the enterprise shape: the same policy document at six revisions, the same product description across three catalogues, the same company under four spellings. And note that byte-exact dedup is the floor of what is recoverable there, because it only catches identical strings. The entity-level redundancy underneath it is larger and invisible to that measurement.
The uncomfortable part is that most teams cannot answer this question about their own data. When AHIMA surveyed healthcare organisations on patient identification, 29% of respondents could not state their duplicate error rate at all, and only 22% were at or below the 1% benchmark AHIMA recommends. That survey is healthcare-specific and dated 2021, and we cite it for the one thing it establishes well: not knowing is the normal condition, not an unusual one.
Measuring it is an afternoon of work, not a project. Three numbers, in increasing order of usefulness:
- Exact-hash rate. Hash every chunk in your index and count collisions. This is the floor, and it maps directly onto the table above.
- Entity-key collision rate. Extract named entities per chunk, normalise them, and count how many chunks share an identical entity set. One 2026 study used exactly this signal to filter an index and cut its size by 25 to 36% with under 6% recall loss.
- Top-k overlap on your real queries. Run your actual production query log, take the top k for each, and measure pairwise similarity within each result set. This is the number that matters, because it measures the thing the generator sees rather than the thing your index contains.
Run the third one first if you only run one. An index can be full of redundancy that never surfaces in a result set, and a clean-looking index can still return five paraphrases of the same paragraph for the queries your users actually ask.

Quick Summary
Q: How do you measure redundancy in a RAG corpus?
A: Three numbers, cheapest first. Exact-hash collision rate across chunks gives you the floor and tells you which of the three published regimes you sit in, roughly 0.16% for curated academic corpora, 24% for enterprise document sets, 80% for conversational traffic. Entity-key collision rate, comparing normalised named-entity sets per chunk, catches redundancy that survives a hash. Top-k overlap on your real query log is the one that matters most, because it measures what the generator actually receives rather than what the index holds.
Expert Insights
The three-regime measurement was run by Sietse Schelpe at Corbenic AI and published in May 2026, and the caveat he attaches to it matters more than the headline number. The 80.34% conversational figure is a byte-reduction characterisation obtained through stateful proxy caching, not a quality guarantee, and the noise audit was self-annotated. Read the enterprise 24.03% as the number that applies to you, and treat the conversational figure as an upper bound on what redundancy can look like.

Four places to put entity resolution in a RAG pipeline
Here is the part that turns into work. Entity resolution can live at four points in a retrieval pipeline, they cost wildly different amounts, and they are not substitutes. In practice we would sequence them in the order below, and most teams get a large fraction of the available benefit from the last one before they have finished arguing about the first.
1. At the source, before anything is indexed
Canonicalise identity at ingest, so the index is built from resolved records rather than resolved after the fact. This is the version with the best long-run economics and the worst time-to-value, because it means owning a canonical entity store and rewriting references to it as documents arrive.
It is the right call when the same entities recur across many source systems and you already have a master data problem you are managing anyway. It is the wrong first move when you are trying to find out whether entity resolution is worth doing.
2. At index time, before embedding or graph construction
This is where the measured leverage is, and it is dramatic enough to be worth quoting precisely. In work published in October 2025, a team at Nanyang Technological University and Mila ran entity resolution over LLM-generated knowledge graphs before those graphs were used for retrieval. Removing around 40% of entities improved downstream question answering, with a 52-58% winning rate across four datasets and four separate graph-RAG systems. Pushed further, 70% entity reduction still held performance.

Their Proposition 1 is the line to take to a design review: without entity resolution, graph-based RAG "degrades into vanilla RAG". If you have built a knowledge graph RAG system and it is not beating your plain vector baseline, unresolved entities are the first place to look, not the retrieval strategy. The full paper is Less is More: Denoising Knowledge Graphs for RAG.
The same logic applies without a graph. Entity-based chunk filtering, where chunks sharing an identical named-entity set are treated as redundant, cut vector index size by 25 to 36% with recall degradation generally under 6% and precision variation under 3%. A random-filtering baseline degraded far faster at the same reduction, which is what tells you the signal is real rather than the index being over-provisioned.
3. At retrieval time, in how you select the top k
Given the displacement result, this is the stage that directly recovers the correctness you were losing. Do not select the k highest-scoring chunks. Select k chunks that are jointly informative, which means penalising a candidate for resembling something already in the set rather than only rewarding it for resembling the query.
Maximal marginal relevance is the standard formulation and it is a two-line change in most retrieval stacks. The tuning that matters is the trade-off weight, and it is corpus-specific: too much diversity pressure and you start admitting genuinely irrelevant material to satisfy a novelty term.
4. At context assembly, just before the prompt
The cheapest thing on this list, and the one to ship this week. Immediately before you build the prompt, drop chunks whose text you have already included, then collapse chunks whose canonical entity keys match.
Note
This costs essentially nothing to run. A reference implementation of byte-exact deduplication ran at a median of 0.66 to 3.69 microseconds, and quality held across four production LLM APIs under a five-judge panel at reduction levels of both 14.13% and 71.98%. Source: Schelpe, Corbenic AI, arXiv:2605.09611, May 2026.
def assemble(chunks, k):
"""Post-retrieval, pre-prompt. Exact dedup, then entity-key collapse."""
seen_text, seen_entities, kept = set(), set(), []
for c in chunks: # chunks arrive in relevance order
text_key = hash(c.text.strip())
if text_key in seen_text:
continue # byte-exact duplicate
ent_key = frozenset(c.canonical_entity_ids)
if ent_key and ent_key in seen_entities:
continue # same entities, no new information
seen_text.add(text_key)
seen_entities.add(ent_key)
kept.append(c)
if len(kept) == k:
break
return kept
Note what the second condition depends on. `canonical_entity_ids` only exists if something upstream resolved entities and wrote the ids onto the chunk. That is the honest dependency in this whole framework: stage four is cheap because stages one or two did the hard part. Without them you are back to byte-exact matching, which is the 0.16% regime dressed up as a strategy.

Quick Summary
Q: Where should entity resolution go in a RAG pipeline?
A: Four stages, and they are complements rather than alternatives. Source-time canonicalisation has the best long-run economics and the slowest time-to-value. Index-time resolution carries the measured leverage: removing around 40% of entities from a knowledge graph improved question answering with a 52-58% winning rate across four systems. Retrieval-time diversity selection is what directly recovers the correctness that displacement was costing you. Context-assembly dedup runs in microseconds and is the one to ship first, but it only reaches entity-level redundancy if an upstream stage wrote canonical ids onto your chunks.
Expert Insights
The Nanyang Technological University and Mila result is worth restating because it inverts a common assumption. Their systematic evaluation covered blocking strategies, embedding choices, similarity metrics and merging techniques, and entity-type-based blocking with direct merging came out ahead. The finding that a graph gets better when you delete 40% of its entities is not a claim that less data is better. It is a claim that duplicate entities were never data in the first place; they were the same data, indexed several times, competing with each other for the same retrieval slot.

How does entity resolution go wrong?
We should be honest about the failure mode, because a resolution step that is too aggressive causes damage that is much harder to see than the duplicates it removed.
Over-merging is the expensive error. Entity resolution produces two kinds of mistake. A false negative leaves two records for one entity, which is where you already are, and the cost is the displacement we have been discussing. A false positive merges two genuine entities into one, and in a retrieval setting that cost is categorically worse: evidence about the entity your user asked for is now filed under something else, and no amount of retrieval tuning brings it back. The evidence has not been ranked poorly. It has stopped being reachable.
Transitive closure is how it happens quietly. Most pipelines resolve pairwise and then cluster. If A matches B and B matches C, the cluster contains A, B and C, whether or not A and C have anything in common. Chain a few of those together on a corpus of company names with shared tokens and you will produce a single entity representing an entire industry. It passes every unit test, because each individual pairwise decision was defensible.
Three guards worth putting in from the start:
- Cap cluster size and review anything above the cap. A cluster of 400 records for a mid-market supplier is not a triumph of recall.
- Keep the merge reversible. Store the pre-merge records and the decision that merged them. A resolution step you cannot roll back is a one-way door on data you did not fully understand.
- Monitor retrieval, not just matching. Match precision and recall on a labelled pair set tells you about the matcher. What you actually care about is whether answer quality moved, so re-run your evaluation set before and after, on the same queries.
Thresholds are a corpus-specific decision and there is no default worth inheriting. A corpus of pharmaceutical entities and a corpus of retail suppliers do not want the same cut-off, and the same corpus will not want the same cut-off after two years of new sources. In practice we treat the threshold as a parameter with an owner and a review date rather than a constant, and we tune it against the retrieval evaluation rather than against pair-level F1.
If your pipeline is failing in ways that do not look like this, entity duplication may not be your binding constraint. Our broader diagnosis of why RAG pipelines fail in production covers the other common causes, and it is worth ruling them in or out before you commit to a resolution project.
Quick Summary
Q: What are the risks of entity resolution in a RAG system?
A: Over-merging, mainly. A false positive that fuses two genuine entities is far more expensive than a duplicate left in place, because the evidence for the entity your user asked about stops being reachable rather than merely ranking poorly. Transitive closure makes this happen silently: A matches B, B matches C, and now three distinct things are one cluster while every individual pairwise decision looked correct. Cap cluster sizes, keep merges reversible, and measure the change in answer quality rather than in matcher precision.

Forage AI works as an extension of your data team on the parts of this that are genuinely tedious: canonicalising entities across sources that were never designed to agree, and keeping that resolution current as the sources drift. Our entity matching agent is built for the source and index stages above, and every delivery passes a 3x QA team before it lands in your system.

None of this is work that finishes. Sources drift, new systems get bolted on, and a threshold that was right in March is wrong by September, which is why the teams who stay ahead of it treat entity resolution as a standing owner and a review date rather than a migration they completed once. The measurement is the part worth institutionalising: if you run the top-k overlap check on your real query log every quarter, you will see the problem returning before your users do. If you run it and find something we did not cover here, we would genuinely like to hear about it, because the published work on this is still thin and most of what is known sits inside teams who have not written it down.
Frequently asked questions
Does entity resolution improve RAG accuracy? It improves retrieval quality, and that usually improves answer quality. The mechanism is worth being precise about, though, because resolving entities does not make the generator smarter. It frees top-k slots. The gain comes from whatever diverse documents then fit into them. In one published evaluation, resolving and removing around 40% of entities from a knowledge graph improved downstream question answering with a 52-58% winning rate across four systems. If your corpus has little redundancy to begin with, expect little gain.
Is deduplication enough for a RAG pipeline? Only if your redundancy is byte-exact. Published measurements put exact-dedup savings at 0.16% for curated academic corpora and 24.03% for enterprise document sets, so on an enterprise corpus dedup is worth doing and is nowhere near sufficient. It cannot merge "Acme Corp" with "ACME Corporation", which is the redundancy that dominates business data.
Can embeddings handle entity resolution on their own? No, and this is the most common design mistake we see. General-purpose embedding models are trained for semantic similarity, not identity, and research published in August 2026 found they are not optimised to distinguish records representing the same real-world business or person. They will place a company and its unrelated near-namesake close together while missing a subsidiary that shares no tokens. Domain-specific fine-tuning improves this materially; it does not make the problem disappear.
Where does entity resolution belong: before or after chunking? Before, if you can. Resolution before chunking lets you canonicalise the mentions inside the text and attach entity ids to each chunk, which is what makes cheap downstream filtering possible. Resolution after chunking still works but you are matching on fragments, which is a harder problem with less context to match on.
How much does entity resolution reduce index size? Entity-based chunk filtering has been measured at 25 to 36% index reduction with recall degradation generally under 6% and precision variation under 3%. Treat those as a plausible range rather than a target, because the number is a property of your corpus, and a corpus with genuinely low redundancy will show a much smaller reduction and should.
How do we know if over-merging is happening? Watch cluster size distribution rather than average match confidence. Over-merging shows up as a long tail of implausibly large clusters, not as a drop in pairwise confidence, because each individual match in a bad chain scored well. Set a cap, route anything above it to review, and keep every merge reversible so a bad threshold is a rollback rather than a rebuild.
Related articles
- Why RAG Pipelines Fail in Production: A Data-Quality Diagnosis The wider taxonomy of retrieval failures, for ruling out the other causes first
- Efficient Automated Entity Matching for Multi-Source Datasets The blocking and matching mechanics at implementation depth
- AI-Powered Entity Matching: How AI Agents Improve Data Accuracy How agent-based matching handles the cases rules miss
- Data Storage Solutions for LLMs and RAGs Where resolved entities and their embeddings should actually live
Sai is a data infrastructure enthusiast who has spent the past two to three years following the AI space closely, from the infrastructure layer to the fast-growing world of data for AI. He is genuinely curious about how modern data pipelines get built and where the data industry is heading, and he writes insightful pieces on the core topics that shape this niche.