prophet / README.md
drkylj's picture
Add predictor spec and prompt; tasks get a Rules section; audit flags end-to-end solving
60f3845 verified
|
Raw History Blame Contribute Delete
10.3 kB
---
license: cc-by-4.0
pretty_name: FrontierCS 2 Score Forecasting (Harbor tasks)
tags:
- harbor
- agents
- forecasting
- frontiercs
---
# FrontierCS 2 score forecasting: Harbor tasks
Can a model watch part of an AI agent's research-engineering trajectory and forecast the scores of its next
submissions?
Every task is built from one run in
[`FrontierCS2/FrontierCS-2-runs`](https://huggingface.co/datasets/FrontierCS2/FrontierCS-2-runs) at revision
`06e2d551`, which has 48 tasks × 32 agents. A run with **n** scored submissions (train submissions, then the
final one) gives **n tasks**. Task `c` cuts the trajectory at the moment submission `c` is made.
The predictor sees exactly what the agent had seen up to that moment, in `/app/context/`:
| file | contents |
|---|---|
| `transcript.md` | the agent's model inputs and outputs, tool calls and tool results, in time order |
| `submissions.json` | earlier submissions, with the scores the agent had already seen |
| `submissions/<i>/` | the files of submissions 0..c; `submissions/c/` is the submission being judged |
| `run_info.json` | task, paper, agent, elapsed time |
| `targets.json` | which submissions to forecast |
It predicts the scores (0–100) of submissions `c`, `c+1` and `c+2`, or fewer at the end of a run. Train
submissions are scored on train workloads. The final submission is scored on hidden workloads, and that score is the
run's official FrontierCS score. A failed submission scores 0.
## Predictor spec
The predictor forecasts by **reading the given evidence and reasoning about it**. It does not solve the
FrontierCS task itself.
**Allowed:**
- Reading anything under `/app/context/`.
- Thinking and reasoning at length before answering.
- Lightweight analysis that only reads the context: grep or search the transcript, diff two submissions,
tabulate the scores already seen, and do small arithmetic such as averages, trends or extrapolating a curve over
the seen scores.
- Scratch notes in `/tmp` or `/app/notes/`.
**Not allowed:**
- **End-to-end solving.** No building, compiling, installing or running the submitted code or any part of the
task. No re-implementing or improving the solution. No writing or running benchmarks, verifiers or simulated
workloads to measure a score. The forecast must come from the evidence, not from a measurement.
- **Information outside `/app/context/`.** No network, web search or web fetch. No looking up this run, the
`FrontierCS2/FrontierCS-2-runs` dataset, leaderboards or the paper's published numbers. No reading other files
on the machine.
- **Changing the context.** `/app/context/` is read-only evidence.
**Required output** is `/app/prediction.json`: one score (a number from 0 to 100) for every target index in
`targets.json`, plus a short `rationale`. A missing or malformed file, or a missing target, counts as an error of
100 for that target.
**How it is enforced:**
- The sandbox holds only `context/`. There is no GPU, no task source tree, no verifier, and no hidden workload.
- Network is allowlisted to `api.anthropic.com`, and Claude Code's WebFetch and WebSearch are denied by managed
settings.
- `scripts/audit_network.py <job>` checks each trial's tool calls after the run and lists trials that reached
for the network, read outside `/app`, or built or ran task code. Drop flagged trials before reporting.
## Prompt
Every task's `instruction.md` follows the template below. `{c}` is the cut index, `{targets}` lists the target
submissions with their kind (train, or final on hidden workloads), and `{example}` shows the JSON shape for
those targets. The exact text for each task is in its `instruction.md`.
````markdown
# Forecast the scores of an AI agent's next submissions
You are watching an AI coding agent work on a research-engineering task from the **FrontierCS 2**
benchmark. The agent iterates: it edits code, submits a payload to a *train* verifier (which
returns a score on train workloads), and finally submits one *final* payload that is scored on
**hidden** workloads. Scores are on a 0-100 scale (higher is better); a submission that fails
verification scores 0.
The trajectory has been cut at the moment the agent submitted node **{c}** (0-based submission
index). Everything the agent saw up to that moment is in `/app/context/`:
- `run_info.json` - task, category, paper, the agent (model + harness), elapsed time at the cut.
- `transcript.md` - the agent's conversation up to the cut (model inputs/outputs, tool calls and
tool results, in time order; long items are truncated in the middle).
- `submissions.json` - every earlier submission: when it was made and, if the agent had already
seen it, its score, status and metrics. Results the agent had not yet seen are marked `pending`.
- `submissions/<i>/` - the files of submission `i` (for i <= {c}); `submissions/{c}/` is the
submission that was just made.
- `targets.json` - the submissions you must forecast.
## Rules
- Use only the files in `/app/context/`. No network, no web search, and do not try to find this
run, its dataset, or the paper's results anywhere else.
- Forecast by reading and reasoning. Think as long as you need: compare the submissions, read what
the agent tried and what it observed, and weigh the score history. Small calculations over the
context (diffs, greps, averages, trend fits) are fine.
- Do not solve the task end to end: do not build, install or run the submitted code or the task,
do not re-implement or improve the solution, and do not write benchmarks or simulations to
measure a score.
- Do not modify `/app/context/`.
## Your job
Predict the score of each target submission:
{targets}
Write `/app/prediction.json` exactly in this form (numbers on the 0-100 scale):
```json
{"predictions": [{example}], "rationale": "<a few sentences>"}
```
You are graded on absolute error per target (reward = mean over targets of max(0, 1 - |error| / 10)).
````
## Size
- **15,106 tasks** with 40,931 targets, from 1,471 runs that have at least one scored submission. The other 64
runs never produced a scored submission.
- `metadata/mlsys_task_ids.txt` lists 1,589 MLSys tasks: the GPU k-means, DBSCAN, IVF-PQ and k-NN kernels,
sparse video attention, vLLM serving, and fast KV compaction. They are used for a human-expert baseline.
## Layout
```
tasks/<fcs_task>.tar.zst 48 shards; each holds the task dirs <fcs_task>--<model>--c<NNN>/
metadata/task_index.json one row per task: fcs_task, model, cut, n_nodes, category, n_targets, ...
metadata/ground_truth.json task_id -> targets [{index, kind, score, status}] (same as tests/ in each task)
metadata/mlsys_task_ids.txt the MLSys subset
metadata/leak_audit.txt leak audit over all tasks (see below)
scripts/ extractor, task builder, grader, scorer, network audit (to reproduce or score)
```
Each task is a standard Harbor task:
- `instruction.md`
- `task.toml`, with a 30-minute agent timeout and the shared verifier mode
- `environment/Dockerfile`: `python:3.12-slim`, Claude Code 2.1.335 preinstalled, and managed settings that deny
WebFetch and WebSearch. The Dockerfile then copies `context/` to `/app/context/`.
- `tests/`: `test.sh`, `grade.py` and `ground_truth.json`. Harbor uploads them only after the agent finishes.
- `solution/solve.sh`, the oracle.
## Running with Harbor
```bash
hf download drkylj/prophet --repo-type dataset --local-dir fcs2-forecast
mkdir -p fcs2-forecast/tasks_x && for f in fcs2-forecast/tasks/*.tar.zst; do zstd -dc "$f" | tar -x -C fcs2-forecast/tasks_x; done
export ANTHROPIC_API_KEY=...
harbor run -p fcs2-forecast/tasks_x -a claude-code -m anthropic/claude-opus-5-5 --effort high -n 32 -y
# MLSys subset only: append one -i per id
# $(sed 's/^/-i /' fcs2-forecast/metadata/mlsys_task_ids.txt)
```
**Network.** `task.toml` sets `network_mode = "allowlist"` with `allowed_hosts = ["api.anthropic.com"]`. This
matters because the source dataset is public and holds the answers. Harbor's Docker backend enforces the allowlist
with an nftables sidecar, which needs a Linux kernel with `CONFIG_NFT_FIB_INET`. Recent EC2 kernels have it.
Old Docker Desktop VMs don't, and Harbor refuses to start the task there. Claude Code is baked into the image, so
nothing else is downloaded at run time. For a different model or agent, add its API host to `allowed_hosts`.
**Cost.** Transcripts have a median of 0.5 MB and a mean of 0.9 MB. Opus 5.5 at effort high is roughly $1–2 per
task.
## Scoring
`tests/grade.py` writes `/logs/verifier/reward.json` with:
- `reward`: the mean over targets of max(0, 1 − |error| / 10)
- `mae`
- `abs_err_k` for each target
- `valid`
It also copies the parsed prediction to `/logs/verifier/prediction.json`.
To score a whole job:
```bash
python scripts/score_forecasts.py --gt metadata/ground_truth.json --job <harbor job dir> --tasks-dir <extracted tasks dir>
```
This reports MAE, reward, the share of targets within 5 or 10 points, direction accuracy (the sign of the change
from the last score the agent had seen), and Pearson correlation. Results are broken down by horizon, by
train vs final, and by task.
## How the tasks were built and checked
- **Extraction** (`scripts/extract.py`): normalizes all three trace formats: gateway traffic (Chat Completions,
Responses and Anthropic Messages), Claude Code stream-json, and Pumpkin run records. Each run becomes:
- a list of submissions (nodes) with submit time and result-visible time;
- a chronological transcript;
- the submitted payloads.
- **Infrastructure failures:** attempts that never ran have no score and are not nodes, e.g. a train call refused
with `VcpuLimitExceeded`.
- **Leak audit** (`scripts/leak_audit.py`): every target score was searched for, to 4 decimals, in the files the
predictor can see.
- 32,877 targets don't appear at all.
- 5,350 are trivial scores (0 or 100).
- 2,645 equal a score that had already been shown.
- 59 remaining hits were each checked. They come from the agent's own local evaluation printing that number
before submitting, or from an earlier score sharing the same 4 decimals. None leak information from after the cut.
- **Oracle:** `solution/` scores reward 1.0 under both Harbor's Docker and Singularity backends.