Learn Before
Formula

BM25 Document Scoring Formula

The BM25 formula is a document scoring method in information retrieval that improves upon TF-IDF. It introduces parameters to limit the upper boundary of the term frequency (TF) value and uses average document length to measure influence. The score for a query qq and document dd is defined as:

tqNdfttft,dk(1b+bddavg)+tft,d\sum_{t \in q} \frac{N}{df_t} \cdot \frac{tf_{t,d}}{k(1-b+ b \frac{|d|}{|d_{avg}|}) + tf_{t,d}}

0

1

Updated 2026-06-15

Tags

Data Science