Add ignore_args support for tool trajectory evaluation#6079
Add ignore_args support for tool trajectory evaluation#6079allenjoshua16 wants to merge 4 commits into
Conversation
|
Hi @allenjoshua16 , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Can you please fix the failing mypy-diff tests before we can proceed with the review. |
|
Thanks for the feedback. I've addressed the mypy-diff failure and pushed an additional commit to the PR. The issue was caused by mypy reporting a pytest tests/unittests/evaluation/test_trajectory_evaluator.py -q
# 35 passedPlease let me know if there are any other issues I should address. |
|
Hi maintainers, Just following up on this PR. I addressed the previously reported mypy-diff issue and pushed the requested fix. The PR checks now appear to be passing on my side. Please let me know if there is any additional clarification or change needed from me. Whenever someone has time, I'd appreciate a review. Thanks for your time and for maintaining the project. |
Link to Issue or Description of Change
1. Link to an existing issue (if applicable):
2. Or, if no issue exists, describe the change:
Problem:
Tool trajectory evaluation currently compares both tool names and argument values when matching expected and actual tool calls.
This can cause valid evaluations to fail when tool arguments contain dynamic or non-deterministic values such as timestamps, generated queries, or other runtime-generated content.
Solution:
Added an
ignore_argsoption toToolTrajectoryCriterion.When enabled, tool trajectory matching compares only tool names and ignores argument values. This behavior is supported across all existing match modes:
EXACTIN_ORDERANY_ORDERUpdated
TrajectoryEvaluatorto pass this configuration into the matching logic while preserving the existing behavior by default (ignore_args=False).Added unit tests covering:
ignore_argsconfiguration loadingTesting Plan
Unit Tests:
Tested with: