Tool call accuracy
Tool call accuracy rates how well an agent's tool calls match the expected calls in tool choice and arguments, allowing semantically equivalent values, as a 0–3 level. It mirrors RAGAS tool_call_accuracy as a single graded judgment.
What the evaluator does
Jev compares `tool_calls` with `expected_tool_calls` and rates the overall match. For one probability per expected call, use tool_call_semantic in the same request.
Compare `tool_calls` with `expected_tool_calls`. Rate the match in tool selection and argument values, allowing equivalent formats.
The question, verbatim
This is the question the API sends for the example below, generated from the same code path the playground and API use. Jev sees the request fields as state and returns a probability for each outcome. Nothing is generated, so there is nothing to parse.
Compare `tool_calls` made by the agent with `expected_tool_calls`. Rate the match in tool selection and argument values, allowing equivalent formats.
- 0The tool calls are wrong tools or missing entirely
- 1Some right tools with wrong or missing arguments
- 2Right tools with mostly right arguments; minor mismatches
- 3Tool calls match the expected calls in tools, arguments, and intent
Reach for it when
- Agent regression tests where argument formats vary.
- A single number for a dashboard, with tool_call_semantic for the drill-down.
Not the right tool when
- Exact argument equality is required (tool_call_args is free and exact).
Watch out for
- Extra unexpected calls are not penalised by this evaluator; use tool_call_count alongside.
What to send
score 0–1 (expected level ÷ top level), label “x.x / n”, confidence, a probability per level, passed at 75% of the scale.
{
"evaluators": [
"tool_call_accuracy"
],
"output": "booked",
"tool_calls": [
{
"name": "search_flights",
"args": {
"origin": "BLR",
"destination": "SFO",
"date": "Nov 12, 2025"
}
}
],
"expected_tool_calls": [
{
"name": "search_flights",
"args": {
"from": "BLR",
"to": "SFO",
"date": "2025-11-12"
}
}
]
}Level 3: same tool, equivalent arguments despite renamed keys and date format.
Aggregate with
One result per item is a fact; a dataset of them is a metric. These are the aggregations that fit this evaluator's output shape.
- Why not just compare tool-call JSON?
- Because agents rename keys and reformat values. Exact comparison fails on `date: "Nov 12, 2025"` vs `"2025-11-12"`; a semantic judgment does not. jeval gives you both.