V.Trivedy_
← Writing

19 Sep 2026

Why BM25 still beats agentic search on large corpora

BM25 was designed in the 1990s. A study in July 2026 found it beats agentic search by ~20 points on large corpora, at a fraction of the tokens.

Cover slide: BM25 was designed in the 1990s and beat agentic search by about 20 points on large corpora in July 2026

When people build retrieval today, they mostly reach for either a vector db, or everything pushed straight into the model's context. The second one is fine under ~200k tokens (~500 pages). Past that it stops being fine.

Index of retrieval methods sorted by job: rankers, filters, navigators, structures, glue and reference

BM25 explained: the scoring formula, what IDF, k1 and b do, and its index, query and storage cost

Most people don't even consider an agent with grep, and it surprised me given how well it works. No index & no embedding pipeline, so setup costs close to nothing, and on the small corpora in that study it beat both BM25 and dense retrieval. Where it hurts is per query cost, already ~39x BM25's tokens at the smallest size, and once the corpus crossed ~10M tokens its accuracy dropped off while BM25 overtook it and stayed ahead at every tier they measured.

Chart of answer score as the corpus grows, where BM25 overtakes agentic grep search around 10M tokens

Agents write BM25 shaped queries, with grep beating vector search on a long conversation benchmark

BM25 (already sitting inside Elasticsearch / OpenSearch etc) gets considered even less, which I still find odd.

How tuning BM25 changes results, with its variants and where it breaks on vocabulary mismatch

That study made me map the whole retrieval stage properly, and there is a lot more on it than these four.

Dense retrieval: search by meaning, with its cost profile, where it wins and where it breaks

Learned sparse retrieval: keyword search that knows synonyms, with cost, wins and breaks

Late interaction retrieval: the most accurate neural option with the biggest memory bill

Bloom filters & trigram indexes that only tell you where not to look, tree indexes that makes a model navigate the way an analyst would, graphs you build up front & query later, learned sparse, late interaction etc.

Code search: ripgrep, trigram, suffix array and sparse n-gram indexes, and when to index

Bloom filters: how the bit array answers definitely not here or maybe here, and where they earn a place

Deduplication with MinHash, LSH, SimHash and LSHBloom, and why duplicates eat the top results

Each one bills you differently (index cost / query cost / storage) and breaks on its own kinds of problems.

Agentic search: letting the model grep the way a person would, and the cost of raw grep against a BM25 tool

Tree retrieval: a model reads the table of contents of a long document, with PageIndex and RAPTOR

GraphRAG: graphs answer questions about the whole collection, and the build cost is the bill

Agent memory as a retrieval problem where facts expire, with temporal graphs, Mem0 and Letta

My point is, most AI products I'm handed, picked a vector db before anyone asked what they were retrieving. The right pick depends on corpus size, document shape & the kind of question being asked, and that's a lot cheaper to settle before the build.

Upgrades that sit on top of any retriever: hybrid search, reranking, contextual retrieval and query rewriting

Under about 200k tokens you may not need retrieval at all, so put the whole knowledge base in the prompt

Master table part 1 comparing rankers and filters on cost, storage, best use and failure modes

Master table part 2 comparing navigators, structures and glue on cost, storage, best use and failure modes

Decision flow: check the shape of your data in order, then prove the choice with evals

The default retrieval stack the evidence supports, with the advice to measure before adding a layer

Papers & sources are on the last page of the field guide.

List of arXiv papers and other sources behind the field guide