BM25

BM25 is a probabilistic information-retrieval formula that scores how well a document matches a query, balancing how often the query terms appear, how rare each term is, and how long the document is.

TermBM25
CategoryStatistics and Evidence
Also known asBest Matching 25
Where it appearsBM25 Drafts and BM25 math documentation

What it means in RankGear

BM25 is the relevance-scoring model behind RankGear’s BM25 Drafts, and the math it uses is spelled out in the accompanying BM25 documentation. Rather than rewarding a page simply for repeating a keyword, BM25 weighs three things at once: how frequently a query term shows up, how rare that term is across the wider set of documents, and how long the page is compared with its peers. A term that appears everywhere counts for little; a term that is distinctive counts for more; and extra length stops paying off once a document is already comfortably above average size. RankGear surfaces that combined view so you can see which terms are actually carrying a draft’s relevance rather than guessing from raw counts.

How to interpret it

Read a BM25 score as a comparative signal, not an absolute grade. The number only means something relative to the other documents in the same set — the same page can score high against a thin field and modestly against a strong one. Two of the formula’s behaviors are worth keeping in mind while you read it: term frequency saturates, so the tenth mention of a word adds far less than the second, and document length is normalized, so a longer page is not automatically favored for containing more words. When a term’s contribution looks low, check whether it is genuinely absent, buried among common words, or simply already saturated before you decide the draft needs more of it.

ComponentWhat it rewardsWhat tempers it
Term frequencyQuery terms appearing in the documentSaturation — repeats yield diminishing returns
Inverse document frequencyRare, distinctive termsCommon terms are discounted toward zero
Document lengthEnough coverage of the topicLength normalization — long pages are not rewarded just for size

Example

Suppose a BM25 Draft targets “bm25 saturation parameter.” The word “parameter” appears eleven times but is common across the reference set, so its inverse-document-frequency weight is small and each repeat past the first few barely moves the score. “Saturation,” a rarer term, appears twice and contributes far more per mention. Adding a twelfth “parameter” would do almost nothing, while a first clear use of “saturation” in the opening section changes the draft’s BM25 profile noticeably — which is exactly the kind of trade-off the score is there to make visible.

Important considerations

  • BM25 has tunable parameters — typically written as k1 (how fast term frequency saturates) and b (how strongly length is normalized). Scores are only comparable when the same settings and the same document collection sit behind them.
  • A BM25 score is a lexical, term-matching measure. It rewards the presence of query words and does not, on its own, judge meaning, intent, or answer quality.
  • Small SERP or reference samples make the rarity weights unstable, so scores can shift between runs without the underlying content changing.
  • BM25 is a retrieval-relevance indicator, not a Google ranking score. A higher BM25 value is an association with how competing pages read, not evidence that a value makes a page rank.

Related terms

Part of the RankGear glossary · how RankGear measures · the 870 factors.