Braj Kishore
JourneyVaultML FoundationsAI PM GuideAgenticNewsWork With MeMentorshipPulseNow
Say hi

Hiring · Building · Investing

Have a system — or a team —that needs to scale?

info@avyxon.ai

Usually replies within a day · track record here

JourneyVaultML FoundationsAI PM GuideAgenticNewsWork With MeMentorshipPulseNow
LinkedInXYouTubeSubstackInstagramThreadsFacebookDiscordGitHubTopmate
© 2026 Braj Kishore · Bengaluru, INThink Big · Start Small · Scale Fast
Agentic engineering
Lesson 15Working

Evals for agents

An agent takes many turns and changes the outside world as it goes. So it can reach a correct answer by an unacceptable path, or an unacceptable answer by a correct one. Those two fail independently, and you have to measure both — k times.

Two shifts in this lesson. The second one is the expensive one.

First: the thing you grade is a trajectory — the whole sequence of steps in one run, and what it did to the world — not a single response.

Second: one run of that trajectory is not a measurement. Agents are stochastic, the variance is large, and the number a demo reports is the best of a handful of attempts that nobody wrote down.

Everything else follows from those two. Grade the outcome. Read the transcript. Run it k times. And be suspicious of the instrument before you are suspicious of the agent — because the two best public case studies on this page both end with the instrument being the thing that was wrong.

Interactive · four instruments, one set of outputs

Two said better. Two said worse. Nothing about the model changed.

Digital Green fine-tuned GPT-4o-mini for agricultural advice, then measured it four ways. Read the bottom row left to right: it is the same system, and the instrument decides which model you ship. Select a lane for what each one was actually asking.

What it measured
Agreement with agronomists, 11,966 expert-validated pairs
Head-to-head judgements by domain reviewers, 308 paired comparisons
Context relevance, faithfulness, answer relevance — no human labels
Answer decomposed into atomic facts, share supported by a knowledge source
Baseline → fine-tuned
37.2%→51.8%
105 of 308→203 of 308
0.81→0.76
0.72→0.68
A team trusting this one alone would have shipped
The fine-tuned model
The fine-tuned model
The baseline model
The baseline model

Neither automatic metric is broken. Both are answering a question the team was not asking — which is only visible when you put all four side by side, and invisible when your dashboard shows one.

pass@k, pass^k, and which one you are selling

Two metrics share a notation and disagree about everything.

pass@k asks: did at least one of k attempts succeed? It rises with k — more tries, better odds. It is the honest metric when something filters the attempts for you and a discarded one costs nothing. A human picking the best of five, or a test suite throwing out the ones that fail. Code generation, mostly.

pass^k asks: did all k attempts succeed? It falls with k. That is the one that describes a production service, where k different customers each get one attempt and every one of them has to go well. Nobody is picking the good run out for them.

The metric came from τ-bench, which introduced it precisely because the single-run numbers were flattering. In that paper gpt-4o solved under half the tasks on a single attempt, and pass^8 fell below 25% in the retail domain. So on fewer than a quarter of the tasks could you promise a customer it would work every time.

Same system, same tasks. The only thing that changed was measuring it eight times instead of once.

Interactive · two metrics, one notation

pass@k rises with k. pass^k falls with k.

Set the per-attempt success rate and the number of trials. Both metrics are computed from the same two numbers and they move in opposite directions, which is why quoting one without naming it is close to useless.

pass@3 · at least one succeeds
98.4%

1 − (1 − p)k. Right when a human or a test filters the attempts and a discarded one costs nothing.

pass^3 · all k succeed
42.2%

pk. Right when k different customers each get one attempt and every one of them has to go well.

Not a product yetThe two readings differ by 56.3 points on identical evidence.
05010014812TRIALS (K)pass@kpass^k
Shapes worth having seen

The number most teams have after a good month of work. Three consecutive runs succeed 42% of the time — so a customer with a three-step journey is more likely than not to hit a bad turn somewhere in it.

A single-run score overstates what you can actually deploy, and the overstatement grows with the length of the customer journey. If you take one number from this lesson into an interview, take this one: at 75% per attempt, pass^3 is 42%. Most agent products are three attempts long before anyone calls them finished.
Demystifying evals for AI agentsAnthropic · Jan 2026

Grade the outcome. Read the transcript.

The outcome is the final state of the environment: does the refund exist in the database, do the tests pass, did the message go to the right person. It is objective, it is cheap, and it is your grade.

The transcript is how it got there — turn count, tokens, tool sequence, tone. Use it to work out why a run failed. Never make it the pass condition.

The most common design mistake in this whole area is grading the tool sequence. It feels rigorous. It is actively harmful.

Agents find valid paths you did not anticipate, and a sequence check marks every one of those as a failure. You end up optimising the agent toward the path you happened to imagine, which is the opposite of the reason you built an agent.

Four rules keep a suite honest, and only one of them is about the agent. Draw the tasks from real production failures rather than inventing them. Include negative cases — should not have acted, should not have searched — because a suite of only positive cases teaches you nothing about over-eagerness. Isolate every trial in a clean environment. And if a task has a 0% pass rate across a hundred attempts on a frontier model, the task is broken. That is a grading bug, not a capability finding.

harness.py
from collections import Counter

def evaluate(task, k=5):
    """Run the same task k times in isolated environments."""
    results = []
    for _ in range(k):
        env = fresh_environment(task.seed)        # isolation matters
        transcript = run_agent(task.prompt, env)
        results.append({
            "passed": task.check_final_state(env),  # OUTCOME: the grade
            "turns": transcript.turn_count,         # transcript: diagnosis
            "tokens": transcript.total_tokens,
            "repeated_calls": transcript.repeated_tool_calls,
        })
    return results

def report(tasks, k=5):
    modes = Counter()
    pass_at_1 = pass_hat_k = 0

    for task in tasks:
        runs = evaluate(task, k)
        wins = sum(r["passed"] for r in runs)
        pass_at_1 += wins / k        # average of single runs
        pass_hat_k += wins == k      # ALL k succeeded
        for r in runs:
            if not r["passed"]:
                modes[classify_failure(r)] += 1

    n = len(tasks)
    print(f"pass@1  : {pass_at_1 / n:.1%}")   # what the demo reports
    print(f"pass^{k} : {pass_hat_k / n:.1%}")  # what you can ship
    print(modes.most_common(5))               # where to spend next week
About thirty lines. The two printed lines are the whole argument: pass@1 is what a demo reports and pass^k is what you can commit to in a contract. Note that the environment is rebuilt per trial — shared state between trials produces correlated failures that look exactly like a model regression.

Which grader, and the step nearly everyone skips

Three kinds of grader, in the order you should reach for them.

A deterministic check is code, not a model. It covers everything objectively wrong — malformed output, PII present, a citation that does not resolve, a latency budget breached. Hours to build, runs on every commit, zero drift. Always the first choice.

An LLM judge covers genuine judgement calls: tone, relevance, faithfulness to a source. It costs a hundred-odd human labels up front and ongoing maintenance forever. Human review is the only real ground truth, and it is never fully removable.

The skipped step is validating the judge. An LLM judge is a classifier, and nobody would ship a classifier without measuring it. Yet judges get shipped on the strength of a plausible prompt every day.

So label a held-out set by hand and measure how often the judge agrees with you. Report Cohen’s κ — agreement corrected for how often two raters would land on the same answer by luck — along with true positive and true negative rates. Hamel Husain’s warning is worth carrying: when the classes are imbalanced, raw agreement flatters, so measure precision and recall instead.

GEPA: Reflective Prompt Evolution Can Outperform RLarXiv 2507.19457Your AI Product Needs EvalsHamel Husain · Mar 2024

The harness is usually the thing that is broken

Anthropic published a case where Opus 4.5 scored 42% on CORE-Bench. Then a researcher read the failures. The grading was rigid, penalising “96.12” when the expected value was “96.124991…”. Some task specifications were ambiguous. Some tasks were stochastic and could not be reproduced. After fixing the bugs and loosening an over-constrained scaffold, the same model scored 95%.

Fifty-three points of the measured failure came from the measuring apparatus. That is not an argument for ignoring low scores. It is an argument for reading the failures before you believe the number.

An unvalidated evaluator produces something that looks like measurement and is not. That is strictly worse than having no number at all, because a number gets into a deck.

Interactive · one system, four instruments

Which model would you have shipped?

Digital Green fine-tuned GPT-4o-mini for agricultural advice across India, Kenya, Ethiopia and Nigeria, then measured it four ways. Pick an instrument. Two of them ship the tuned model and two of them ship the baseline — on identical outputs.

Agreement with agronomists on 11,966 expert-validated query–answer pairs from Bihar.

Baseline GPT-4o-mini
37.2%
Fine-tuned GPT-4o-mini
51.8%

Reading · Recall roughly doubles, from 26.2% to 50.3%, while precision drops from 64.3% to 53.3%. The tuned model stops declining to answer questions it can in fact answer — which, for a farmer with one question and no second channel, is the whole product.

A team that trusted RAGAS would have shipped the baseline. That is not a hypothetical cost: the fine-tuned model reached 51.8% F1 at 0.15× the cost of GPT-4, which managed 37.3%. The wrong instrument would have kept the worse answer and the larger bill — and the team would have had a chart proving it was right.

Two teams that measured their own evaluators

Both of these teams published their negative results, which is rare, and both sit outside the usual case list. They make the same point from opposite directions: the evaluator is a component with a failure mode, and almost nobody tests it.

🇧🇷 Brazil · Mexico · Colombia

Nubank — a judge that agreed with itself and nothing else

κ = 0.00
starter judge prompt
κ = 0.745–0.950
after optimisation
+37 pp
tNPS, card delivery

Nubank’s KDD paper describes agents decomposed into versioned Instructions, Routines, Macros and tool specifications, with an LLM judge auditing 100% of conversations rather than sampling surveys. Then they did the step almost everyone skips: they measured whether the judge agreed with anything. On the hand-written starter prompt, GPT-4.1-mini assigned a single class to every test instance. Every one. Zero variance, and therefore Cohen’s κ of exactly 0.00 against GPT-4.1. After GEPA optimisation, agreement reached κ = 0.745 between those two models, 0.895 between GPT-4.1 and GPT-4o, and 0.950 between the two reasoning models. Evaluator accuracy on one of the four eval tasks went from 68.88% to 88.89%.

The engineering lesson is that a judge prompt is a model artefact, not a piece of writing. Two judges disagreeing completely is a detectable condition, and it costs one afternoon to detect. Shipping on a κ of zero is undetectable and costs a quarter. The second lesson is in their honesty about outcomes: across five production agents, tNPS rose everywhere — but the AI still trailed expert human agents on every single use case, from −1.1 pp to −23.6 pp. Publishing that is rarer than publishing the +37.

🇮🇳 India · Kenya · Ethiopia · Nigeria

Digital Green Farmer.Chat — when RAGAS says ship the worse model

37.2% → 51.8%
expert F1, fine-tuned
0.81 → 0.76
RAGAS, same change
203 / 308
human preference

Farmer.Chat has served over 1.5 million agricultural queries across four countries. The deployment paper reports 9.05 seconds average response, 71% context precision and roughly three quarters of queries answered, with translate-to-English then back-translate beating generation in the source language. A later paper covers the fine-tuning. Trained on 11,966 expert-validated pairs from Bihar, GPT-4o-mini’s domain-expert F1 rose from 37.2% to 51.8%, and human reviewers preferred the tuned model in 203 of 308 comparisons against 105 for the baseline, p < 0.001. It reached that at 0.15× the cost of GPT-4, which managed 37.3%.

Then the twist. RAGAS scored the fine-tuned model lower — 0.81 down to 0.76 — and FActScore agreed with RAGAS, 0.72 down to 0.68. Two automatic metrics said the tuned model had got worse, while expert F1 and human preference both said it had got better. Neither tool is broken; both are answering a question the team was not asking. RAGAS is reference-free by construction, so it rewards answers that look well-grounded in the retrieved passages, and the tuned model’s gain came from recall — it stopped declining to answer, at some cost to precision. A team that had adopted RAGAS as its release gate would have shipped the worse, more expensive model, with a chart proving it was right. Pick your instrument from the decision you are making, and validate it against people who know the domain before you let it block a release.

Building Customer Support AI Agents at 100M-User ScaleNubank · arXiv 2606.08867Building AI agents for 131 million customersBuilding Nubank · Mar 2026Farmer.Chat: Scaling AI-Powered Agricultural ServicesDigital Green · arXiv 2409.08916Fine-Tuning and Evaluating Conversational AI for Agricultural AdvisoryDigital Green · arXiv 2603.03294
Ragas: Automated Evaluation of Retrieval Augmented GenerationarXiv 2309.15217FActScore: Fine-grained Atomic Evaluation of Factual PrecisionarXiv 2305.14251

What to build, at your size

The eval work that matters at four people is not a smaller version of the eval work that matters at four hundred. One item on this list is a genuine waste of a seed team’s only scarce resource, and it happens to be the one seed teams reach for first.

Interactive · calibrate to your stage

What to actually do about this, at your size

Nearly all guidance on this topic is written for one company size and then read by everyone. Pick yours — the list re-sorts, and what you should deliberately not build drops to the bottom.

  • 20–50 tasks from real failuresNon-negotiable

    A suite drawn from things that actually went wrong in production, with a deterministic outcome check per task.

    At this stage · Now genuinely 20–50, refreshed monthly from the incident channel. This is also the point at which a task nobody can explain should be deleted rather than debugged.

  • Deterministic outcome checksNon-negotiable

    Assert on the final environment state — does the refund row exist, does the test suite pass, does the citation resolve.

    At this stage · Extend to the things that are objectively wrong rather than merely disliked: malformed output, PII present, latency budget breached, a citation that 404s.

  • pass^k over repeated trialsDo it

    Run each task k times in isolated environments and report the share where all k runs succeeded, not the average.

    At this stage · Now automated at k=5 with clean environments per trial. Shared state between trials produces correlated failures that look exactly like a model regression, and you will chase one for a week.

  • A CI gate on the suiteDo it

    The eval run blocks a release, with an owner who can override it and a record of when they did.

    At this stage · Block now. An eval suite that does not block a release is documentation, and it will quietly rot within a quarter of nobody noticing it went red.

  • LLM-as-judge, validatedCheap version

    A model grading judgement calls — tone, relevance, faithfulness — with measured agreement against human labels before it is trusted.

    At this stage · Only where error analysis has surfaced a recurring judgement call you cannot assert on. Budget the hundred-odd human labels before the judge, not after — an unvalidated judge produces a number that looks like measurement and is not.

Nothing is optional at this stage. That is itself the finding — the cost of the control set is part of the cost of operating here.

Making the budget case

Evals are the first line cut from a budget and the absence that kills the project. The argument that works with a CFO is not about quality, because quality is an opinion in that room.

It is about optionality. Without evals you cannot tell a regression from noise. So every model upgrade is a gamble, every incident becomes an argument between two people with anecdotes, and you can never safely increase autonomy. Evals are what convert an experiment into an asset with a maintenance cost.

Three things follow. Name an eval owner — the role does not show up on a CV, which is why it is the hardest agent role to hire for. Budget the human labelling as a line item rather than as a favour someone does at the weekend.

And insist on both offline and online. Offline answers “did my change help”. Online answers “is it working for real users”. A team with only one of them is confidently blind in a direction it cannot see.

The interview question this gives you is close to unfakeable: “walk me through the last error analysis you ran, and what you changed because of it.” Candidates who have shipped agents describe traces, failure taxonomies and counts. Candidates who have not describe frameworks and benchmark scores.

What to remember

  1. 1
    You are grading a trajectory, k times

    The outcome is the grade; the transcript is the diagnosis. Run each task k times in isolated environments, because a single run of a stochastic system is an anecdote with a decimal point.

  2. 2
    pass^k is what you sell

    pass@k rises with k and is right when something filters the attempts for you. pass^k falls with k and is right when k customers each get one attempt. At 75% per attempt, pass^3 is 42%.

  3. 3
    Never grade the tool sequence

    Agents find valid paths you did not anticipate, and a sequence check marks every one as a failure. Grade where the agent arrived; use the path to explain why.

  4. 4
    Validate the evaluator before you trust it

    A judge is a classifier, so measure its agreement against human labels rather than trusting the prompt. Nubank found κ = 0.00 between two judges. Digital Green found RAGAS and FActScore ranking two models the wrong way round. Every team that measured its own evaluator found it broken.

Sources

Every source in this lesson

Primary sources wherever one exists. Where a claim is contested or vendor-reported, the lesson says so at the point it is made.

Paper
  • τ-bench: A Benchmark for Tool-Agent-User InteractionarXiv 2406.12045

    Where pass^k comes from. Yao, Shinn, Razavi and Narasimhan, June 2024. The abstract is the whole argument: gpt-4o succeeds on under half the tasks, and pass^8 falls below 25% in the retail domain. Same system, measured eight times instead of once.

  • Building Customer Support AI Agents at 100M-User ScaleNubank · arXiv 2606.08867

    The κ = 0.00 result, the post-optimisation κ of 0.745 / 0.895 / 0.950, evaluator accuracy across four eval tasks, and Table 3 — five production agents, all of them still behind expert humans on tNPS.

  • Farmer.Chat: Scaling AI-Powered Agricultural ServicesDigital Green · arXiv 2409.08916

    The deployment paper, and the source for the operational numbers only: 9.05s average response, 71% context precision, ~75% of queries answered, and the finding that translating to English and back beat generating in the source language. It predates the fine-tuning work — do not cite it for those figures.

  • Fine-Tuning and Evaluating Conversational AI for Agricultural AdvisoryDigital Green · arXiv 2603.03294

    The one to read, and the source for every fine-tuning figure on this page. Expert F1 37.2%→51.8% and human preference 203/308 (against 105 for the baseline, p < 0.001) both say the fine-tuned model is better; RAGAS (0.81→0.76) and FActScore (0.72→0.68) both say it is worse. Also the 1.5 million queries across four countries.

  • Ragas: Automated Evaluation of Retrieval Augmented GenerationarXiv 2309.15217

    Es, James, Espinosa-Anke and Schockaert. Reference-free by design — context relevance, faithfulness, answer relevance, no human annotation required. That design choice is exactly why it can disagree with domain experts.

  • FActScore: Fine-grained Atomic Evaluation of Factual PrecisionarXiv 2305.14251

    Min et al. Decomposes a generation into atomic facts and scores the share supported by a knowledge source. Precise, well-founded, and still capable of ranking two agricultural advisors the wrong way round.

  • GEPA: Reflective Prompt Evolution Can Outperform RLarXiv 2507.19457

    Agrawal et al. The optimiser Nubank used on its judge prompts — it samples trajectories, reflects on them in natural language, and evolves the prompt. Reported to beat GRPO by ~6% on average with up to 35× fewer rollouts.

Read
  • Demystifying evals for AI agentsAnthropic · Jan 2026

    Grace, Hadfield, Olivares and De Jonghe. Source of the CORE-Bench 42%→95% story, the 20–50 tasks starting point, and the instruction to grade what the agent produced rather than the path it took.

  • Building AI agents for 131 million customersBuilding Nubank · Mar 2026

    Gupta and Braithwaite, the engineering-blog companion to the paper. Notable for the claim that humans are bad at writing production prompts, and that a frontier-model upgrade breaks agents because better models assume less.

  • Your AI Product Needs EvalsHamel Husain · Mar 2024

    Still the best argument for error analysis over dashboards. Binary ratings over granular ones, and — the part people skip — measure judge alignment with precision and recall rather than raw agreement when the classes are imbalanced.

Lesson 14
The seven kinds of memory
Lesson 16
Why agents fail