BM25 › Key Parameters

Michael BrenndoerferUpdated March 21, 20262 min read
Language AI HandbookAll chapters
Part 2 of 67Classical Text Representations
Chapter 14BM25 › Key Parameters
Reading section 13 of 14 · Key Parameters · 2 minSection 13 of 14 · 2 min

Book contents

Section 13 of 14 · 2 min read

BM25 › Key ParametersOne section · Sections in this chapter13 / 14 ↓
Reading tools Definitions & inline links

Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.

Article links

Make inline references clickable

Understanding BM25's parameters is essential for tuning retrieval performance:

BM25 parameters with typical values and tuning effects.
ParameterTypical ValueRangeEffect
k11.20.0 - 3.0Controls term frequency saturation. Lower values cause faster saturation. Higher values make scoring more linear with term frequency.
b0.750.0 - 1.0Controls length normalization strength. At 0, document length is ignored. At 1, term frequencies are fully normalized by document length.
delta (BM25L/BM25+)0.5 - 1.00.0 - 2.0Additive constant ensuring minimum contribution from term matches. Higher values boost scores for documents with query terms.

Tuning guidance:

  • Start with defaults (k1=1.2k_1 = 1.2, b=0.75b = 0.75): These work well for most text collections and are the defaults in Elasticsearch and Lucene.
  • Increase k1k_1 (toward 2.0) when term frequency is highly informative, such as in longer documents where repeated mentions indicate relevance.
  • Decrease k1k_1 (toward 0.5) for collections where a single mention is as informative as multiple mentions, such as short documents or when keyword stuffing is a concern.
  • Decrease bb (toward 0.25) when document length variation is meaningful, for example, when longer documents contain more relevant information rather than just more filler.
  • Increase bb (toward 1.0) when longer documents tend to match queries spuriously due to containing more vocabulary.
  • Use BM25+ or BM25L when your collection has highly variable document lengths and you observe short, relevant documents being ranked too low.