Zenaique

Why a multi-agent eval has to score the trajectory, not only the final output

Flashcard·Medium·4.0 · 0·~30s·Asked atElevenlabsKrutrimUnity
Attempt it
TL;DR

Final-output eval hides cost regressions, tool errors, and lucky-path runs in multi-agent systems; trajectory eval scores the path itself (hops, per-agent step-correctness, tool precision, cost, latency).

Memory aid
Sign in to see the mnemonic that makes this stick.
Easy to grasp

Imagine grading a road trip from New York to Boston by only checking that the car arrived. Two trips both arrived. One drove the highway in four hours with one gas stop. The other took back roads for fourteen hours, ran out of gas twice, and got lost in Hartford. They both pass a 'did you arrive' test. The trip with fourteen hours and two gas refills is not the same as the four-hour one, and pretending it is means you never notice when the fleet is getting slower and more expensive. Trajectory eval grades how the car got there, not just whether it arrived.

Concept explanation~2 min read

Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.

Multi-agent eval is one of the places single-agent intuition fails most obviously. Single-agent eval is a black-box function: input goes in, output comes out, compare to a golden reference. Multi-agent is a sequence of internal decisions (routing, handoffs, tool calls, retries) that aggregate to a final answer. Two runs can land the same answer through wildly different sequences. The cheap, three-hop, one tool call run and the expensive, eleven-hop, three-retry run are not equivalent, but they are equivalent under final-output eval.

This walkthrough explains why trajectory eval is the right shape for multi-agent, names the six metrics that actually catch problems, and gives concrete implementation guidance: how to capture the trace, how to attribute step-correctness, how to compute path coverage, and how to wire the result into a regression dashboard.

Mental model: for multi-agent, the trajectory IS the system; evaluating only the final output is like grading a road trip by checking the car arrived.

Why final-output eval breaks for multi-agent

The equivalence problem

Final-output eval treats the run as a black box. Two runs that produce the same correct answer are scored equally. But the runs are not equivalent in any production-meaningful way:

  • The 3-hop run with one tool call costs $0.05 and takes 2 seconds.
  • The 11-hop run with two retries and three handoff loops costs $0.30 and takes 15 seconds.

If your eval reports 91 percent accuracy and your bill triples month over month, the eval is not helping you debug the regression.

The lucky-path problem

A brittle multi-agent run can land on the correct answer for one specific input by accident. The same system fails on the next prompt variation because the lucky path was not robust. Final-output eval on a held-out set rates the system as 'works most of the time' without telling you that the success was structurally fragile.

The attribution problem

When a multi-agent system gets the wrong answer, the failure happened somewhere inside. Which agent? Which tool call? Which handoff? Final-output eval says 'system was wrong.' That is not actionable. Trajectory eval says 'agent X called tool Y with wrong arguments at hop 4.' That is actionable.

The cost regression problem

A model upgrade, a prompt change, a new tool can all silently increase cost per trace without changing accuracy. Final-output eval is blind to this. Trajectory eval surfaces it immediately because cost per trace is one of the six metrics.

The six trajectory metrics
Implementation: how to actually capture and compute this
The payoff: falsifiable improvement claims
Sign in to unlock the full deep dive.

Situations where this technique stops working.

Sign in to see when this approach fails.

2–4 min · Everything important, quickly.

Sign in to see the quick scan of the deep dive.

Real products, models, and research that use this idea.

  • LangSmith's trace eval explicitly supports per-step grading and per-agent attribution for LangGraph runs.
  • Langfuse and Arize Phoenix both expose per-span queries that let you aggregate cost per `agent.role` for trajectory eval.
Sign in to see more production examples.

What an interviewer would ask next. Try answering before peeking at the approach.

QHow would you build a path-coverage metric concretely?
A

Statically enumerate the edges of the topology graph (handoff edges in LangGraph or AutoGen). Tag each trace with the set of edges it traversed. Coverage = unique edges hit by the eval set divided by total edges. Aim for 80 percent plus; below 50 percent means most branches are untested.

2 more follow-ups an interviewer would ask next. Sign in to reveal them.

Red flags & common mistakes

The phrases that signal junior thinking. Click to expand.

Most common mistake

Reporting end to end accuracy as the only eval metric and missing that the system got 4x more expensive and brittle over the last release while quality numbers held flat.

Sign in to see all red flags and common mistakes.

60 second bullets to scan on the way to the call.

  • Why is final output eval insufficient for a multi-agent system?

  • What are the six trajectory metrics and what does each catch?

Sign in to unlock the revision sheet.

Primary sources. Browse if you want the original framing.

Similar questions

Same topic, related formats. Practice these next.

4 curated
Next question
Why AutoGen 0.4 makes TerminationCondition a first class primitive instead of leaving it to convention
Flashcard·Medium