Search code examples
azureazure-cognitive-search

How can I implement pairwise query-dependent learning-to-rank in Azure Search?


The problem:

I am setting up a product that utilizes Azure Search, and one of the requirements is that the results of a search conduct multi-stage learning-to-rank where the final stage involves a pairwise query-dependent machine-learned model such as RankNet.

Is there any existing support in Azure Search for this? If not, where in the Azure Search pipeline would you recommend I start?

What I have tried:

I had been hoping to find something similar to the ElasticSearch LTR Plugin but have not been able to.

The only option I can currently think of is to set-up a server which forwards the query from the front-end to Azure Search, re-ranks the search results my pairwise LTR methods, reconstructs the re-ranked search results, and sends those to the front-end.

However, I am very apprehensive about the inefficiency of this option and it would be unnecessary if there is an existing way for me to do this.

Language / Libraries

If relevant: I am coding primarily in C# and would be using CNTK for machine-learning.


Solution

  • At this time, your suggestion is the way to go. Azure Search does not currently offer a way to inject a custom ranker within the search pipeline. You would need to config your query to return a large amount of results and then re-rank yourself. Sorry we do not have a better answer than this right now. If you have time, it would be great if you could cast your vote for this here as we are hearing this more often lately.