Skip to content

Tool Use Evaluation

Purpose

Tool use evaluation checks how well a model understands available tools, selects the appropriate one, and forms correct arguments. This is critical for agent systems.

Metrics

Metric Description
Tool Selection Accuracy The proportion of cases where the correct tool is selected
Argument Accuracy The correctness of the formed arguments
Success Rate The proportion of successfully executed calls
Efficiency The number of attempts until a successful call
Hallucination Rate The proportion of calls to non-existent tools

Evaluation Methods

  • Gold-standard benchmarking: comparison with reference calls.
  • Evaluation through execution: checking the result of executing the tool.
  • LLM-as-a-judge: using another model for evaluation.
def evaluate_tool_call(predicted, expected):
    if predicted.name != expected.name:
        return 0.0
    return argument_similarity(predicted.args, expected.args)

See also