-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: failsafe for non-valid json and failed LLM calls #7723
Conversation
Pull Request Test Coverage Report for Build 9210542884Details
💛 - Coveralls |
releasenotes/notes/add-failsafe-for-LLM-based-evaluators-34cdc183ab545315.yaml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good to merge after @julian-risch's review.
Co-authored-by: Madeesh Kannan <[email protected]>
Co-authored-by: Madeesh Kannan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite good to me already. Two small notes and then I'll approve. Please update the docs pages once we merge this PR.
https://docs.haystack.deepset.ai/docs/llmevaluator
https://docs.haystack.deepset.ai/docs/faithfulnessevaluator
https://docs.haystack.deepset.ai/docs/contextrelevanceevaluator
Related Issues
Proposed Changes:
The LLM-based evaluators can fail due to:
This PR adds safeguards to LLM-based evaluators:
Faithfulness
orContextRelevance
) is initialised withraise_on_failure=False
, and if a call to an LLM fails or an LLM outputs an invalid JSON, it returnsnp.nan
and continues the evaluation.