Relevance and BM25medium3-5 years
Two documents both mention `kafka`: one five times, one fifty times. Under BM25's default `k1 = 1.2`, would the fifty-mention document score roughly ten times higher on that term? Walk through why or why not.
No — BM25's term-frequency component saturates, so it does not scale linearly with raw mention count the way naive tf × idf would. In the formula f(t,D)·(k1+1) / (f(t,D) + k1·(length factor)), both the numerator and part of the denominator grow with f(t,D), so the ratio approaches a ceiling rather than climbing without bound. Going from five to fifty mentions moves the score noticeably less than tenfold — the lesson's own framing is that "the fiftieth mention adds almost nothing" once term frequency is already large relative to k1. This is deliberately why keyword-stuffing a document with a term stopped being an effective way to win rankings.
PreviousA search team wants to try 'better normalization' and proposes swapping the English stemmer for a lemmatizer, expecting mostly the same results with cleaner output. What's actually different about what each one does to a word, and what would change?Next Work through the lesson's own comparison: document A is 50 words (corpus average 200) and mentions `kafka` twice; document B is 800 words and mentions `kafka` six times. With `k1 = 1.2`, `b = 0.75`, which scores higher on that term, and why does the shorter document win despite fewer mentions?