Skip to content
AI360Xpert
Glossary
Definition

BM25

A highly effective bag-of-words retrieval function that ranks a set of documents based on the exact term frequency and inverse document frequency of a query.

Think of It Like This

Like a librarian who scores a book higher if it mentions your search keyword often, but lowers the score if that keyword is something generic like 'the'.

Unlike primitive keyword matching, BM25 prevents commonly used words from dominating the search score and caps the reward for seeing the same word repeatedly in a single document. Despite the rise of dense neural embeddings, BM25 remains a formidable and computationally cheap baseline for modern information retrieval systems.