BM25
BM25 (Best Match 25) is a classic ranking algorithm widely used in information retrieval, belonging to the probabilistic retrieval model family. It calculates relevance scores between query terms and documents based on factors including term frequency (TF), inverse document frequency (IDF), and document length normalization, and is used to rank search results. BM25 is recognized for its robust keyword matching capability, commonly serves as a baseline algorithm for text retrieval systems, and can be combined with semantic retrieval methods.
Core Facts
混合检索(Hybrid Search)将向量检索与BM25关键词检索的结果通过RRF(倒数排名融合)等算法合并,兼顾语义理解与精确匹配
BM25 (Best Matching 25) is a probabilistic ranking algorithm proposed by Stephen Robertson and others in the 1990s, scoring relevance based on three factors: term frequency, inverse document frequency, and document length normalization.
BM25 is a classic keyword retrieval algorithm based on term frequency statistics, which is complementary to vector retrieval.
Timeline (last 90 days)
BM25 does not need an embedding model or a vector database and incurs no additional fixed context overhead, making it suitable for high-frequency, low-latency scenarios.
When counting only notes not yet in context, the hit rate of BM25 routing rose from 43% to 68%.
Using BM25 to route note bodies and the first three messages of a session raised the hit rate of the top four suggestions from 41% to 76%, and halved the token consumption per message.
The routing problem stems from the limitations of lexical search itself: when the user message is a vague instruction, the question contains almost no usable retrieval signal, and no matter how strong BM25 is, it has nothing to work with.
The fragment approach cuts each note into a pile of small fragments, puts them all into a BM25 index, and then retrieves with the question; the difference from the ladder is the retrieval unit (paragraph level vs note-level headings and maps), not the relevance algorithm itself.
Modern search systems usually combine lexical ranking with other signals rather than replacing BM25, and BM25's reliability on exact matches is still difficult for vector retrieval to fully replace.
RRF uses only ranks rather than raw scores, avoiding the problem that the dimensions of dense vectors and sparse BM25 are not comparable.
检索策略的效果高度依赖数据特征——在FAQ上BM25可能打败向量检索,在语义模糊的查询上则相反。
In technical document verification scenarios, hybrid retrieval (BM25 + embeddings) is almost a mandatory choice—using BM25 to ensure precise identifier recall and vector retrieval to supplement semantically relevant context.
On long-document multi-hop QA tasks, NavTree is the only hierarchical method that significantly outperforms BM25 at the category-to-category level.
40 more timeline events
All Facts (20)
混合检索(Hybrid Search)将向量检索与BM25关键词检索的结果通过RRF(倒数排名融合)等算法合并,兼顾语义理解与精确匹配
90%VerifiedBM25 (Best Matching 25) is a probabilistic ranking algorithm proposed by Stephen Robertson and others in the 1990s, scoring relevance based on three factors: term frequency, inverse document frequency, and document length normalization.
80%VerifiedBM25 is a classic keyword retrieval algorithm based on term frequency statistics, which is complementary to vector retrieval.
80%VerifiedBM25 and TF-IDF are classic representatives of lexical retrieval, based on literal keyword matching and term frequency statistics.
75%VerifiedHybrid retrieval (combining dense vector retrieval with BM25 sparse retrieval) performs better than either method alone on most benchmarks.
75%VerifiedHybrid Search combines Dense Retrieval with sparse retrieval (BM25).
75%VerifiedBM25是一种基于词频统计(TF-IDF改进版)的经典信息检索算法,属于稀疏检索方法
75%VerifiedBM25 remains the default ranking algorithm for mainstream search engines such as Elasticsearch and Lucene.
75%VerifiedHybrid Search combines dense vector semantic similarity with BM25 sparse keyword matching, with results from both paths re-ranked by a Re-Ranker model before being injected into the LLM context.
65%Verified重排序(Re-ranking)机制在初步检索后引入交叉编码器(Cross-Encoder)对候选文档重新打分,提升输入大模型的上下文质量
65%VerifiedHybrid retrieval, which fuses BM25 keyword scores with vector similarity scores through weighted combination (typically using the RRF reciprocal rank fusion algorithm), has become the mainstream paradigm for RAG systems.
65%VerifiedHybrid retrieval combines BM25 sparse retrieval with dense vector retrieval, merging ranking results via RRF or linear weighting.
65%VerifiedBM25 is more stable and reliable than vector retrieval in exact lexical matching scenarios (such as product model numbers, proper nouns, and contract clause numbers)
65%UnverifiedTraditional search systems mostly rely on statistical algorithms like TF-IDF or BM25 that rank results by term frequency and uniqueness in documents
90%UnverifiedContext Mode使用BM25算法检索相关内容,生成不超过2KB的Session Guide
85%UnverifiedHybrid retrieval combining vector similarity and keyword-based BM25 can significantly improve recall accuracy.
70%UnverifiedThe core mechanism of BM25 is based on three factors: term frequency (TF), inverse document frequency (IDF), and document length normalization, with parameter k1 typically set between 1.2 and 2.0 and b typically set at 0.75.
60%UnverifiedBM25 is a probabilistic retrieval model proposed by Robertson et al. in the 1990s and is the core ranking algorithm of search engines such as Elasticsearch.
60%UnverifiedBM25 is a bag-of-words model that focuses only on term frequency without understanding word order or semantics, but is more reliable for exact term matching and does not suffer from the semantic drift problem of vector retrieval.
60%UnverifiedHybrid Search fuses the results of dense vector retrieval and sparse BM25 retrieval.
60%