Skip to content

Interview question · Agent Evals & Observability

How do you evaluate an AI agent when it does something different on every run?

The entry question for the evals topic. The strong answer builds a task set with checkable outcomes, grades the result and the path separately, runs each task several times to get a rate with a denominator, and says which part a judge model may grade and which it may not.

easyNewUpdated Nov 2026

TL;DR: Stop asking whether the agent "works" and ask how often, on which tasks, graded how. Build a set of tasks with a checkable end state, run each several times, and report a rate: pass^k when every run must succeed, pass@k when one success is enough. Grade two things: the outcome, from the state the agent left behind, and the trajectory, from the trace, because a right answer reached by a forbidden action is a failure. Use a judge model only for what code cannot check, and calibrate it against human labels before trusting it. A single run proves nothing either way.

How to approach it

Name the problem precisely: the same input gives different paths, so one run is one sample. Then build the evaluation in four parts: the task set, the grading, the repetition, and what you do with the number. Say what the denominator is every time you give a rate; interviewers listen for that.

A strong answer

The non-determinism is the premise, not the obstacle. One run of an agent is one sample from a distribution of paths, so the evaluation has to be statistical from the start: a set of tasks, each run k times, each run graded, and a rate reported with its denominator (pass@k and pass^k).

Start with tasks whose end state can be checked. "Fix the failing test" is checked by running the test. "Issue the refund the policy allows" is checked by the refund record and its amount. Vague tasks, "help the customer", have no grader, so either sharpen them into a checkable outcome or accept that a person grades them and plan for that cost. A few dozen tasks that cover the real distribution of inputs, including the awkward ones, beat a thousand easy ones.

Then grade two things, because the outcome alone misses half the failures (Outcome and Trajectory Grading):

outcome grading     did the end state match?
                    refund recorded, correct amount, correct order
trajectory grading  was the path acceptable?
                    no forbidden tool calls, no step after "done",
                    the lookup happened before the refund, under budget

run A   outcome pass   trajectory pass        -> pass
run B   outcome pass   trajectory FAIL        -> fail (refunded, then
                                                 emailed the wrong customer)
run C   outcome fail   trajectory pass        -> fail

Run B is the case people miss: a correct result reached through an action nobody authorised. The trace is the evidence, so the harness must record every call, argument and result, or the trajectory cannot be graded at all.

Now the arithmetic, because "it passed" has no meaning without k:

task passes on 9 of 10 runs            p = 0.9
pass@3  (at least one of three)        1 - 0.1^3  = 0.999
pass^3  (all three)                    0.9^3      = 0.729

Which one you report depends on how the agent is used. A coding agent whose output a person reviews can be measured by pass@k: one good attempt is enough. A support agent that acts on each conversation once is measured by pass^k, because every run is the one the customer gets. Reporting pass@k for a system that runs once is the most common way an agent looks three times better than it is.

For what code cannot check, the tone of a reply, whether a summary is faithful, a judge model can grade. It is a model, so it has its own error rate: have people label a sample, measure the judge's agreement with them, and use it only where agreement is high. A judge nobody has calibrated is a second unmeasured system.

Finally, the number is for comparison. Run the same task set, same k, before and after a prompt, tool or model change, and read the difference against the noise. Two runs cannot distinguish a regression from variance; the task set and k are chosen so that they can.

Authority line: the grader decides pass or fail from the end state and the trace; the agent never grades itself, and a model's own claim that it finished is not evidence.

What interviewers probe next

"We ran our ten tasks once each and got eight passes. Ship it?" You have ten samples from ten distributions. Run each task several times, report pass^k if the agent acts once per task, and look at what the two failures did in the trace before deciding anything.

"The judge model agrees with our labels 70 percent of the time. Fine?" Not for a release gate. Find the categories where it disagrees, fix the rubric or route those cases to people, and measure again. Below human-level agreement on the cases that matter, it is noise with a confident voice.

"How do you know a drop of five points is real?" From the spread of repeated runs on the same version. If the per-version noise is three points, five is a signal to investigate, not a verdict; pair the runs on the same tasks and read the failing traces.

How it's scored

Weak: Runs the agent a few times, eyeballs the output, or asks the model whether it succeeded.

Hire: Builds checkable tasks, grades outcome and trajectory, repeats runs and reports pass@k or pass^k with the right choice for how the agent is used.

Strong Hire: Also records traces as grading evidence, calibrates any judge against human labels, compares versions on the same task set against measured noise, and keeps grading outside the agent.

Common mistakes

  • Reporting a success rate from single runs.
  • Grading the final answer only and missing forbidden actions on the path.
  • Using pass@k for an agent that runs once per task.
  • Trusting a judge model without measuring its agreement with people.
  • Letting the agent report its own success.
You just read a free answer. Every topic opens its first 5 answers to anyone. Sign in and the count per topic goes to 6, and the site remembers where you stopped in each one.Google sign-in · free · no payment details
HOW DID IT GO?
0
READING SIGNED OUT

Signing in raises your free answers from 5 to 6 per topic, adds an applied lesson in every topic and easy practice tests, and the site starts remembering you: mastery per topic, bookmarks, and a next-focus recommendation. Free, no card.

Sign in free
UP NEXT ON YOUR JOURNEY
DISCUSSION · 0

Nobody has commented. Post a correction or another way to answer.