Okapi BM25
In information retrieval, Okapi BM25 (BM is an abbreviation of best matching) is a ranking function used by search engines to estimate the relevance of documents to a given search query.[src] It is based on the probabilistic retrieval framework developed in the 1970s and 1980s by Stephen E.[src] Robertson, Karen Spärck Jones, and others.[src] The name of the actual ranking function is BM25.[src] The fuller name, Okapi BM25, includes the name of the first system to use it, which was the Okapi information retrieval system, implemented at London's City University in the 1980s and 1990s.[src] BM25 and its newer variants, e.g.[src] BM25F (a version of BM25 that can take document structure and anchor text into account), represent TF-IDF-like retrieval functions used in document retrieval.[src]
In information retrieval, Okapi BM25 (BM is an abbreviation of best matching) is a ranking function used by search engines to estimate the relevance of documents to a given search query.[src] It is based on the probabilistic retrieval framework developed in the 1970s and 1980s by Stephen E.[src] Robertson, Karen Spärck Jones, and others.[src] The name of the actual ranking function is BM25.[src] The fuller name, Okapi BM25, includes the name of the first system to use it, which was the Okapi information retrieval system, implemented at London's City University in the 1980s and 1990s.[src] BM25 and its newer variants, e.g.[src] BM25F (a version of BM25 that can take document structure and anchor text into account), represent TF-IDF-like retrieval functions used in document retrieval.[src] \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 \left(1 - b + b \cdot \frac {\text{avgdl}}\right)} where f(q_i, D) is the number of times that the keyword q_i occurs in the document , |D| is the length of the document in words, and is the average document length in the text collection from which documents are drawn.[src] k_1 and are free parameters, usually chosen, in absence of an advanced optimization, as k_1 \in [1.2,2.0] and b = 0.75 .[src] \text{IDF}(q_i) is the IDF (inverse document frequency) weight of the query term q_i .[src] It is usually computed as: \text{IDF}(q_i) = \ln \left(\frac{N - n(q_i) + 0.5}{n(q_i) + 0.5}+1\right) where is the total number of documents in the collection, and n(q_i) is the number of documents containing q_i .[src] There are several interpretations for IDF and slight variations on its formula.[src] In the original BM25 derivation, the IDF component is derived from the Binary Independence Model.[src] -\log \frac{n(q)}{N} = \log \frac{N}{n(q)}.[src] Now suppose we have two query terms q_1 and q_2 .[src] If the two terms occur in documents entirely independently of each other, then the probability of seeing both q_1 and q_2 in a randomly picked document D is: \frac{n(q_1)}{N} \cdot \frac{n(q_2)}{N}, and the information content of such an event is: \sum_{i=1}^{2} \log \frac{N}{n(q_i)}.[src] With a small variation, this is exactly what is expressed by the IDF component of BM25.[src] At the extreme values of the coefficient BM25 turns into ranking functions known as BM11 (for b=1 ) and BM15 (for b=0 ).[src] BM25F (or the BM25 model with Extension to Multiple Weighted Fields ) is a modification of BM25 in which the document is considered to be composed from several fields (such as headlines, main text, anchor text) with possibly different degrees of importance, term relevance saturation and length normalization.[src] BM25F defines each type of field as a stream, applying a per-stream weighting to scale each stream against the calculated score.[src] BM25+ is an extension of BM25.[src] BM25+ was developed to address one deficiency of the standard BM25 in which the component of term frequency normalization by document length is not properly lower-bounded; as a result of this deficiency, long documents which do match the query term can often be scored unfairly by BM25 as having a similar relevancy to shorter documents that do not contain the query term at all.[src] The scoring formula of BM25+ only has one additional free parameter \delta (the default value is ) as compared with BM25: \text{score}(D,Q) = \sum_{i=1}^{n} \text{IDF}(q_i) \cdot \left[ \frac{f(q_i, D) \cdot (k_1 + 1)}{f(q_i, D) + k_1 \cdot \left(1 - b + b \cdot \frac {\text{avgdl}}\right)} + \delta \right][src]
30 sentences · 30 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Okapi BM25." encyclopegia.org, 2026, https://encyclopegia.org/wiki/okapi-bm25. Accessed 30 November 2026.
Chicago
"Okapi BM25." encyclopegia.org. Accessed November 30, 2026. https://encyclopegia.org/wiki/okapi-bm25.
APA
encyclopegia.org. (2026). Okapi BM25. Retrieved November 30, 2026, from https://encyclopegia.org/wiki/okapi-bm25
Accessed November 30, 2026 · CC BY-SA 4.0 · citation page · JSON