Skip to content
AI360XpertBeta

Agentic Workflow Evaluation

A correct final answer can hide a wasteful, lucky path. Score the steps the agent took, not just the file it handed back.

A tidy 3-step plan, tool call and observation scores 1.0 while an 11-step wander with two errors drops to 0.18, so the trace matters as much as the answer.
A tidy 3-step plan, tool call and observation scores 1.0 while an 11-step wander with two errors drops to 0.18, so the trace matters as much as the answer.

Why Does This Exist?

You asked for a CSV of three competitor prices. One agent returns it after 3 tool calls. Another returns the same CSV after 11 calls, two of them errors, and a lucky guess on the last price. If you grade only the file, both pass. The second one still burns ten times the tokens and will fail the next time luck runs out.

That is why final-answer checks are not enough for agents. An agent makes a sequence of choices: what to try, which tool to call, what the tool said, and whether to retry. Chain-of-thought agents write that reasoning down, code execution agents add sandbox outputs to it, and human-in-the-loop agents pause it for approval. Evaluation has to read that whole trace.

This page covers scoring the trace: outcome, efficiency, and errors. It does not teach how to write the reasoning trace itself or when to ask a person to step in. Those live on their own pages, linked above.

Basics first: a tool call is one request from the agent to outside code, plus the reply that comes back. If that idea is new, skim tool use first, then come back. Everything below assumes you know that a trace is just the ordered list of those calls.

Think of It Like This

Grading the delivery route, not just the parcel

A courier hands you an intact parcel. You could sign and move on. But the depot keeps the route log too: 3 planned stops versus 11 stops with two wrong addresses and a U-turn across town.

The parcel is the final answer. The route log is the trajectory. Fuel is tokens. Wrong addresses are tool errors. A short route with no wrong turns is cheap and likely to repeat. A long route that still arrived was lucky, and luck does not repeat.

Where it stops: roads stay put. Agent tools do not. A search result can change, a sandbox can time out, and a model can misread a reply it read correctly yesterday. So you grade routes over many runs, never from one lucky delivery.

How It Actually Works

Call the step count nn, which means how many tool calls the trace holds. Call the outcome score oo, which means how good the final answer is on a 0 to 1 scale. Call the error count ee, which means how many steps returned an error. The holistic score combines all three, because any one of them lies on its own.

Outcome first, then the path

Outcome asks whether the goal changed the world as requested. For a CSV that means the right rows and columns. For a subjective summary it often means another model grades against a short rubric. Outcome alone passes the lucky 11-step run, which is why you never stop here.

Efficiency and error penalties

Efficiency falls as steps grow past what the task should need. Fix an expectation, here 5 steps. Then efficiency is 1.0−(n−5)×0.151.0 - (n - 5) \times 0.15, clipped to the range 0 to 1. Three steps gives 1.0−(3−5)×0.15=1.301.0 - (3 - 5) \times 0.15 = 1.30, clipped to 1.0. Eleven steps gives 1.0−(11−5)×0.15=0.101.0 - (11 - 5) \times 0.15 = 0.10. Each error subtracts another 0.2, because retries cost money and hint at confused reasoning.

The final score is 0.6×o+0.4×efficiency−0.2×e0.6 \times o + 0.4 \times \text{efficiency} - 0.2 \times e, floored at 0. Outcome carries more weight, but a messy path can still drag a good answer down.

Worked example

Task: write three prices into a CSV.

Tidy run: n=3n = 3, e=0e = 0, o=1.0o = 1.0. Efficiency is 1.0. Final is 0.6×1.0+0.4×1.0−0=1.00.6 \times 1.0 + 0.4 \times 1.0 - 0 = 1.0.

Wandering run: n=11n = 11, e=2e = 2, o=0.9o = 0.9. Efficiency is 0.1. Final is 0.6×0.9+0.4×0.1−0.2×2=0.54+0.04−0.40=0.180.6 \times 0.9 + 0.4 \times 0.1 - 0.2 \times 2 = 0.54 + 0.04 - 0.40 = 0.18.

Same file, very different grades. The 0.82 gap is the price of eight extra steps and two errors. That gap is what lets you compare prompts, models, and retry policies without fooling yourself.

Code

This scorer implements the rule above with only the standard library. It takes counts, not live models, so you can check the arithmetic by hand:

def efficiency(n_steps: int, expected: int = 5) -> float:    raw = 1.0 - (n_steps - expected) * 0.15    return max(0.0, min(1.0, raw))

def holistic(outcome: float, n_steps: int, n_errors: int) -> float:    eff = efficiency(n_steps)    return max(0.0, outcome * 0.6 + eff * 0.4 - n_errors * 0.2)

print(round(efficiency(3), 2))  # -> 1.0print(round(efficiency(11), 2))  # -> 0.1print(round(holistic(1.0, 3, 0), 2))  # -> 1.0print(round(holistic(0.9, 11, 2), 2))  # -> 0.18

Four calls, two stories. The tidy trace keeps its 1.0. The wandering trace keeps its 0.9 outcome but finishes at 0.18 once steps and errors are counted.

Watch Out For

Punishing good recovery as wandering

Your scorer docks every extra step, so an agent that retries a failed search with a better query loses points for doing the right thing.

The symptom is a flat, short trace that scores well and fails often, because the agent learned to never retry. Allow one or two recovery steps before the penalty bites, and score a retry that fixes an error differently from a repeat of the same failing call. Check the trace: a new query after a failure is resilience, the same query five times is a loop.

A judge that loves long answers

You use a model to grade reasoning traces, and it keeps preferring the longer trace even when the shorter one is correct.

The symptom is verbose plans full of restated facts outscoring tight ones. Grading models favor fluency and length, and they anchor on early steps while skimming later mistakes. Grade with a short rubric that names what counts, spot-check a sample by hand, and never let the judge see only one trace at a time without the outcome score beside it.

The Quick Version

  • Agentic workflow evaluation scores the steps plus the final answer, because the same file can come from a tidy or a lucky path.
  • Outcome oo says whether the goal was met, step count nn says what it cost, error count ee says how confused the run was.
  • Efficiency is 1.0−(n−5)×0.151.0 - (n - 5) \times 0.15 clipped to 0 to 1, and each error subtracts 0.2 more.
  • A 3-step clean run with outcome 1.0 scores 1.0, while an 11-step run with two errors and outcome 0.9 scores 0.18.
  • Do not punish a single smart retry the same way you punish a five-time repeat.
  • Model judges prefer long traces, so pair them with a rubric and human spot checks.