-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Groundedness] Check for right schema #43927
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
base: main
Are you sure you want to change the base?
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.
Pull Request Overview
This pull request refactors the GroundednessEvaluator class to improve schema validation for context extraction. The changes include code organization improvements, the introduction of a new helper method for context validation, and enhanced error handling for edge cases.
Key changes:
- Extracted context validation logic into a dedicated
_validate_context()method to improve code reusability - Added
_is_single_entry()method to determine if inputs represent single entries - Removed redundant instance variable assignments in favor of using parent class properties directly
...valuation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_groundedness/_groundedness.py
Show resolved
Hide resolved
...valuation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_groundedness/_groundedness.py
Outdated
Show resolved
Hide resolved
...valuation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_groundedness/_groundedness.py
Show resolved
Hide resolved
ashaabansoliman
left a comment
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.
Approving with a known issue only in case of concurrency as explained in the comment, which is kinda corner case.
Another PR should follow to fix the concurrency issue
ashaabansoliman
left a comment
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.
Approving with a known issue only in case of concurrency as explained in the comment, which is kinda corner case.
Another PR should follow to fix the concurrency issue
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines