feat(evaluation): add tool parameter matching - #6726
Open
gioboa wants to merge 1 commit into
Open
Conversation
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.
Please ensure you have read the contribution guide before creating a pull request.
Link to Issue or Description of Change
1. Link to an existing issue:
Problem:
The existing trajectory metric scores a tool call as entirely correct or incorrect. It cannot show partial correctness when only some expected tool arguments match.
Solution:
Add an exact
tool_parameter_matchmetric that averages matches across expected argument keys. Register the metric and cover matching, alignment, empty-input, and partial-score cases with unit tests. This is intentionally a small MVP;advanced matching strategies proposed in #5643 are outside this PR.Testing Plan
Unit Tests:
Results:
843 passed40 passedManual End-to-End (E2E) Tests:
Compared an expected
search(city="Rome", rooms=1)call with an actualsearch(city="Rome", rooms=2)call.Before:
After:
Checklist
Additional context
This PR implements exact argument matching only. Match modes, configurable per-argument strategies, and numeric tolerances can be added separately after maintainer feedback. User-facing documentation will be proposed in the
adk-docsrepository once the API is approved.