-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Agentic Evaluators]: Accept input string as is #45159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates several agentic evaluators to accept plain string inputs (for query, response, tool_calls, and/or tool_definitions) and forward them to the LLM without attempting structured parsing/reformatting/cross-validation intended for message-list inputs.
Changes:
- Allow
tool_calls/tool_definitions/responseto be passed through as strings across multiple tool-related evaluators. - Skip tool-definition filtering and conversation/response reformatting when inputs are already strings (notably in Tool Output Utilization).
- Add a groundedness short-circuit for string
responseinputs in agent-response mode.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_selection/_tool_selection.py | Accept string tool calls/definitions; skip extraction/validation steps when strings are provided. |
| sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_output_utilization/_tool_output_utilization.py | Conditionally skip filtering/reformatting when query/response/tool_definitions are strings. |
| sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_input_accuracy/_tool_input_accuracy.py | Allow response/tool calls to pass through as strings and bypass structured cross-validation. |
| sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_call_success/_tool_call_success.py | Avoid tool-call/result reformatting when response is a string; pass string tool definitions through. |
| sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_call_accuracy/_tool_call_accuracy.py | Allow string tool calls/definitions; bypass structured cross-validation. |
| sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_groundedness/_groundedness.py | Add early return for string response in agent-response mode to avoid context extraction/parsing. |
Comments suppressed due to low confidence (1)
sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_selection/_tool_selection.py:180
tool_namescan now be astr(whentool_callsis a string), but the name and the inline comment imply it’s a list of tool names. This is easy to misread later; consider renaming the variable / clarifying the comment to reflect that it may be a raw string forwarded to the LLM.
# Extract only tool names from tool calls, removing parameters and results (skip for strings)
tool_names = tool_calls if isinstance(tool_calls, str) else self._extract_tool_names_from_calls(tool_calls)
return {
"query": query,
"tool_calls": tool_names, # Only tool names, no parameters
"tool_definitions": needed_tool_definitions,
Description
Updates agentic evaluators to accept string inputs directly without requiring structured (list/dict) format. When response, query, tool_calls, or tool_definitions are passed as plain strings, evaluators now forward them to the LLM as-is, skipping parsing, reformatting, and cross-validation steps that only apply to structured conversation objects.
Changed evaluators:
Groundedness, Tool Call Accuracy, Tool Call Success, Tool Input Accuracy, Tool Output Utilization, and Tool Selection.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines