text_similarity_reranker returns negative scores for some models #120201
Labels
>bug
:ml
Machine learning
:Search Relevance/Ranking
Scoring, rescoring, rank evaluation.
:SearchOrg/Relevance
Label for the Search (solution/org) Relevance team
Elasticsearch Version
8.16.1
Installed Plugins
No response
Java Version
bundled
OS Version
Reproducable on cloud
Problem Description
Certain supported rerank models, including
cross-encoder__ms-marco-minilm-l-6-v2
, return negative scores when used in conjunction with thetext_similarity_reranker
. Negative scores are not allowed in the query phase, so we need to handle this better.One potential solution is linearly shifting or otherwise normalizing the returned score values, so they're always within certain parameters.
Steps to Reproduce
The returned search result is:
The score of the document is < 0.
Logs (if relevant)
No response
The text was updated successfully, but these errors were encountered: