You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_common/_base_prompty_eval.py
+23Lines changed: 23 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -438,3 +438,26 @@ def _not_applicable_result(
438
438
result[f"{self._result_key}_details"] = {}
439
439
440
440
returnresult
441
+
442
+
# TODO: After all evaluators output are updated, we can remove the _not_applicable_result method and replace calls to it with _return_not_applicable_result, which returns a "skipped" status instead of "pass" to avoid confusion.
Copy file name to clipboardExpand all lines: sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_call_accuracy/_tool_call_accuracy.py
+23-13Lines changed: 23 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -86,7 +86,7 @@ class ToolCallAccuracyEvaluator(PromptyEvaluatorBase[Union[str, float]]):
86
86
_TOOL_DEFINITIONS_MISSING_MESSAGE="Tool definitions for all tool calls must be provided."
87
87
_INVALID_SCORE_MESSAGE="Tool call accuracy score must be between 1 and 5."
Copy file name to clipboardExpand all lines: sdk/evaluation/azure-ai-evaluation/azure/ai/evaluation/_evaluators/_tool_call_accuracy/tool_call_accuracy.prompty
+17-4Lines changed: 17 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -54,6 +54,16 @@ Evaluate based on these factors:
54
54
55
55
**Tool Assessment**: Focus solely on appropriate use of available tools, not on capabilities beyond what tools can provide.
56
56
57
+
## Status: Skipped
58
+
Before performing any evaluation, check for the following conditions. If ANY are true, return `status: "skipped"` immediately without scoring:
59
+
1. **No tool calls to evaluate**: The TOOL CALLS TO BE EVALUATED section is empty (tool calls appearing only in the CONVERSATION section do not count).
60
+
2. **Missing tool definitions**: Any tool call in TOOL CALLS TO BE EVALUATED references a tool that is not present in the TOOL DEFINITIONS.
## Please provide your evaluation for the assistant RESPONSE in relation to the user QUERY and tool definitions based on the Definitions and examples above.
142
-
Your output should consist only of a JSON object, as provided in the examples, that has the following keys:
143
-
- chain_of_thought: a string that explains your thought process to decide on the tool call accuracy level, based on the Chain of Thought structure. Start this string with 'Let's think step by step:'.
144
-
- tool_calls_success_level: a integer value between 1 and 5 that represents the level of tool call success, based on the level definitions mentioned before. You need to be very precise when deciding on this level. Ensure you are correctly following the rating system based on the description of each level.
145
-
- details: a dictionary that contains the following keys:
152
+
Your output should consist only of a JSON object that has the following keys:
153
+
- score: an integer value between 1 and 5 that represents the level of tool call success, based on the level definitions mentioned before. You need to be very precise when deciding on this level. Ensure you are correctly following the rating system based on the description of each level. Set to null when status is "skipped".
154
+
- status: a string indicating the evaluation status. Must be one of:
155
+
- "completed": tool calls were present, tool definitions were available, and evaluation was performed.
156
+
- "skipped": evaluation was not performed because there were no tool calls to evaluate, or tool definitions were missing for the tool calls. When skipped, set score to null and properties to null.
157
+
- reasoning: a string that explains your thought process to decide on the tool call accuracy level, based on the Chain of Thought structure. Start this string with 'Let's think step by step:'. When status is "skipped", explain why the evaluation was skipped.
158
+
- properties: a dictionary that contains the following keys:
146
159
- tool_calls_made_by_agent: total number of tool calls made by the agent
147
160
- correct_tool_calls_made_by_agent: total number of correct tool calls made by the agent
148
161
- per_tool_call_details: a list of dictionaries, each containing:
0 commit comments