Writing Evals for RL Labs (Harbor Framework Assignment)
The job of an eval writer
Companies like Mercor and Scale AI hire experts (coding, medical, law) to write evals for AI labs. Pay is high and seasonal (around $60-100 an hour).
- Stage 1 - Pre-training: model trained on huge text. No humans needed.
- Stage 2 - SFT: manual data teaches question -> answer format. Few humans.
- Stage 3 - RL with human feedback: needs a lot of human data. This is where eval writers work.
The model attempts a task, gets a score (3/10 = bad, 9/10 = good), and tunes its weights from that reward.
Example
Initial code has a function sum(a, b). Task: add a subtract function. Expected output: return a - b. A good model gets 10/10; a wrong one gets less.
The writer has three jobs:
- Define the problem statement and starting code base.
- Write tests for what the model produces, e.g. subtract(0, 0) should be 0.
- Build the environment (a sandbox) where tests run and output a score.
Why labs need human-written tasks
Open-source repos and issues were likely in pre-training data. Why write tasks at all?
Having seen an issue is not the same as knowing how to reason through it. In RL, the model reads files, edits them as an agent, gets a score, and adjusts. Labs also use private code bases they bought.
- Pre-training: internet data is exhausted.
- SFT: limited, and its job is to make the model an assistant, not smarter.
- RL: the one place with effectively infinite data. One environment can be replayed again and again.
Classic example: a Flappy Bird AI. Input is the game state, output is press or don't press, reward is how far the bird gets. The network adjusts and retries. Running a model's code against tests is the same idea.
The model only gets a score, not a reason. It tries many paths (e.g. different top-probable tokens, different temperatures) and reinforces those that score high. It may never reach the right answer, but it raises the chance.
Evals can be used for benchmarks or for RL environments. Benchmarks are usually not released to labs, though labs may buy that data. Writing RL environments for training is the focus here.
The ambiguity trap
Example
Prompt: add a subtract function. The model writes minus(a, b). The test imports subtract, so the score is 0/10 even though the logic is right.
Better prompt: the function is named subtract and takes two numbers a and b.
A model failing because the statement was vague does not mean the eval is hard. It should fail only because it could not reason to the solution.
Work backward from the tests: every module path, exported symbol and string the tests import or assert must be stated in the problem statement.
The Harbor framework and the assignment
Harbor - a framework that lets you write evals (as LangGraph lets you write agents). Created by the team behind Terminal-Bench, which ranks agent + model combinations by how many tasks they solve.
Problem statement (markdown) has three sections:
- Description: the current limitation and why it matters.
- Expected behavior: clearly specified.
- Interfaces: any public API the model must write and export, with exact names and signatures.
The task is usually built from a real GitHub issue or merged pull request in an existing repo. Prefer a feature that spans multiple files.
What makes a good task
- Resembles a real software engineering feature, not an interview question or isolated bug fix.
- Needs understanding and modifying an existing code base, with meaningful design decisions.
- Long horizon: at least 100 tool steps (read file, write file, run patch, repeat).
- Hard for the best models: pass rate between 0% and 60% across five rollouts. If it passes more, the eval is weak and teaches nothing.
- Difficulty from reasoning, never from missing information.
Offline and deterministic grading
- No dependency on external services like a database or a weather API, which could go down mid-run.
- The same solution must always give the same score.
- Tests verify only behavior explicitly described in the statement. No hidden assumptions.
Example
A task from the Cloudflare worker SDK: a merged PR with zero dependencies, so the environment ran offline. Environment pinned to a specific commit and built with npm install. Statement derived from the tests.
Grader design and pre-flight checks
Partial credit with per-file weights. Tests that check the core functionality get heavy weight.
Example
subtract.test.ts gets 90% weight and meta.test.ts gets 10%. Even if the second file has 100 tests, it cannot outweigh the core file.
Three checks before running rollouts:
- Oracle run - apply your own reference solution. Must score 100% (10/10).
- Null run - leave the original code unchanged. Must score 0.
- Rollouts - run a state-of-the-art model five times. Score must fall in 0-60%. If it solves it consistently, make the task harder.
Glossary
- Harbor
- Framework for writing and running evals, from the team behind Terminal-Bench.
- Oracle run
- Running the tests against your own reference solution; it must score 100%.
- Null run
- Running the tests on the unchanged code base; it must score zero.