Dev.to · 7 min read

Four agent metrics that a final accuracy score hides

Four agent metrics that a final accuracy score hides

Score every recorded agent run on four process checks: constraint satisfaction, tool-call correctness, loop termination, and escalation to a human. Compute each one from the trace: which declared constraints passed, whether every tool call had a valid tool and valid parameters, whether the run reached a stop state, and whether a human took over. Chip Huyen, then a storyteller at Tép Studio, and Vivienne Zhang of NVIDIA, spelled out those failure points on Chain of Thought in December 2024. Alex Ratner, co-founder and CEO of Snorkel AI, described the measurement shortfall from the other side in April 2026. How do you check that an agent stayed inside the constraints? Write the constraints down before the run, then score the trace against that list. Chip Huyen's planning example is a two-week trip with a budget of 5,000. The plan has to cover two weeks and stay inside that budget. A fluent itinerary that breaks the budget fails. Long outputs need the same item-by-item check. Alex Ratner described legal deep-research tasks that might take a human five, 10, or 15 hours, with multiple tools and multiple citations. Compare that with a math item whose output is a single number you can check against an answer key. For a 30-page PDF with 50 citations, you need a grading rubric, because you cannot settle the output by asking whether A equals B. Store each rubric item as a boolean on the run. Constraint satisfaction is true only when every item you declared has passed. whenever I try to evaluate some use case, I would probably try to break down, like, how is this application going to fail. It tries to put in a lot of evaluation metrics around the points of failures. Chip Huyen, then Storyteller at Tép Studio, on Chain of Thought ep 5 Practical Lessons for GenAI Ev… - Chain of Thought | AI Agents, Infrastructure & Engineering - Apple Podcasts Podcast Episode · Chain of Thought | AI Agents, Infrastructure & Engineering · December 4, 2024 · 48m podcasts.apple.com How do you measure tool-call correctness? Count a tool call as correct only when the tool is valid and the parameters are valid. Chip Huyen named both misses. The agent calls a tool it does not have, or it calls the right tool with the wrong parameters. In the weather case, the model has to extract a location and a time, and those values have to be valid. The right tool name with a bad location still fails the call. Log each call as that pair. The run passes tool-call correctness when every call passes both halves. When the task requires a specific tool, put that requirement on the constraint list, so a run that never calls anything does not pass on an empty call list. How do you tell a finished loop from a run that does not stop? Mark the run terminated only when it reached a stop state, and store the step count beside that flag. Chip Huyen described a very long sequence of actions that might go on and on and fail to stop in the time available. Alex Ratner treats length as its own axis. Autonomy horizon is the number of steps a task needs, including goals that change while the task is running. A coding challenge with one unit-test answer is the short end. The long end is a multi-turn task with shifting specifications. Measuring out to the length of a real-world task is still at the frontier. Very few public benchmarks test it, and most of those are unsaturated. Pick a step cap for the task before you score a suite. Hitting the cap without a stop state fails loop termination. Report the termination rate and the step counts together so a prompt or model change that lengthens the path is visible. A minimal sketch to adapt, not a drop-in library. def score_agent_runs(runs): if not runs: return {} n = len(runs) def tool_calls_ok(run): return all( c["valid_tool"] and c["valid_params"] for c in run["tool_calls"] ) return { "constraint_satisfaction": sum(r["constraints_met"] for r in runs) / n, "tool_call_correctness": sum(tool_calls_ok(r) for r in runs) / n, "loop_termination": sum(r["terminated"] for r in runs) / n, "mean_steps": sum(r["steps"] for r in runs) / n, "human_escalation": sum(r["escalated"] for r in runs) / n, } Fill each run from your own logs. constraints_met is true when every constraint you declared passed. Each entry in tool_calls carries valid_tool and valid_params. An empty call list makes tool_calls_ok true, so a required tool belongs on the constraint list. terminated is true only when the run reached a stop state within your step cap, and steps is how many steps it took. escalated is true when a human took the task over. And yet, you can ask a coding agent to do a much more mundane-seeming task, but one that has messier inputs and messier outputs and a longer set of steps required, and it might fall down. Alex Ratner, Co-founder and CEO at Snorkel AI, on Chain of Thought ep 57 When should escalation to a human be its own metric? Count a handoff when the agent stops and sends the task to a person. Vivienne Zhang's familiar case is a customer-service chatbot. It keeps handling queries until it can no longer deal with the complexity, then sends the query to a human. Getting that handoff to a good user experience takes iteration on those same failure points. In the split she described, the human defines the goals and the parameters, and the agent carries out the means. Track how often a person reclaimed the task, and open the traces when that rate jumps after a prompt change. And you will keep handling your queries until it decides it can no longer deal with the complexity of the query. And then you will send the query to a human and that will be the human in the loop. Vivienne Zhang of NVIDIA, on Chain of Thought ep 5 FAQ What is a constraint check on an agent plan? A pass or fail against limits you set before the run. Chip Huyen used a two-week trip with a budget of 5,000: the plan has to cover the two weeks and stay inside the budget. For a long document, Alex Ratner said a rubric replaces a single answer-key comparison, as with a 30-page PDF that carries 50 citations. What makes a tool call incorrect? An invalid tool, or the right tool with invalid parameters. A weather call that does not extract a valid location and time fails the parameter half even when the tool name was right. What handoff rate should I target? Set it per task. Vivienne Zhang described a chatbot that hands off when the query is too complex, and that handoff should be evaluated on the same failure points as the rest of the agent. The target is a product decision for your own task. Takeaway Declare every constraint before the run, and store a boolean for each one. Pass a tool call only when the tool and the parameters are both valid. If the task requires a tool, put that requirement on the constraint list. Store a step count and a terminated flag, and set the step cap before you score the suite. Store whether a human took the task over, and read that rate with the other three. The longer explainer, with the episode clips, is on Chain of Thought. It draws on this episode. Subscribe to the Chain of Thought newsletter for new episodes and write-ups like this one. Drafted with AI assistance from the episode transcripts.

This is a summary aggregated from Dev.to. Read the complete article on the original site:

Read full article at Dev.to

More AI & Machine Learning News