BM25-RANKING
Saturated probabilistic TF/IDF scoring algo.
Definition
BM25 formula: score(D,Q) = sum (IDF(qi) * f(qi,D) * (k1+1) / (f(qi,D) + k1*(1 - b + b * |D|/avgdl))). Parameters k1 (saturation, default 1.2), b (length normalisation, default 0.75). Advantages vs naive TF-IDF: saturation prevents an over-frequent term from dominating, length normalisation avoids short/long document bias. Variants: BM25F (field weights), BM25+ (underflow fix).
Origin
BM25 published 1994 by Stephen Robertson and Karen Sparck Jones at City University London (Okapi project).
Example in context
Elasticsearch 8.x uses BM25 by default ; configurable via similarity.k1 and similarity.b in index settings to tune per use case.
Related terms
- Lucene — BM25 implementation.