HatcheryHome

What is an eval?

Before you can improve how an AI model performs, you have to measure what it can do today. An eval is a test for a model: you give it a task, check its work, and record a score.

Scores turn vague impressions into concrete comparisons. Run the same eval on 2 models and you see which model handles the job better. Run it again when a new release lands next month and you see whether performance actually moved.

A benchmark is a shared set of evals that people agree to compare on, and a leaderboard is simply those scores sorted. Below, 3 models are graded on the same 8 questions.

Example

3 models answer the same 8 questions.

Model A0/8
Model B0/8
Model C0/8

Same questions, same grading, so the scores can be compared. Model C does this job best.

From prompts to simulations

In 2023, when teams first started building products on large language models, an eval usually meant a list of prompts paired with expected answers. A script compared each reply against the answer key. That setup made sense while models only answered standalone questions.

Models have since become agents. An agent works across many steps: it reads files, searches records, runs code, talks to people, and changes shared state. A single reply tells you very little about whether an agent can handle that kind of work, so the test has to give the agent a workspace to operate in.

Evals have moved from prompt tests toward full simulations as a result. The shape of the test stays the same: a task goes in and a grade comes out. A simulation puts more of the real job inside the test and grades more of what the agent did.

Example

Both are the same kind of test: a task goes in and a grade comes out.

2023Prompt test

1 step. The grader compares the reply with an expected answer.

NowSimulation

Hundreds of steps. The grader checks what the agent left in the world: the messages it sent, the meeting it booked, and the report it wrote.

The simulation puts more of the real job inside the test, so its grade says more about the real job.

The direction is toward high-fidelity tests that faithfully reproduce the real working environment. The closer the test sits to the real job, the more its score predicts performance on that job.

A simulation exam for agents

An RL environment is a simulation exam for agents. You drop an agent into a simulated scenario, let it work through the problem, and grade how it performed.

Aviation uses the same idea for a pilot's simulator check. An examiner sets up a scenario, such as an engine failure on takeoff, watches how the pilot handles it, and scores both the outcome and the procedure. Every pilot faces the exact same scenario, and no aircraft is put at risk.

For a software developer, an RL environment is the modern form of an end-to-end test, where the system under test is the agent. The harness builds a realistic world, lets the agent run a full session, and inspects the state the session leaves behind.

Take a biology example where an agent investigates a cell culture that stopped growing. Play the run below to watch it work through the lab records, then watch the grader score its report 4 of 5 for a reward of 0.8.

Example

The agent works first, then the grader checks its report.

TaskBatch 12 stopped growing on day 4. Find the likely cause and propose a fix.

 

Grader
  • Read the growth curve
  • Checked the glucose log
  • Compared feeds with the protocol
  • Named the missed feed as the cause
  • Proposed a test to confirm the cause
Reward?Agent is working

The grader scores the finished report against 5 criteria a scientist wrote. Meeting 4 of 5 earns a reward of 0.8.

The agent found the root cause and missed 1 follow-up step, earning partial credit. A single run of an agent through a scenario is a trial, and the score the grader gives that trial is its reward.

The 4 parts of a task

Each scenario inside an RL environment is a task, and every task breaks down into 4 parts.

Hidden from the agentInstructionwhat the agent is asked todoAgentEnvironmentfiles, tools, data, and peopleThe agent's workVerifierthe grader that scores theworkRewarda score from 0 to 1

The same 4 parts describe knowledge work across biology, law, and software engineering.

Example

Choose a field. Every task has the same 4 parts.

Instruction

Batch 12 stopped growing on day 4. Find the likely cause and propose a fix.

The agent sees this
Environment
  • Growth curve
  • Glucose log
  • Protocol
  • Lab notes
The agent sees this
Verifier

Checks the named cause against the measured one, then scores the reasoning on a scientist's 5 criteria.

Hidden from the agent
Reward

0.84 of 5 criteria met

Hidden from the agent

The agent sees the instruction and the environment. The verifier and the answers it checks against stay hidden, so the agent cannot copy them.

Biology: Batch 12 stopped growing on day 4. Find the likely cause and propose a fix. Reward 0.8.

Of the 4 parts, the grader is where a domain expert has the highest leverage. Coding and lab tasks can sometimes check an answer directly against a test suite or a measurement. More subjective work calls for expert judgment written down as clear criteria that a script or a judge model can apply, such as "names the missed feed as the cause." Strong graders often combine both: they check that the outcome holds up and that the reasoning behind it is sound.

What you can verify, you can optimize

Checking an answer is often far easier than producing it. A sudoku is hard to solve and quick to check; a proof is hard to write and far easier to follow. In machine learning, this asymmetry is called the generator-verifier gap.

How does that gap turn a test into something a model can learn from? Whenever a program can grade the work automatically, a model can attempt a task repeatedly, receive a score on every attempt, and update toward the attempts that scored well. Even when answers are slow to write, fast grading lets training run round after round until the pass rate climbs.

Example

Each round, the model writes 8 answers and the grader checks each one.

Time to write 8 answers
Time to check them
 Round 1
 Round 2
 Round 3
 Round 4
 Round 5

Checking is quick, so every answer gets checked. Training nudges the model toward the answers that passed, so more pass each round.

The loop is often pictured as a builder bot that generates attempts and a teacher bot that grades them. The grader decides what the machine learns, and people design the grader.

A good eval therefore does 2 jobs. It measures how capable a model is today, and in the right form it tells training which direction is better.

An RL environment is an eval in a training form

RL stands for reinforcement learning, where a model learns by acting, receiving a reward, and doing more of what earned higher scores. An RL environment is an eval built in the form that reinforcement learning algorithms consume.

To support training, that form requires 3 properties:

  • Numeric reward: Every trial ends in a number, produced by the grader from the agent's work.
  • Automated grading: A program computes that score with no person grading each trial, so training can run thousands of trials.
  • Clean resets: The environment resets to the exact same starting state, so every attempt faces the same task.

Training algorithms differ in how they turn those rewards into updates. REINFORCE, the classic method, makes each action more likely in proportion to the reward that followed it. GRPO, introduced with DeepSeekMath and behind recent reasoning models, runs a group of attempts at the same task, such as 4 tries in parallel, compares each try with the group's average, and moves the model toward the attempts that beat that average.

Example

The model tries the same task 4 times, then trains and tries again.

Round 1 of 5

Each try is compared with the group's average. Tries above it become more likely and tries below it less likely, so the average rises each round.

Harbor is an RL environment format built for agents that work inside a sandboxed computer. A Harbor task is a folder with an instruction, a container for the environment, and tests that write the reward. Hatchery runs Harbor tasks.

Every RL environment is an eval, while many evals remain measurement tools only. A team that only wants to measure performance can grade by hand, test standalone prompts, or review a single long project. An eval needs the RL form when you want to train with it.

What makes a good RL environment

Training improves a model through hill climbing. Picture a mountain range where altitude is the reward. Every spot on the ground is a slightly different version of the model, and the highest summit is the best version.

Now imagine walking that terrain blindfolded. You have no map and cannot see the peak. All you can feel is whether a small step takes you higher, so you take a step, compare, keep it when it goes up, and repeat. Training navigates in the same way, and trials are its sense of touch.

A walker that only ever steps uphill stops at the first small peak it reaches, even when a taller summit rises across the valley. Training gets around this with randomness: every so often it accepts a step downhill, and a lucky sequence of those steps carries the walker across the valley to the higher peak.

Example

Each robot is blindfolded. It can only feel whether a step goes up or down.

ScoreSmall peakHighest peak
Average score 0.36

A robot keeps any step that goes up, and now and then keeps one that goes down. Robots on the left get stuck on the small peak until a lucky run of steps carries them across.

Average score 0.36.

Because the grader sets the altitude at every spot, the task author shapes the mountain. A good RL environment is a mountain a blind walker can climb.

Give partial credit

When a task scores only 0 or 1 and the agent almost always fails, the ground feels flat in every direction. Every step returns 0, so the walker wanders and learns nothing. The summit sits atop a sheer cliff, and only luck ever finds it.

Reward shaping turns that cliff into a climbable slope. Awarding partial credit for partial progress, such as finding the right record or naming the right cause with a weak fix, tells the walker which way is up.

Example

Switch between all-or-nothing scoring and partial credit.

ScoreTop
Average score 0.04

All or nothing makes the ground flat everywhere except the top, so the robots wander and only luck finds it. Partial credit tilts the ground toward the top.

Average score 0.04.

A task the model already solves every time creates the opposite problem: the walker starts on the summit with nowhere left to climb. The most useful tasks leave headroom, where the model succeeds some of the time and fails often enough to leave something to learn. Finding those tasks takes deliberate search, since tasks experts write by hand are often too easy for frontier models.

Climb the right mountain

The walker climbs whatever slope the grader actually creates. When a grader rewards work that merely looks right, such as a confident tone or expected keywords, the walker climbs straight to that peak, even if it sits far from the work that is right. This is reward hacking.

The task author's job is to align the grader's mountain with the mountain of the real job, so the highest reward goes to work an expert would actually accept.

Example

The solid line is what the grader rewards. The dashed line is the real job.

ScoreGrader's peakThe real job's peak
Grader score 0.32 · Real job 0.24

The robots climb whatever the grader rewards. A grader that rewards keywords leads them to its own peak, where the real work is poor.

Grader score 0.32. Real job 0.24.

This is why keyword checklists make weak graders: an agent quickly learns to say the keywords. Criteria that test substance, paired with outcomes checked against measured results, keep the 2 peaks together.

Keep the ground steady

A noisy grader shifts the ground beneath the walker's feet. When the exact same submission scores 0.4 on one run and 0.8 on the next, a single step cannot tell a better move from a lucky roll.

Noise slows the climb without stopping it. If the grader is right on average, its errors cancel out over many steps and the walker still reaches the top, only later. A biased grader is the bigger danger: when it is consistently off in one direction, it moves the peak itself, which is the wrong-mountain problem above.

A low-variance grader is still worth the effort, because every bit of noise costs training time. Test the grader itself: grade the same work several times and confirm the score holds steady. Averaging several trials per task also smooths out variance and keeps the ground level.

Example

Switch to a noisy grader. The robots stagger but keep climbing.

ScoreTop
Average score 0.36 · Step 0

A noisy grader gives the same work a different score each time, so some steps go the wrong way. The errors cancel out on average, so the robots still reach the top, only more slowly.

Average score 0.36.

Next steps

The Introduction maps these concepts onto Hatchery's tasks, trials, and jobs, and the Quickstart walks through running your first task.