← All terms
Retrieval
BM25
A classical keyword-based search algorithm. Often beats pure vector search.
BM25 (Best Matching 25) is a probabilistic ranking function from the 1990s that scores documents by how well their terms match a query, weighted by term frequency and inverse document frequency. In modern RAG systems, BM25 is paired with dense vector search (the "hybrid" pattern) because each catches what the other misses — BM25 nails exact terms and proper nouns; dense retrieval nails semantic similarity. Pure vector search loses to hybrid in almost every benchmark.
Related terms
Building with BM25?
We ship production AI systems built around concepts like this every quarter. Send a brief and get a written proposal in 48 hours.
Send a brief →