Back to paper library
Paper notesarXiv 2026

BM25 Wins at Scale

Make BM25 Great Again

Original paper

BM25 Wins at Scale: A Scaling Study of Retrieval-Augmented Generation Paradigms

Paper authors

Pengyu Wang · Benfeng Xu · Shaohan Wang …

Show all 8 authors

Pengyu Wang · Benfeng Xu · Shaohan Wang · Mingxuan Du · Xin Zeng · Huarui Wu · Lei Zhang · Licheng Zhang

Publication
Publication venue not yet verified
First submitted to arXiv
arXiv:2607.26497
Cite this paper · BibTeX

The citation identifies the linked source version. It cites the original paper and its authors.

@misc{retrievalaugmentedgenerationbm25winsatscale2026,
  title = {{BM25 Wins at Scale: A Scaling Study of Retrieval-Augmented Generation Paradigms}},
  author = {Pengyu Wang and Benfeng Xu and Shaohan Wang and Mingxuan Du and Xin Zeng and Huarui Wu and Lei Zhang and Licheng Zhang},
  year = {2026},
  eprint = {2607.26497},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2607.26497}
}
On this page

By 2026, RAG had split into several schools.

Lexical retrieval ranks keywords with methods such as BM25. Dense retrieval converts text into vectors and compares similarity. Graph-based RAG asks an LLM to extract entities and relationships during indexing and builds a knowledge graph. Then there are agents that work like coding agents, using ls, grep, and file reading to search a directory tree step by step.

Every school has impressive paper results. The problem is that these results usually come from different benchmarks, tested at one particular data size.

Enterprise knowledge bases do not stay one size. Tens of thousands of documents today may become hundreds of thousands next year.

This preprint from the University of Science and Technology of China, Metastone, and the Information Technology Research Center of the Beijing Academy of Agriculture and Forestry Sciences sets out to learn which RAG approach still holds up as the data keeps growing.

The paper was first uploaded to arXiv on July 29, 2026 under the title “Which RAG Paradigm Wins at Scale?” before adopting its current title.

Defining the Problem

The authors define scaling as holding the questions fixed, growing only the database, and measuring how each method changes.

That requires three things:

  1. Fixed questions and answers. Changing questions would mix data growth with task difficulty.
  2. Fixed distractors. Deliberately misleading documents should be present from the start, rather than introduced gradually as the corpus grows.
  3. Fixed comparison conditions. The answering model, scoring procedure, and cost accounting must be consistent across methods.

Solving the Problem

A Fictional Company's Knowledge Base

The authors use EnterpriseRAG-Bench, which simulates a fictional LLM inference-service company. It contains 511,957 documents totaling 600.8 million tokens across nine sources, including wikis, chat threads, tickets, email, meeting transcripts, CRM records, and code reviews.

There are 500 questions in ten categories, ranging from basic lookup to exhaustive information gathering, resolving contradictory information, and answering high-level questions. Each question has a reference answer, supporting documents—722 in total—and atomic facts the answer should contain.

The corpus itself already includes 7.7% noisy documents, which may have misplaced sources or paths or be outdated near-duplicates, much like a real company's files.

The Foundation: 1,144 Fixed Documents

The authors first build a minimal database, called the bedrock:

722⏟gold documents+326⏟traps+99⏟lures+2⏟company overviews−5⏟duplicates=1,144\underbrace{722}_{\text{gold documents}}+\underbrace{326}_{\text{traps}}+\underbrace{99}_{\text{lures}}+\underbrace{2}_{\text{company overviews}}-\underbrace{5}_{\text{duplicates}}=1{,}144

Traps are crucial: they cover the same topic as a gold document but contain the wrong version, date, or decision—for example, an old specification for the same project. The authors take the top ten BM25 results from the full corpus, then use dense retrieval to rerank BM25's top 200 and select another ten. An LLM filters these for “same topic, wrong facts.”

Lures are prepared for unanswerable questions: documents similar to the question but verified not to answer it. This prevents a model from getting the question right merely because it found nothing.

All these distractors are included in the smallest database and remain unchanged thereafter.

Twenty-Eight Nested Databases

The remaining documents are placed in a fixed order. Starting from the bedrock, each level adds documents so that the count grows by a factor of 1.25:

nt+1≈1.25 ntn_{t+1}\approx1.25\,n_t

The corpus grows from 1,144 to 511,959 documents across 28 levels, roughly 450-fold, or from 1.7 million to 601 million tokens.

The “nesting” here is strict, with every level fully containing the preceding one, as the authors verified with file checksums. From level 1 to level 28, the only change is the addition of irrelevant background documents.

Added documents are stratified by source and noise proportion, keeping each level's composition close to the full corpus.

Seven Pipelines, Four Schools

SchoolMethodHow it works
LexicalBM25Inverted index; no LLM required
DenseDenseRAGEmbed each chunk and compare similarity
GraphHippoRAG 2Extract triples, build a graph, retrieve with Personalized PageRank
GraphMS-GraphRAGEntity graph and hierarchical community reports; local search
GraphLightRAGTwo-level entity–relation index; hybrid mode
GraphLinearRAGLightweight named-entity recognition builds a co-occurrence graph without generative LLM calls
AgentFile-System AgentNo index; list directories, search, and read the raw file tree

Compiled from §4.1 of the paper.

File-System Agent uses a coding-agent-style interface, with up to 80 LLM calls per question.

Other conditions are aligned as closely as possible:

  • Answering model: Qwen3.6-27B at temperature 0 for every method. File-System Agent uses the same model to choose its next action.
  • Embeddings: Qwen3-Embedding-0.6B throughout.
  • Retrieval depth: Methods with a retrieval-depth setting take the top five chunks. BM25, DenseRAG, and HippoRAG 2 share the same chunking scheme.
  • Cost accounting: Every LLM call is intercepted, and its tokens assigned to either indexing or answering.
  • Scoring: The benchmark's official protocol uses combined score, measuring factual completeness after a correctness gate. Each question is run once; confidence intervals are estimated by bootstrapping questions.

An independent judge model rescoring the answers agrees with the original in 96.2% of judgments. A simpler binary correct/incorrect score also preserves the ranking at all nine shared levels.

Discussion

Main Results: A Crossover Near Ten Million Tokens

Official combined score versus corpus tokens, with 95% confidence intervals; BM25 and File-System Agent cross near ten million tokens
Figure 3 from the paper, excerpted from page 6 of the v3 PDF. The horizontal axis is corpus tokens on a logarithmic scale; the vertical axis is official combined score. Bands show 95% confidence intervals. Graph-method curves stop at the largest level that could be built.

The horizontal axis shows corpus tokens logarithmically; the vertical axis shows score.

Look at the top two curves. At the left, cyan File-System Agent is slightly above brown BM25, scoring 77.4 versus 74.7 at the bedrock, but their 95% confidence intervals (73.9–80.8 and 71.4–77.9) overlap, so they are not statistically distinguishable.

Moving right, the curves cross around 10710^7, or ten million tokens. From there, BM25 leads at every shared level, with an increasingly large gap.

At the full corpus on the far right:

Method1,144 documents (bedrock)21,614 documents131,876 documents511,959 documents (full)
BM2574.764.955.250.5
File-System Agent77.462.650.930.7
DenseRAG58.144.236.029.9
HippoRAG 266.253.841.0—
LinearRAG46.234.329.8—
MS-GraphRAG45.9———
LightRAG48.0———

Compiled from Table 1 of the paper. Columns are document counts at different levels. “—” means the level was not built or evaluated.

At full scale, BM25 scores 50.5, File-System Agent drops to 30.7, and DenseRAG reaches 29.9. The gap is nearly 20 points.

Dense retrieval stays below BM25 throughout. Most graph methods never reach the full corpus at all.

Cost: The Agent's Search Gets More Expensive

For one-retrieval-then-answer pipelines such as BM25, DenseRAG, and HippoRAG 2, query cost barely changes with corpus size: roughly 5,000 to 6,000 tokens per question, mostly the answering model's prompt.

File-System Agent is different. It already needs 226K tokens per question at the bedrock, 39 times BM25's cost. At 21,614 documents, that rises to 343K, about 60 times as much.

Median LLM calls rise from five to eight at 42,587 documents. The fraction exhausting the 80-call budget stays below 7% through 42,587 documents, rises to 15% at 131,876, and reaches 31% at full scale.

The authors stress that accuracy also declines among questions that stay within budget. The collapse cannot be attributed solely to too small a budget.

Over all 500 questions, BM25, at 5.8K tokens per question, spends 2.9 million tokens for 74.7 points; File-System Agent, at 226K per question, spends about 113 million tokens for 77.4. Nearly 40 times the tokens buy 2.7 points, still within overlapping confidence intervals.

Graph-Based RAG Hits the Index-Building Wall

For graph methods, most of the cost goes into indexing, where an LLM reads each passage and extracts entities and relations.

The authors fit C(x)=a xbC(x)=a\,x^{b} to indexing tokens versus corpus size, then extrapolate to the full corpus:

MethodExponent bbFull-corpus extrapolationEstimated single-machine time
HippoRAG 21.01About 2.9 billion tokensAbout 3 days
MS-GraphRAG0.92About 7.9 billion tokensAbout 50 days
LightRAG1.36About 102 billion tokensAbout 4 years

Compiled from Table 2 of the paper.

LightRAG's exponent exceeds one: indexing cost per document rises as the corpus grows. The authors attribute this to repeated entity rewriting and merging. It already fails to finish within their resources at 2,826 documents.

Even completed indexes score poorly. On a corpus of about 155 million tokens, HippoRAG 2 spends 724 million tokens building its index and scores 41.0, about 15 points below BM25 at that level.

The authors identify three disadvantages for graph methods on this corpus. Extraction introduces noise, including many fragmentary entities among the bedrock's 32,000; graph proximity favors semantically related but factually wrong material, exactly what trap documents exploit; and HippoRAG 2 discards extracted predicate text, losing relationship semantics.

Why Does the Agent Lose? Find It Before You Reason About It

This is the paper's key controlled experiment.

Does File-System Agent lose because it cannot find the evidence, or because it cannot use evidence once found?

On a fixed set of 150 questions, the authors compare the bedrock and full corpus. A new condition, Agent+BM25, keeps the model, harness, 80-call budget, and judge unchanged. Only the raw file-tree tools are replaced by BM25-ranked search and chunk reading, with the first search forced to use the original question.

MethodBedrockFullDocument recallCallsTokens
Native BM2581.354.865.61.005.8K
File-System87.136.936.836.12895K
Agent+BM2590.169.472.45.79101K

Compiled from Table 4: the same 150 questions, rescored together. The first two score columns give combined score at the two levels. Document recall, calls per question, and tokens per question refer to the full corpus.

The table shows that the problem lies in finding the evidence.

At full scale, File-System Agent hits at least one gold document on only 39.0% of questions; BM25 does so on 71.6%.

Among questions where each method finds at least one gold document, File-System Agent scores 85.9 versus BM25's 73.8. Once it finds information, the agent appears better at reasoning and synthesis. But these are different subsets, defined by each method's own hits, so the numbers are descriptive and cannot establish a direct ranking.

Changing only the retrieval tools raises Agent+BM25 to 69.4 on the full corpus, 32.5 points above the original File-System Agent and 14.6 above Native BM25. Its hit rate reaches 78.0%, while tokens per question fall from 895K to 101K—about one ninth.

The authors argue that agent reasoning works best after global ranking, rather than as its replacement. As the file tree grows, navigating it branch by branch makes the relevant branches harder to reach.

Where Does BM25's Advantage Come From?

The authors acknowledge that this corpus favors BM25. Enterprise questions often include exact lexical anchors—project names, ticket IDs, and people—while traps are semantically similar but factually wrong. Exact matching is less easily fooled.

They run two controls:

  • Paraphrase the questions to reduce lexical overlap. At the bedrock, BM25 falls to 63.9, File-System Agent scores 73.3, and DenseRAG 51.8. Paraphrasing strengthens the agent's small-corpus advantage, but BM25 still beats dense and graph retrieval.
  • Retrieve ten chunks instead of five. BM25 scores 83.0 and DenseRAG 70.0; the gap remains.

What to Keep in Mind

  1. One benchmark. EnterpriseRAG-Bench is a simulated enterprise corpus. Its lexical anchors and trap design affect lexical-versus-semantic retrieval performance.
  2. A small dense model. All embeddings come from Qwen3-Embedding-0.6B. The paper does not test whether larger embedding models would change DenseRAG's results.
  3. No hybrid-retrieval evaluation. It compares individual pipelines, without common combinations such as BM25 fused with dense retrieval or followed by a reranker. Agent+BM25 is the closest.
  4. One answering model and one run per question. Uncertainty comes from resampling questions, without run-to-run variation.
  5. Code and data. The appendix describes supplementary code and data and how they correspond, but the v3 main text provides no public download location.

Conclusion

Across 28 nested databases spanning roughly 450-fold growth, the authors hold questions, gold documents, and traps fixed and add only background documents. Under this setup:

  1. There is a crossover, not a permanent winner. File-System Agent has a slight edge at small scale. Beyond about ten million tokens, BM25 leads at every shared level, by nearly 20 points at full scale.
  2. BM25 is cheap and steady. At about 5.8K tokens per question and with no LLM indexing cost, it occupies the low-cost end of the cost–accuracy trade-off.
  3. The agent's problem is finding evidence. Replacing file-tree tools with BM25-ranked search raises the same agent from 36.9 to 69.4 at full scale, using about one ninth of the tokens.
  4. Graph-based RAG gets stuck at indexing. LightRAG extrapolates to about four years on one machine. Even HippoRAG 2, which builds at larger sizes, scores below BM25.

For enterprise corpora, the authors recommend using BM25 by default, and Agent+BM25 when questions require synthesizing multiple sources. LLM-built graph indexes are difficult to justify at hundreds of thousands to millions of documents unless construction approaches linear cost and questions predominantly concern relationships.

When the data grows, a thirty-year-old method returns. This time, it stands in front of the agent, clearing a path.