← govind p lal
AI and ML Bootcamp · Lecture 29 · lecture notes

Writing Evals for RL Labs (Harbor Framework Assignment)

In short — What does a person who writes evals for RL labs actually do, and what makes a good eval task? This lecture walks through a take-home assignment built on the Harbor framework. It covers the job, why labs need human-written tasks, the rules for a good task, and the checks to run before submitting.

The job of an eval writer

builds on Lecture 27: Evals, Benchmarks and RL environments | Super 30 Class ( Extra/Optional ), Lecture 27: Evals, Benchmarks and RL environments | Super 30 Class ( Extra/Optional ), Lecture 27: Evals, Benchmarks and RL environments | Super 30 Class ( Extra/Optional )

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).

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:

code changesrewardProblem + code baseAgent with modelSandbox runs testsScore (e.g. 3/10)Weights updated
How one eval task produces a reward for the model.

Why labs need human-written tasks

builds on Lecture 27: Evals, Benchmarks and RL environments | Super 30 Class ( Extra/Optional ), Lecture 27: Evals, Benchmarks and RL environments | Super 30 Class ( Extra/Optional ), Lecture 15: Week 14 - AI&ML | Fine-tuning - Part 3 | 17/04/2026
Problem

Open-source repos and issues were likely in pre-training data. Why write tasks at all?

Solution

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.

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

builds on Lecture 17: Week 16 - AI&ML | Offline: RL Environments for LLMs | 08/05/2026, Lecture 26: Week 26 - AI&ML | Evals | 11/07/2026
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

builds on Lecture 17: Week 16 - AI&ML | Offline: RL Environments for LLMs | 08/05/2026, Lecture 17: Week 16 - AI&ML | Offline: RL Environments for LLMs | 08/05/2026, Lecture 18: Week 17 - AI&ML | Harness, Context, and Evals | 09/05/2026

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:

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

builds on Lecture 26: Week 26 - AI&ML | Evals | 11/07/2026, Lecture 27: Evals, Benchmarks and RL environments | Super 30 Class ( Extra/Optional )

Offline and deterministic grading

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

builds on Lecture 26: Week 26 - AI&ML | Evals | 11/07/2026, Lecture 18: Week 17 - AI&ML | Harness, Context, and Evals | 09/05/2026

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:

score 0-60%too easy: redesignFind real issue / PRPin environmentWrite statementWrite weighted testsOracle + null run5 SOTA rolloutsGood eval
Task development loop.

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.