elastic / elasticsearch

Free and Open Source, Distributed, RESTful Search Engine
https://www.elastic.co/products/elasticsearch
Other
1.42k stars 24.87k forks source link

Add option to return non-reranked results if an error occurs during reranking #116796

Open pmpailis opened 1 week ago

pmpailis commented 1 week ago

Currently, when using the text_similarity_reranker retriever, if something goes wrong during the rerank process, whether this is a direct error from the reranking service or issues due to changes in response etc, we propagate this exception all the way up and return a 4xx response to the user.

We could introduce a new parameter as part of the text_similarity_reranker retriever (defaults to false) which would allow "lenient reranking", i.e. give the option to return the results non reranked if something goes wrong during the rerank process.

We need to also take into account logging (as we don't want to pollute our logs with thousands of identical error logs) and how to actually notify the user that the results are not actually reranked.

elasticsearchmachine commented 1 week ago

Pinging @elastic/es-search-relevance (Team:Search Relevance)

Danouchka commented 1 week ago

Yes it could be also that your quota on CSP provider may be exhausted. so it's all the more important to return results even if not reranked...because we cannot imagine a RAG sending back errors to customers all the time

kunal5042 commented 1 week ago

Hi, I would like to contribute to this, can it be assigned to me?

I've started researching on it, will update in sometime. As per IST time, will spend entire day tomorrow and update by evening on the progress. Please allow me some time as I'm new to this code base.