the true formula of BM25 of Azure Cognitive Search

Liu, Meg 21 Reputation points
2022-01-21T09:52:28.637+00:00

I calculated the BM 25 similarity score with the formula referenced here https://lucene.apache.org/core/7_0_1/core/org/apache/lucene/search/similarities/BM25Similarity.html, but the results were not the same as the results returned by Azure Cognitive Search. Can anyone confirm the calculating details provided by Azure Cognitive Search?

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
859 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. SnehaAgrawal-MSFT 20,396 Reputation points
    2022-01-24T10:23:39.26+00:00

    Thanks for asking question! You may want to know that Azure Cognitive Search supports two similarity ranking algorithms.

    1. BM25Similarity
    2. ClassicSimilarity

    BM25 similarity adds two user customizable parameters to control the calculated relevance score. You can set BM25 parameters during index creation, or as an index update if the BM25 algorithm was specified during index creation.

    Also, Could you confirm if you are using older services created before July 15, 2020? As, If you are running a search service that was created prior to July 15, 2020, you can enable BM25 by setting a Similarity property on new indexes.

    The property is only exposed on new indexes, so if want BM25 on an existing index, you must drop and rebuild the index with a new Similarity property set to "Microsoft.Azure.Search.BM25Similarity".

    Foe more details check this Configure the similarity ranking algorithm in Azure Cognitive Search

    Let us know.

    0 comments No comments