AGA-Stage-BC / README.md
Plans11's picture
Stage B/C datasets v1.0.0: 25k deep-CoT + 10k exec problems (+verify twin), manifests, audit, generators
cafb492 verified
|
Raw History Blame Contribute Delete
4.24 kB
# AGA-Code Stage B + Stage C Datasets
Procedurally generated, execution-verified training data for **AGA-Code**
(`aga_code.py`), built under Guy's no-distillation rule: **no teacher traces,
no third-party data — every instance is a procedurally generated original
with correctness established by running the code.**
## Files
| File | Content |
|---|---|
| `stage_b.jsonl` | Deep-CoT SFT examples: `instruction / think / critique / revise / answer / tests / family / difficulty / seed` — consumed by `stage_deepcot` (`<task>/<think>/<critique>/<revise>/<answer>` sections) |
| `stage_c.jsonl` | Problem bank for `stage_exec_grounded`: `instruction / tests / family / difficulty / seed / tier / mutation_score` — **no reference solutions** (training file) |
| `stage_c_verify.jsonl` | Same rows as `stage_c.jsonl` **plus `reference_solution`** — held out for our own verification, NEVER fed to the model |
| `manifest_v1.json` | SHA-256s, counts, seed, gate results, per-family distribution, held-out family list, audit summary |
| `BUILD_LOG.md` | Per-family counts, discard counts and reasons, design decisions, known warts |
| `audit_report_full.json` | Independent audit re-execution results (pilot: `audit_report_pilot.json`) |
## Construction
- **60 program-generator families** (string/list/dict ops, arithmetic,
recursion, sorting/searching, number theory, parsing, simple OOP) with
randomized parameters, 12 think skeletons, 7 grounded bug templates +
clean-critique templates — all seeded with **seed 1147** (`MASTER_SEED`).
- **Stage B**: each instance runs its reference + auto-generated tests; the
answer is kept only if the tests PASS. ~80% of examples pair the reference
with a real structurally-built bug (off-by-one, wrong operator,
missing return, wrong variable, wrong edge, swapped branch, missing case)
and a grounded critique/revise; ~20% are already-correct drafts whose
critique explicitly says no bug was found and whose revise is a no-op.
- **Stage C**: problems are kept only if (a) the tests pass on the reference
AND (b) at least one trivial-wrong solution fails the tests AND (c) a
mutation score (≥5 mutants, up to 10, killed by the tests) ≥ 0.6.
Instructions state the exact signature; examples are embedded worked
asserts. Three tiers: **easy** (5,000 — single-function problems so an 11M
model sees non-zero pass rates from the start), **standard** (3,500 —
fresh instances from Stage B families, in-distribution), **held_out**
(1,500 — whole families held out of Stage B, for transfer measurement).
- **Held-out families** (never in Stage B): `caesar_cipher, run_length_encode,
merge_sorted, prime_factors, collatz_steps, quicksort, csv_parse_line,
eval_expr, bank_account, matrix_multiply`.
- **Dedup**: SHA-256 on `(instruction, answer)` for Stage B,
`(instruction, tests)` for Stage C; seed-1147 shuffle; no family > 10%,
no instruction phrasing > 5%; no instruction overlap between Stage B and
Stage C (checked on normalized text).
- **Tokenizer note**: the build performs no model generation or decoding, so
no tokenizer is used; it is compatible with `aga_code.py >= v0.1.7`'s fixed
`TokWrapper` (ByteLevel decoder + `skip_special_tokens=False`).
## Generator provenance
- Generator seed: **1147**
- Generator script hashes (SHA-256): see `manifest_v1.json`
(`generator_sha256` — recorded as run)
- All 60 family names: see `manifest_v1.json` (`all_families`)
## Scale
- Stage B: **25,000** examples (50 families; 10 held out). Difficulty:
medium 12,680 / hard 7,546 / easy 4,774. Clean-critique fraction 20.4%.
- Stage C: **10,000** problems — easy 5,000 / standard 3,500 / held_out 1,500.
Mutation score per problem ≥ 0.857 as shipped (gate ≥ 0.6); tier means
0.996 / 0.993 / 0.972.
- Gates: 100% of Stage B answers pass their tests; 100% of Stage C tests
pass on references, reject a trivial-wrong solution, and kill ≥ 60% of
mutants; B/C instruction overlap **0** after drop + top-up.
- Independent audit (`audit.py`): 50/50 shipped answers pass, 50/50
hand-broken versions fail — PASS. See `BUILD_LOG.md` for the full story,
including the one known coverage wart (`fib_recursive` in Stage C).