deepset-ai / haystack

:mag: AI orchestration framework to build customizable, production-ready LLM applications. Connect components (models, vector DBs, file converters) to pipelines or agents that can interact with your data. With advanced retrieval methods, it's best suited for building RAG, question answering, semantic search or conversational agent chatbots.
https://haystack.deepset.ai
Apache License 2.0
17.67k stars 1.91k forks source link

Expose relevance_score for ranker models through `pipeline.eval()` #8510

Open shalinshah1993 opened 1 week ago

shalinshah1993 commented 1 week ago

Is your feature request related to a problem? Please describe. There has been prior discussions about exposing model scores for re-ranker and i believe it was added. However, that only works with pipeline.run() API since it returns documents with score metadata. In practice, often, we run large scale evaluation and in that cases, it has a lot of wrapping around pipeline.run() (see here)

Describe the solution you'd like A very nice solution would be -> in the EvalutionResults df or csv file, there is additional column stored called score which comes from document.score

Describe alternatives you've considered Hacky way to do it right now, is to take Retriever.csv in eval run add a column with score (re-run ranker inference) then sort based on score and add it as df to EvaluationResults so we save Ranker.csv

This is using Haystack 1.x

anakin87 commented 1 week ago

Hello. Haystack 1.x is in maintenance mode and the idea is to fix bugs, but not to introduce new features. Have you considered migrating to 2.x? https://docs.haystack.deepset.ai/docs/migration

shalinshah1993 commented 1 week ago

is the above possible in 2.x?