-
Notifications
You must be signed in to change notification settings - Fork 181
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 groundedness with no supporting evidence #1193
fix groundedness with no supporting evidence #1193
Conversation
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 good to me! Reviewed everything up to 1c9a729 in 33 seconds
More details
- Looked at
15
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. trulens_eval/trulens_eval/feedback/provider/base.py:1225
- Draft comment:
The change effectively handles cases where no 'reason' is provided, preventing potential KeyErrors and ensuring the feedback system remains robust. This is a necessary fix for the groundedness feedback functionality. - Reason this comment was not posted:
Confidence changes required:0%
The PR aims to address a bug where the feedback system breaks if no supporting evidence is provided for a statement's groundedness. The change checks if the 'reason' key exists in the 'reason' dictionary before attempting to access it, which prevents a KeyError and allows the feedback system to handle cases where no reason is provided. This is a crucial fix for robustness in feedback generation.
Workflow ID: wflow_x9g9iRRlgxs4Fudq
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
i wonder if when running in deferred mode, this change would prevent trulens from seeing this as a failed evaluation and then would not re-run it. |
It might be as side effect. Anyway all other feedback providers don't fail if the reason can't be found so I think it's better to align to the others' behaviour |
* fix groundedness with no supporting evidence * use reason not generated --------- Co-authored-by: Josh Reini <josh.reini@snowflake.com>
* fix groundedness with no supporting evidence * use reason not generated --------- Co-authored-by: Josh Reini <josh.reini@snowflake.com>
* fix groundedness with no supporting evidence * use reason not generated --------- Co-authored-by: Josh Reini <josh.reini@snowflake.com>
Items to add to release announcement:
Currently if you use feedback
groundedness_measure_with_cot_reasons
and one of the hypothesis is returning no supporting evidence, the feedback is completely broken and not even the score is visible. This is due to the fact this feedback implies to always have a "reason" behind the score.Summary:
This PR fixes an issue in the
groundedness_measure_with_cot_reasons
feedback function to handle cases with no supporting evidence without breaking.Key points:
evaluate_hypothesis
function inProvider
class to handle missing 'reason' key gracefully.Generated with ❤️ by ellipsis.dev