BM25

BM25 is a keyword search ranking function that scores documents by how often query terms appear, adjusted for term rarity and document length.

1 article
Last mentioned

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.

Articles covering this entry

Aspect Keyword search (BM25) Semantic search (embeddings)


© 2026 AIPOST. All rights reserved.

AIPOST is an AI publication covering practical AI, AI security, performance, startups, health, ethics and industry news. No account is needed, and our privacy policy explains how we handle personal information.