agentsclimarketplace

Tool use eval

Skill varunk130/AI-Eval-Skills/skills/tool-use-eval

Curated AI agent evaluation skills from Microsoft's Eval Guide — plan, generate, run, and interpret eval suites for Copilot Studio agents

Install
npx -y skills add varunk130/AI-Eval-Skills --skill tool-use-eval

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Evaluation pattern for agents that call tools / functions - measures tool selection accuracy, argument correctness, recovery from tool errors, and avoidance of unnecessary tool calls. Pairs with eval-suite-planner. Use when: tool-use eval, function-calling eval, agent tool selection, tool invocation accuracy, tool argument validation, tool error recovery, agent tools, function-calling agent, MCP eval.

SKILL.md

5.8 KB, as published. Nobody here has run it

Tool-Use Eval

Evaluation pattern for agents whose job is to invoke tools / functions / MCP capabilities. Conversational quality and task-completion evals miss the failure modes specific to tool-use; this skill adds the four dimensions that actually predict whether a tool-using agent is production-ready.

Core Principle

A tool-using agent has four ways to fail that pure-conversation agents don't. Generic quality scores can be high while every one of these is broken. This eval pattern separates them so improvements target the right failure mode.

The Four Tool-Use Dimensions

DimensionWhat It MeasuresFailure Example
Tool Selection AccuracyDid the agent pick the right tool for the request?Used search_web when lookup_internal_kb was the right call
Argument CorrectnessWere the arguments well-formed and schema-valid?Required field missing, type mismatch, hallucinated parameter
Error RecoveryWhen a tool returned an error, did the agent recover sensibly?Repeats the same failing call, or gives up silently
RestraintDid the agent avoid unnecessary tool calls?Calls 5 tools when 1 would do; calls a tool when no tool was needed

The four dimensions are independently scorable - improvements often help one and hurt another (e.g., tightening argument validation can increase Restraint failures).

Scoring Anchors (0-3 per dimension)

Tool Selection Accuracy

ScoreAnchor
0Wrong tool; result has no chance of satisfying the request
1Plausible-looking tool but mismatched to the request's actual intent
2Right tool family, but a more specific / cheaper tool existed and was missed
3Most appropriate tool selected on the first call

Argument Correctness

ScoreAnchor
0Schema-invalid (missing required field, type mismatch, hallucinated param)
1Schema-valid but semantically wrong
2Schema-valid and semantically reasonable, with one suboptimal field
3Schema-valid, semantically optimal, no extraneous fields

Error Recovery

ScoreAnchor
0Agent ignored the error or repeated the same failing call > 1×
1Agent stopped without explaining the failure to the user
2Agent tried a different approach but did not surface the failure clearly
3Sensible alternative tried or failure clearly surfaced with next-step guidance

Restraint

ScoreAnchor
0Tool called when no tool was needed (request answerable from prior context)
1Multiple tools called for what should have been a single call
2Tool count is right but ordering wasted a call
3Minimum-necessary tool calls, ordered well

Canonical Test Suite

The skill ships an 18-case seed suite covering common failure shapes:

Case TypeCountTests
No tool needed3Restraint baseline - request answerable from context
Single obvious tool3Selection + Argument basics
Two plausible tools3Selection discrimination
Multi-tool chain3Sequencing + Restraint
First call errors3Error Recovery
Ambiguous request3Pre-call clarification vs. guessing

Extend with 5-10 cases from your actual production traffic.

Trace Capture Schema

Every test case captures:

  • request - the user prompt
  • tool_calls[] - each call's name, arguments, timestamp, result, error (if any)
  • final_response - the agent's reply to the user
  • expected_tools[] - gold-standard tool sequence (for Selection scoring)
  • expected_no_tools - boolean (for Restraint scoring)

Without the trace, post-hoc scoring is impossible.

Failure Taxonomy

Standardized labels so triage rolls up cleanly:

CodeMeaning
SEL-WRONGWrong tool selected
SEL-SUBOPTIMALRight family, wrong specific tool
ARG-INVALIDSchema validation failed
ARG-SEMANTICSchema-valid but semantically wrong
REC-SILENTFailure not surfaced to user
REC-LOOPSame failing call repeated
RES-OVERCALLMore tool calls than needed
RES-UNNECESSARYTool call when none was needed

Process

  1. Inventory the tools - list with schemas and one-line use cases
  2. Adopt / extend the seed suite - start with the 18 canonical cases
  3. Run with full trace capture - request + every call + final response
  4. Score each case on all four dimensions independently
  5. Aggregate by failure type - which dimension is dragging?
  6. Track over time - re-run on every model / prompt / tool-schema change

Pairs With

  • eval-suite-planner - designs the broader plan; tool-use-eval is the tool-use chapter
  • eval-result-interpreter - produces SHIP / ITERATE / BLOCK verdicts
  • eval-triage-and-improvement - walks through failures, recommends fixes
  • cost-quality-frontier - Restraint failures show up as cost regressions

Tips

  1. Score the trace, not the response. Wasteful tool sequences hide if you only judge output.
  2. Restraint regressions are the most expensive at scale - a 2× tool-call regression doubles inference + tool-execution costs.
  3. Don't conflate Selection and Argument failures - different fixes (prompt vs. schema clarity).
  4. Test the no-tool baseline - over-calling is the hardest failure mode to detect without it.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.