AI engineering · 07 of 42
Rank documents by keyword relevance
Scroll
Rank documents by keyword relevance
BM25 scores documents by which of your query's words they contain, how often, and how rare those words are across the whole collection. Rare matching terms count for much more than common ones.
It also discounts long documents, so a page cannot rank highly just by being big enough to contain everything.
It is fast, cheap, needs no training, and you can always explain exactly why something ranked. Its weakness is the obvious one: it matches words, not meaning, so a page describing your exact problem in different vocabulary scores zero. That is precisely the gap the next concept exists to close.
Retrieval