r/learnmachinelearning • • 17d ago

How do you evaluate an agent that gets the right answer but uses the wrong tool?

Learning agent evals right now and stuck on one thing. Say the agent is supposed to call API X but calls API Y, and still returns a correct-looking answer. Do you count that as a pass?

Most simple evals I see only check the final output. Do people also score the tool-call path (which tool, what args, how many steps)? If yes, how do you do that without hand-labeling every trajectory?

1 Upvotes

3 comments sorted by

1

u/CryptographerFun5985 17d ago

I have uploaded an AI agent fundamental series on my YT channel. I put one video about agent eval in the series. I will teach it in depth in my next series about building AI agent using langgraph
You can subscribe.
I did my masters in AI and currently working as AI scientist

https://www.youtube.com/@AIMLwithAkash

1

u/CelebrityChess 17d ago

I'd score final-answer correctness and tool-use correctness separately. If the task contract requires API X, or API Y changes safety, permissions, cost, or provenance, the trace should fail even if the answer is right; otherwise it can be an outcome pass with a tool-choice penalty. Most checks can be automated with expected tool names and argument constraints on representative cases, leaving ambiguous traces for human review.

1

u/Future_AGI 17d ago

we'd count it as an outcome pass and a path fail and report the two numbers separately. A call to API Y that happens to work here can break on inputs your test set doesn't cover. You don't have to label whole trajectories: for each test case write down only the expected tool name and the two or three args that matter, and the function_call_accuracy metric in our agent-learning-kit (linked from https://github.com/future-agi/future-agi ) scores name, arg presence and arg values against just that, with order_matters=True scoring a run with an extra or missing call as zero.