BM25 parameters #1693
-
I'm wondering how to set the b and k_1 parameters for BM25 in an ElasticSearchRetriever. Any suggestions? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @mgreenbe , I don't know the exact steps yet to making this happen but from a first quick search on the topic, I have some ideas. In Haystack, when you initialize an In this thread, the top answer provides a settings dictionary to define specific b and k_1 values. I think these could probably be inserted into a custom mapping. It also seems possible to make a PUT request to the ES instance directly. Hope these pointers help. Please let us know how you get on with this! |
Beta Was this translation helpful? Give feedback.
Hi @mgreenbe , I don't know the exact steps yet to making this happen but from a first quick search on the topic, I have some ideas.
In Haystack, when you initialize an
ElasticsearchDocumentStore
, you use something called a mapping to define how the ES index works (you can see the default mapping here). You also have the option however to provide your own custom mapping when initializing theElasticsearchDocumentStore
via thecustom_mapping
argument.In this thread, the top answer provides a settings dictionary to define specific b and k_1 values. I think these could probably be inserted into a custom mapping. It also seems possible to make a PUT request to the ES instance directly.
Hope …