ModelRefs / BM25 — AI Glossary
BM25 — AI Glossary
A classical lexical ranking function based on term frequency, inverse document frequency, and document length normalization. Tunable via k1 and b parameters.
Overview
BM25 is the standard keyword retrieval algorithm used by Elasticsearch, OpenSearch, and Lucene. It remains a strong baseline and is the lexical half of every modern hybrid-search stack. Tunable via k1 and b parameters.
Reference details
| Topic | rag |
|---|---|
| Last reviewed | 2026-06-24 |
Related terms
Commonly confused with
A specific ranking function; sparse retrieval is the family it belongs to. It scores on term overlap weighted by rarity and document length, so it matches exact strings — product codes, error messages, surnames — that embeddings blur together. It cannot match a paraphrase, which is the complementary weakness that makes hybrid search worth the extra index.
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to BM25 — AI Glossary.
Frequently asked questions
What is BM25?
A classical lexical ranking function based on term frequency, inverse document frequency, and document length normalization.
What concepts are related to BM25?
Closely related concepts include hybrid search, semantic search.