-
-
Notifications
You must be signed in to change notification settings - Fork 377
[GSK-4033] Fix correctness aggregation error #2090
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
[GSK-4033] Fix correctness aggregation error #2090
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.
LGTM, however I'm thinking it would be better to add those check inside the parse_json_output since it has a builtin feature to ask the llm to correct the json output
|
|
||
| if "correctness" in json_output and not isinstance(json_output["correctness"], bool): | ||
| raise LLMGenerationError( | ||
| f"Error in correctness evaluation: {json_output['correctness']}. Please make sure the agent answer is correctly formatted." |
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.
Switching to repr is better so we can differentiate "True" from True, also
| f"Error in correctness evaluation: {json_output['correctness']}. Please make sure the agent answer is correctly formatted." | |
| f"Error in correctness evaluation: {repr(json_output['correctness'])}. Please make sure the agent answer is correctly formatted. Correctness value should be of boolean type." |
|



Description
Related Issue
Type of Change
Checklist
CODE_OF_CONDUCT.mddocument.CONTRIBUTING.mdguide.pdm.lockrunningpdm update-lock(only applicable whenpyproject.tomlhas beenmodified)