Lesson 11.05 · Phase 11 · Evaluation & Observability

Tool-call accuracy

Tool calling fails in four separate ways: wrong tool, a tool call when none was needed, arguments that break the schema, and well-formed arguments with wrong values. One accuracy number hides which one you have. Score each separately, include requests that should get no tool call at all, and normalise values before comparing so "Paris" and "paris" don't count as a miss.

Learning objectives

  • Build a tool-call test set that includes "no tool needed" and "ask first" cases, not just happy paths.
  • Score tool selection, schema validity and argument values separately, plus a confusion matrix.
  • Normalise argument values (case, whitespace, number formats) and use predicates for free-text arguments.
  • Measure a real model and read which failure mode it actually has.

You switch to a cheaper model and your agent "still calls tools fine" in a quick demo. In production it starts booking calendar events when users say "thanks", sends "1,200" as a string to a currency API that wants a number, and creates events dated 18/12/2026 when the API wants 2026-12-18.

Loading the full lesson…