Add properties in Evaluation Result - Custom Evaluator extra fields. #46077
Open
Add properties in Evaluation Result - Custom Evaluator extra fields. #46077
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for passing through custom evaluator “extra fields” via a properties bag into the AOAI-style evaluation result objects produced by the evaluation results converter.
Changes:
- Update
_extract_metric_valuesto detect anoutputs.<criteria>.propertiesdict and propagate it onto per-metric extracted values. - Update
_create_result_objectto includepropertiesin the final AOAI result payload when present. - Add a unit test asserting
propertiesis preserved and not flattened into the top-level result object.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate.py | Propagates a per-criteria properties dict into per-metric result objects during AOAI conversion. |
| sdk/evaluation/azure-ai-evaluation/tests/unittests/test_evaluate.py | Adds coverage validating properties passthrough behavior for a custom evaluator result row. |
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate.py
Show resolved
Hide resolved
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluate/_evaluate.py
Show resolved
Hide resolved
…esults Pass through evaluator properties dict in AOAI evaluation results. When an evaluator returns a properties dict, it is included alongside score, label, reason, threshold, and passed in the result object. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2fd8ce2 to
c8f5958
Compare
Update _extract_metric_values and _create_result_object docstrings to document the new properties field and its expected dict type. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.