Back to AI Engineering Mind Map
中文·English
🤖 AI EngineeringID: bm25-sparse-search

BM25 Sparse Retrieval

BM25 词频拟合稀疏检索
🎯Core Definition
BM25 (Best Matching 25) is a classic probabilistic information retrieval (IR) sparse term-matching algorithm; its relevance score formula is Score(D,Q)=i=1nIDF(qi)f(qi,D)(k1+1)f(qi,D)+k1(1b+bDavgdl)\text{Score}(D, Q) = \sum_{i=1}^n \text{IDF}(q_i) \cdot \frac{f(q_i, D) \cdot (k_1 + 1)}{f(q_i, D) + k_1 \cdot (1 - b + b \cdot \frac{|D|}{\text{avgdl}})}, where k1k_1 (typically 1.2-2.0) caps term frequency saturation, bb (typically 0.75) tunes document length penalty, and IDF(qi)\text{IDF}(q_i) measures global term rarity.
💡Use Cases
Sparse lexical recall branch in Hybrid Search RAG pipelines, exact matching for SKUs, model codes, and inverted indexing in Elasticsearch/Tantivy.
Key Problems Solved
Dense embedding models suffer semantic over-generalization and hallucinated proximity on exact acronyms, error codes, part numbers, and rare domain terms; BM25 provides non-negotiable deterministic exact lexical matching guarantees.
🎯5 High-Frequency Exam Points
1
Derive the mathematical interpretation of parameters k1k_1 (TF saturation) and bb (length penalty) in the BM25 formula?
2
Why must k1k_1 and bb be tuned specifically when indexing ultra-short titles or extremely long legal text documents?
3
How does Chinese tokenization quality (Jieba, IK) fundamentally impact BM25 inverted index accuracy and recall?
4
Compare classical BM25 vs neural learned sparse retrieval (SPLADE, BGE-M3 Sparse) in lexical expansion capabilities?
5
How does the Block-Max WAND algorithm accelerate Top-K BM25 query execution via aggressive inverted list pruning?
Updated 2026-08-14
🎯
Test Your Knowledge: Practice Questions for "BM25 Sparse Retrieval"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice
Previous CardHyDE Hypothetical EmbeddingsNext CardDense Bi-Encoder Retrieval

🔗 More AI Engineering Knowledge Cards

Vector Distance Metrics & L2 NormalizationScalar Quantization (SQ8/SQ4)Product Quantization (PQ)ADC Asymmetric Distance Computation