The Search Evolution Ladder · Part 3 · Infographic
Rank by how well the words fit
Text version
- Rare words count more. In a catalog of 1,000 listings, "sofa" appears in 50 and "blue" in 200. "Sofa" gets an IDF of 2.99, "blue" 1.61, so a match on "sofa" counts almost twice as much.
- More mentions, less each time. In a 20-word listing, "sofa" once gives 4.44, twice 5.30 and ten times 6.27. With
k1 = 1.2, the reward for repetition flattens out. - Long listings get less per mention. BM25 compares each listing's length with the catalog average. With
b = 0.75, one mention in a 20-word listing counts more than one mention in an 80-word listing. - Put text fit between 0 and 1. Divide BM25 by the highest score the query can give, the sum of
idf × (k1 + 1). The blue velvet sofa gets 0.76, the oak coffee table 0.50. The order within the query stays the same. - Freshness halves every week.
score = textFit + 0.1 × freshness. The sofa from ten days ago scores 0.80 and ranks above the coffee table from today at 0.60.
A new listing wins only when its text fits about as well as an older one.