BM25
What is BM25?
In one sentence: BM25 is a classic keyword-based ranking formula that scores documents by how often and how importantly query words appear.
It gives more weight to rare words and does not over-reward documents that repeat a word many times. It has powered search engines for decades and is still very strong.
What does BM25 look like?
For "purple elephant," BM25 ranks pages that mention the rare word "elephant" higher than ones that just say "purple."
Why does BM25 matter?
BM25 is a reliable baseline and a key part of hybrid search.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/bm25/">BM25, explained simply</a> (The AI Math Dictionary)