File size: 5,725 Bytes
4f713aa fec0c33 4f713aa fec0c33 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | ---
license: mit
task_categories:
- text-generation
language:
- en
tags:
- code
- agent
- benchmark
- tool-use
- swe
pretty_name: SACB (Simple Agent Coding Benchmark)
size_categories:
- n<1K
configs:
- config_name: default
data_files:
- split: test
path: data/test-*
- split: extended
path: data/extended-*
---
# SACB — Simple Agent Coding Benchmark
A multi-turn agentic coding benchmark that needs **no Docker**. The model is
given a small but real repository, a deliberately narrow tool set, and a bug
report. It drives its own conversation until it declares itself finished, and is
then graded by running a test suite it was never allowed to see.
Built for [`llama-eval`](https://github.com/ggml-org/llama.cpp) (`--dataset agentic`),
but the records are self-contained and usable by any harness.
## Why it exists
Most agentic coding benchmarks need a container per task, because each one drags
in a different framework and toolchain. SACB deliberately restricts itself to
two languages with lightweight native sandboxes and a tiny dependency set, so a
run needs a venv and, for the TypeScript half, node — nothing more.
## Design
Three constraints, all deliberate:
**No shell, and no way to run the tests.** The only feedback channel is a
`lint` tool. A syntax or type error can be driven out mechanically; a logic
error has to be reasoned about. A harness that lets an agent iterate against the
test suite measures something closer to search than to understanding.
**Two edit tools**, one line-addressed and one content-addressed. Which one a
model reaches for, and whether it keeps line numbers straight after its own
earlier edit, is itself a signal.
**Tests never touch the working tree.** They are held outside it and copied into
a throwaway copy only after the agent stops, so they can be neither read nor
edited.
The expected tool set is `list_files`, `read_file` (with line-range narrowing),
`search`, `edit_lines`, `edit_replace`, `write_file`, `lint`, `finish`.
## Splits
| split | tasks | contents |
|---|---|---|
| `test` | 60 | the default benchmark |
| `extended` | 129 | everything validated, including the easy `ledger` tier |
The `test` split is a deliberate selection, not a sample. Difficulty here is a
property of *composition*: it is 10 single-defect tasks plus 50 compound tasks,
which is what places a leading small model in the intended band.
## Repositories
Every task is an overlay on one of three hand-written base repositories. The
base is the *correct* code, so the reference fix cannot fail to work.
| repo | language | size | role |
|---|---|---|---|
| `flow` | Python | 989 lines, 13 modules | workflow scheduler |
| `router` | TypeScript | 578 lines, 12 modules | HTTP router |
| `ledger` | Python | 417 lines, 6 modules | event-sourced inventory (easy tier, `extended` only) |
## Fields
| field | meaning |
|---|---|
| `task_id` | unique id |
| `repo`, `lang`, `category`, `difficulty` | metadata |
| `instruction` | the bug report shown to the model |
| `files` | JSON object: path → contents. The starting tree |
| `tests` | JSON object: hidden tests, **never** placed in the agent's tree |
| `gold` | JSON object: the reference fix, for validation |
| `fail_to_pass` | tests that must go from failing to passing |
| `pass_to_pass` | tests that must stay passing |
| `n_tests` | total tests |
`files`, `tests` and `gold` are JSON strings; parse with `json.loads`.
## Scoring
A task is **resolved** when every `fail_to_pass` test passes *and* no
`pass_to_pass` test broke. Report the fraction of `fail_to_pass` alongside:
many tasks carry several independent defects, and that fraction separates
"fixed two of the three faults" from "changed nothing".
`fail_to_pass` and `pass_to_pass` are **derived**, never hand-written — the
tests are run once against the defective tree and once against the reference,
and the sets fall out of the difference. A task whose defect no test exercises,
or whose reference fix does not itself pass, is rejected rather than shipped.
## Calibration
Measured against **Qwen3.5-4B** (Q6_K), 19 episodes on the hard repositories:
| tier | resolved |
|---|---|
| single defect | 3/5 |
| compound (2–4 defects) | 1/14 |
The `test` split projects **~16%** on those rates. Typical episode: 4–12 turns,
16–134k cumulative tokens (median ~40k), 4–11k peak context.
### What actually controls difficulty
Measurement contradicted the obvious guesses, so they are worth recording:
* **Repository size dominates defect count.** A *single*-defect task on `flow`
went unresolved while a *three*-defect compound on `ledger` resolved
completely. What makes these tasks hard is orienting in a repository too large
to read at once. To make the benchmark harder, add a larger repository — not
more defects per task.
* **Sub-defect success is correlated, not independent.** Two-defect compounds
resolve near 50%, not the 25% that multiplying probabilities predicts: the
expensive part is orienting in the code, and that cost is paid once and shared
across every defect in the same task.
* **Instruction vagueness barely matters.** Rewriting reports from diagnosis to
bare symptom moved the number far less than expected.
### A harness note worth heeding
If your harness ends an episode as soon as the model emits no tool call, you
will measure a **fake 0%**. Models routinely narrate their analysis in prose
mid-task; treating that as "done" ends the episode with no edits. Send a neutral
nudge and let it continue — roughly one episode in four exits that way.
## License
MIT. All repositories, defects and tests are original work written for this
benchmark; no upstream code is redistributed.
|