BM25
BM25 is a keyword search ranking function that scores documents by how often query terms appear, adjusted for term rarity and document length.
BM25, or Okapi BM25, is a document ranking function grounded in the probabilistic model of information retrieval and named after the Okapi retrieval system. It scores a document by combining how often each query term appears in it, how rare that term is across the collection and how long the document is. A member of the TF-IDF family, it is the default ranking method in search engines such as Apache Lucene and Elasticsearch.
In AI applications such as retrieval-augmented generation, BM25 is often paired with embedding-based semantic search in hybrid search. Because it relies on exact word matches, it does not capture synonyms or paraphrases.
This entry is based on AIPOST articles and widely known facts. If something is wrong, please send us a correction request.