Skip to content

    BM25 Ranking

    Data integration & searchBM25Okapi BM25Best Matching 25
    Editorially reviewed on: 2 sources
    Your reading view

    The short answer · 21 words

    In short

    Classic ranking function in Information Retrieval, which evaluates documents based on search terms, term frequency, document length and rarity of terms.

    Flow-alerta.cab (2026): BM25 Ranking. https://flow-alerta.cab/en/glossar/bm25-ranking. Editorially reviewed on: 09 October 2026.

    How much detail would you like?

    Practical

    Very relevant for full text search, hybrid search and RAG. BM25 is a strong baseline and complements vector search well if exact terms, numbers or technical words are important.

    Example scenario: An internal search combines BM25 for exact product codes with semantic vector search for similar formulations.

    Use for document, knowledge and product search, especially when exact terms are relevant; combine them with embeddings and reranking if necessary.

    At a glance

    Core
    BM25 calculates one relevance score per document for a search query. Frequent search terms in the document increase the score with decreasing added value; rare terms are weighted more strongly and the document length is normalized. BM25 works lexically and does not understand semantic similarity like an embedding model.
    Use
    Very relevant for full text search, hybrid search and RAG. BM25 is a strong baseline and complements vector search well if exact terms, numbers or technical words are important.
    Example
    Example scenario: An internal search combines BM25 for exact product codes with semantic vector search for similar formulations.
    Limits
    Calling BM25 semantic search; adopting parameters unchecked; ignoring tokenization and language processing; combining incompatible scores without a suitable fusion strategy in hybrid search.

    In context

    Questions about this term

    Is BM25 semantic search?

    No, primarily lexical.

    Is BM25 obsolete?

    No, it remains a strong search baseline.

    Can BM25 be combined with vector search?

    Yes.

    All details and background

    BM25 calculates one relevance score per document for a search query. Frequent search terms in the document increase the score with decreasing added value; rare terms are weighted more strongly and the document length is normalized. BM25 works lexically and does not understand semantic similarity like an embedding model.

    ELI5 – Explained simply

    A document gets points if the searched words appear in it – especially if the words are rare and characteristic of the document.

    Why it matters in practice

    Very relevant for full text search, hybrid search and RAG. BM25 is a strong baseline and complements vector search well if exact terms, numbers or technical words are important.

    Example

    Example scenario: An internal search combines BM25 for exact product codes with semantic vector search for similar formulations.

    Pitfalls and limits

    • Calling BM25 semantic search; adopting parameters unchecked; ignoring tokenization and language processing; combining incompatible scores without a suitable fusion strategy in hybrid search.

    Origin & history

    BM25 belongs to probabilistic information retrieval. Robertson and Zaragoza described BM25 and extensions in 2009 as part of an overview of the probabilistic relevance model.

    Use in mid-sized companies

    • Use for document, knowledge and product search, especially when exact terms are relevant; combine them with embeddings and reranking if necessary.

    Sources

    • doi.orgRobertson & Zaragoza, The Probabilistic Relevance Framework: BM25 and Beyond (2009)
    • www.elastic.coElastic, BM25 similarity

    Quellenprüfung: 09.10.2026. Definition und dokumentierte Einordnung abgeglichen; Beispiele beschreiben mögliche Anwendungen.

    Editorially reviewed on:

    Next step

    Put knowledge into practice