1
votes

I have a vector representation of each document as a field. Is it possible to run my custom scoring function against all these fields?

The scoring function takes a search query and document's vector and returns a number.

2

2 Answers

1
votes

Can you expand on the function you are trying to create? How are you trying to get a number out of a document vector and the query? Is the document vector an embedding describing the document? And do you wish to compare it to another vector of the same format describing the search query itself? If that's what you are trying to do, as of now, we have no built in support to score dense vectors. Your best bet would be to use supported/traditional method of scoring to return a large amount of documents from Azure Search, and then create a second ranker residing on your own server that will re-rank the results using your own custom algorithm (which could use dense vectors).

0
votes

From what I have learnt so far, cognitive search does not support custom scoring functions. You can translate your vector representation into an integer field and then apply the inbuilt magnitude function. https://docs.microsoft.com/en-us/azure/search/index-add-scoring-profiles#functions