feat: add nested path resolution for targetOutputKey#1294
Open
feat: add nested path resolution for targetOutputKey#1294
Conversation
e0436aa to
4c7c1e6
Compare
Support dot-notation (summary.status) and array-indexing (items[0].name) in targetOutputKey for all legacy evaluators and coded evaluators. Previously only flat key lookup was supported.
4c7c1e6 to
f46f762
Compare
andrei-rusu
reviewed
Feb 11, 2026
| Returns: | ||
| EvaluationResult: Numerical score with LLM justification as details | ||
| """ | ||
| from .._helpers.output_path import resolve_output_path |
Collaborator
There was a problem hiding this comment.
maybe move these in-function imports to the top of the file?
andrei-rusu
reviewed
Feb 11, 2026
| if self.evaluator_config.target_output_key != "*" and isinstance( | ||
| agent_execution.agent_output, dict | ||
| ): | ||
| from .._helpers.output_path import resolve_output_path |
andrei-rusu
reviewed
Feb 11, 2026
|
|
||
| def _get_expected_output(self, evaluation_criteria: T) -> Any: | ||
| """Load the expected output from the evaluation criteria.""" | ||
| from .._helpers.output_path import resolve_output_path |
andrei-rusu
approved these changes
Feb 11, 2026
Collaborator
andrei-rusu
left a comment
There was a problem hiding this comment.
Approved with a few comments
AAgnihotry
approved these changes
Feb 11, 2026
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.
Summary
resolve_output_pathutility supporting dot-notation (summary.status) and array-indexing (items[0].name) fortargetOutputKeyin evaluatorsLegacyExactMatchEvaluator,LegacyJsonSimilarityEvaluator,LegacyLlmAsAJudgeEvaluator, and codedOutputEvaluatormulti-output-agentsample with 8 evaluator configs covering nested paths, flat keys, array access, and wildcardtarget-output-key-evals) auto-discovered by CI integration testsTest plan
resolve_output_path(wildcard, flat, nested, arrays, mixed, errors, edge cases)