Why BM25 queries with more terms can be faster (and other scaling surprises)
I analyzed how BM25 query latencies scale with document count and top_k. Longer queries scale less efficiently, and essential terms impact performance in some surprising ways.
Why BM25 queries with more terms can be faster (and other scaling surprises) NEW: Instant namespace branching NEW: Branching for instant, copy-on-write namespaces Why BM25 queries with more terms can be faster (and other scaling surprises) January 07, 2026 • Adrien Grand (Engineer) BM25 full-text search has very different scaling characteristics than vector search. Vector search latency is generally a function of vector dimensions, top-k, the size of the dataset, and the presence of filters. BM25 latency, on the other hand, also varies a lot by query, and in some surprising ways: Sometimes add
Explore this link on the map →saved by
related reading
- Probabilistic Relevance Frameworkstaff.city.ac.uk
- Okapi BM25 - Wikipediaen.wikipedia.org
- Building a web search engine from scratch in two months with 3 billion neural embeddingsblog.wilsonl.in
- Transformer Inference Arithmetic | kipply's blogkipp.ly
- The Anatomy of a Search Engineinfolab.stanford.edu
- LLM Inference Performance Engineering: Best Practices | Databricks Blogdatabricks.com
- Reiner Pope – The math behind how LLMs are trained and serveddwarkesh.com
- Full-text search engine with PostgreSQL (part 2): Postgres vs Elasticsearch | xataxata.io
- TurboQuant: Redefining AI efficiency with extreme compressionresearch.google
- Announcing ScaNN: Efficient Vector Similarity Searchai.googleblog.com
- Our AI Research: How We Evaluate Semantic Search Technology | Exa Blogexa.ai
- Elicit: AI for scientific researchelicit.com