Python: include tool definitions for Foundry agent evals#5974
Merged
alliscode merged 1 commit intoMay 21, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds conditional inclusion of tool_definitions in Foundry eval criteria data mappings, including support for agent evaluators that accept tool definitions, and updates tests accordingly.
Changes:
- Introduce
_TOOL_DEFINITION_EVALUATORSto broaden which evaluators can receivetool_definitionsmappings. - Add
include_tool_definitionsflag to_build_testing_criteriaand wire it from dataset evaluation based on tool presence. - Expand tests to assert
tool_definitionsmapping is included when enabled for tool + agent evaluators.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| python/packages/foundry/agent_framework_foundry/_foundry_evals.py | Adds evaluator set + gating flag so tool_definitions is only mapped when items include tools. |
| python/packages/foundry/tests/test_foundry_evals.py | Updates criteria-builder tests to pass include_tool_definitions=True and adds an agent-evaluator assertion. |
Contributor
Python Test Coverage Report •
Python Unit Test Overview
|
||||||||||||||||||||||||||||||
alliscode
approved these changes
May 20, 2026
eavanvalkenburg
approved these changes
May 21, 2026
This was referenced May 22, 2026
Open
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
tool_definitionsin data mappingstool_definitionsonly when the uploaded eval items actually contain tool definitionstask_adherence,task_completion,intent_resolution, andtask_navigation_efficiencyTo verify
uv run pytest packages/foundry/tests/test_foundry_evals.py -q -p no:cacheprovideruv run ruff check packages/foundry/agent_framework_foundry/_foundry_evals.py packages/foundry/tests/test_foundry_evals.pyuv run mypy --config-file packages/foundry/pyproject.toml packages/foundry/agent_framework_foundry/_foundry_evals.pygit diff --checkFixes #5918