# How to build an agentic evaluation: Hugging Face's eight steps

> On 23 November 2026 Hugging Face published a guide to building and maintaining agentic evaluations. It walks through eight steps on a real task, shows why you must test the verifier with oracle, no-op and shortcut agents, recommends reporting pass^k for unattended agents, and lists what to share and what to protect when you open-source an eval.

Published 2026-11-23 by the CodeBeast Team · https://codebeast.ai/blog/agentic-evaluation-guide

Hugging Face has published [a hands-on guide to building and maintaining agentic evaluations](https://huggingface.co/blog/agentic-evals), by Avijit Ghosh, Ben Burtenshaw and Irene Solaiman. It is the most concrete public walkthrough so far of how to evaluate an agent that changes an environment, rather than a model that answers a question. If your team is choosing between coding agents, tuning prompts or harnesses, or trying to prove an agent is safe to run unattended, the guide's checks will catch mistakes that make most internal evals misleading.

## The parts of an agentic eval

The guide separates three eras of evaluation: question-answer benchmarks such as MMLU, agentic benchmarks such as SWE-bench and WebArena that check what an agent changed, and team or swarm benchmarks, which it leaves out of scope. For the second kind, it names the parts you have to get right:

| Part | What it is |
|---|---|
| Task | The instruction given to the agent |
| Agent harness | Wraps the model and its tools |
| Environment | The pinned workspace the agent works in |
| Rollout | One attempt, start to finish |
| Trace | The record of a rollout |
| Verifier | Grades the environment's final state |
| Evaluation harness | Runs rollouts and collects results |

The separation matters because each part can move your score on its own. The guide cites a Terminal-Bench audit where changing only the agent harness shifted accuracy by up to 29.9 percentage points. If you compare two coding agents, you are comparing model plus harness plus environment, not models.

## The eight steps

The worked example is a physics lab task: fit peaks in a Raman spectrum and compute a defect ratio for graphene. The domain is niche, but the steps carry over to any coding or ops task.

1. **Define the claim.** Keep it narrow and testable, and let domain experts set tolerances, noise levels and allowed tools.
2. **Find a starting task.** Reuse an existing benchmark or environment where possible, and read its instructions, reference solution and tests before trusting it.
3. **Run it unchanged, oracle first.** Run the reference solution before any model. If the oracle fails, fix the task before you read anything into model failures. The baseline model, gpt-oss-120b, passed 0 of 3 rollouts on the original task.
4. **Adapt the task.** The team built eight synthetic spectra with known parameters, extended the fit from two peaks to three, and stated units and parameters explicitly.
5. **Check the evaluation.** Run the oracle (it should pass), a no-op agent (it should fail) and a shortcut agent (it should fail).
6. **Run and read traces.** Group failures by cause. The adapted setup passed 11 of 24 rollouts. In 19 rollouts the model called `mark_task_complete` in its first response, and 11 of those never produced a results file.
7. **Report the score properly.** Use pass@k where retries are acceptable and pass^k where the agent runs unattended, with task-clustered standard errors.
8. **Compare models with the provider pinned.** Different providers serving the same model can behave differently. Of six models compared, three passed all 24 rollouts, so the development set could not rank them.

The guide uses Harbor, an open-source evaluation harness, for this. `harbor task init` scaffolds a task, `harbor run` executes it, and the `-a oracle` and `-a nop` agent options give you the reference and do-nothing runs from step 5.

## The checks most internal evals skip

### Test the verifier, not just the agent

The sharpest example in the guide is a shortcut. A verifier that only checked the final ratio accepted a script that read peak heights, guessed widths and divided one by the other. It returned the right ratio on all eight tasks without ever fitting a spectrum. Coding-agent evals have the same failure mode: a test suite that checks one output can be satisfied by special-casing that output. Before you trust a pass rate, write the cheapest cheating solution you can think of and make sure it fails.

### Grade the output, not the claim

Premature completion was the most common failure. With DeepInfra pinned as the provider, gpt-oss-120b declared the task complete before seeing any output in 22 of 24 rollouts. An agent saying "done" is not evidence. Grade the files, database state or test results the agent left behind. Microsoft's [API style study](/blog/ai-coding-agents-non-rest-apis), published the same day, used the same approach: compare the final API state with the expected one and accept any valid route to it.

### Report pass^k for unattended agents

pass@k asks whether at least one of k attempts succeeded. pass^k asks whether all k did. On the eight development tasks the gap was large: pass@3 was 7 of 8, but pass^3 was 1 of 8, with a mean pass rate of 0.46 (standard error about 0.11). If a person picks the best of several attempts, pass@k is the right number. If an agent runs on its own, from a CI trigger or a webhook, consistency is what you are buying, and pass^k is the honest metric.

### Write down every convention

Many early failures came from things the task never stated. The original task did not define its parameters, the data used decimal commas, and NumPy and SciPy were expected but not installed. Preinstalling dependencies changes the condition being measured, so the guide says to record it. For coding tasks, the equivalents are the test command, the expected Node or Python version, and the format of any output. The same discipline applies to everyday tasks you hand an agent: state the outcome and how it will be checked. In CodeBeast, a normal-mode task [asks clarifying questions and has you approve a PRD](/docs/how-a-task-runs) before building, which serves the same purpose.

## Maintaining the eval after release

The guide treats an eval as software with a change log. It cites OpenAI's audit of SWE-bench Verified, which found material issues in 59.4% of 138 problems examined, and Terminal-Bench 2.1, which fixed 28 of 89 tasks after user reports. Its recommendations:

- Keep a record of every error: the failed assumption, how it was found, what changed and which versions were affected.
- Keep validating after release, and plan when tasks will be refreshed.
- Ask whether the tasks support the capability you claim (construct validity), not only whether the code runs.

For open-sourcing, the guide suggests sharing task specifications and a public development split while keeping active test items in a gated dataset; sharing container definitions and pinned dependencies but not credentials; and publishing scores with uncertainty and cost, linked to traces. Its release checklist asks whether a reader can tell what the eval measures, how a do-nothing agent scores, and which flaws have been found.

## What this costs

Less than most teams assume. Inference for all six models on the worked example cost under $5 at list prices, with median tokens per rollout from about 6,000 for gpt-oss-120b to about 90,000 for MiniMax-M3.1-Flash. The expensive part is human time: designing the verifier, writing shortcuts and reading traces. That is also the part that makes the number mean something.

## Sources

- [Hugging Face: How to build and maintain an agentic evaluation](https://huggingface.co/blog/agentic-evals)
- [Microsoft for Developers: Do AI coding agents struggle with non-REST APIs?](https://developer.microsoft.com/blog/do-ai-coding-agents-struggle-with-non-rest-apis/)

## FAQ

### What is the difference between pass@k and pass^k?

pass@k counts a task as solved if any of k attempts succeeds, which suits settings where a person can retry or choose. pass^k counts it only if all k attempts succeed, which measures consistency for unattended agents. In Hugging Face's example, pass@3 was 7 of 8 tasks while pass^3 was 1 of 8.

### How do I know if my agent evaluation is broken?

Run three control agents before any model: the reference solution should pass, a do-nothing agent should fail, and a deliberate shortcut should fail. If any of those behave differently, fix the task or verifier first. Then read both passing and failing traces.

### Why do agent benchmark scores vary so much between setups?

The harness, environment and provider all affect results, not just the model. The guide cites a Terminal-Bench audit where changing only the agent harness moved accuracy by up to 29.9 points, and notes that providers serving the same model can differ through quantization and context limits.

### What tools does Hugging Face use for agentic evals?

The guide uses Harbor, an open-source evaluation harness, together with Terminal-Bench tasks, HF Jobs and HF Sandbox for compute and isolation, and the Agent Trajectory Interchange Format (ATIF) for traces. Results and traces are published as Hub datasets.
