Bench: everything the grader needs, seed tables, raw files split out
All the data to run and grade the benchmark is now here; the code repo (c2a-bench/Context2Agent-Benchmark) holds only code and scripts/fetch_bench.py, which rebuilds every task file from this dataset.
- cases.json: each ticket has
grading, the grader's fields not already in its other columns. - seed/.json: the records the graded tickets run against, one row per record, shown as 19 viewer tables.
- grader/: rules, facts and fact tags per stage, Rincomplete's unknown.json, and format.json.
- stages//raw.json: each doc's exact file, moved out of docs.json (Skyway stage 0 docs.json: 85 MB -> 40 MB for the website).
Checked: fetch_bench.py output is byte-identical to the original task folders (74,705 checks), and the grader's fixture checks pass on every stage. All 36 viewer tables load.
Review of this PR (read from inventory.json and the redwood-inference files; Skyway files and fetch_bench.py not read). Main finding: several things are stored more than once. Proposed changes below.
Before (this PR): 160 files, 103 MB (main was 68 files, 99 MB)
<domain>/
βββ task.json Β· architectures.json
βββ grader/
β βββ rules.json facts.json fact_tags.json format.json stage 0
β βββ stages/stage1..5/{rules,facts}.json stages 1β5
βββ seed/<table>.json
βββ stages/<n>/
βββ docs.json raw.json changes.json
βββ cases.json train.json examples.json instruction.json
After (proposed)
<domain>/
βββ task.json Β· architectures.json
βββ train.json once per domain
βββ format.json order, indent, key order of every rebuilt file
βββ seed/<table>.json non-empty tables only
βββ stages/<n>/ same numbering everywhere
βββ docs.json every original field + text, stored once
βββ changes.json
βββ rules.json facts.json delta per stage
βββ test.json was cases.json; rule and fact ids; customer-fact tags kept here only
βββ instruction.json
What is duplicated today
train.jsonis identical in every stage of a domain, and is the same 18 tickets asexamples.json.- Support-agent-knowledge
cases.jsonis identical in stages 0, 1, 3 and 4. - Doc text is in both
docs.jsonandraw.json(51 MB). The repo grew 99 β 103 MB even thoughdocs.jsonshrank. - Rule text is in
cases.json,grader/rules.json,grader/stages/*/rules.jsonandchanges.json. Stage 1 rules repeat 17 of stage 0's 20 unchanged. - Customer-fact annotations are in
cases.json,facts.jsonandfact_tags.json.facts.jsonis generated from the other two. - Six empty
[]files (and 60-byte emptychanges.jsonat stage 0).
Changes
| # | Change | Removes | Needs |
|---|---|---|---|
| 1 | docs.json keeps all original fields; drop raw.json. fetch_bench.py writes doc files from it using format.json |
raw.json (51 MB), doc text copies |
format.json extended with per-doc key order and indent. Verify with the existing byte-identical check |
| 2 | train.json once per domain; delete examples.json |
5 + 7 per-stage copies | README configs point to the one path; fetch_bench.py rebuilds the old examples.json shape |
| 3 | One cases.json for support-agent-knowledge if stages stay identical |
3 copies (1 MB) | Configs share a data_files path |
| 4 | Rules once, as a delta per stage; cases.json and changes.json carry ids |
3 of 4 copies of rule text | fetch_bench.py merges stages 0..n, as the site does for docs |
| 5 | Drop fact_tags.json; keep decisive / why / decides in cases.json |
1 of 3 fact copies | build_facts.py reads cases.json |
| 6 | Move grader/ into stages/<n>/; same numbering (no stage1 vs 1) |
the stage-0 special case | path updates in code repo |
| 7 | Don't store empty tables or empty changes.json |
7 files | fetch_bench.py creates empty tables |
| 8 | Rename cases.json β test.json, pairing with train.json |
the naming mismatch | README configs: paths, fetch_bench.py, viewer loaders, format.json keys; runs pinned at a5a6c6c still use cases.json, so the viewer reads both or the runs are re-pinned. Do it in the same change as the rest |
Optional, for the website: Skyway stage 0 docs.json is 39.6 MB and is nearly all of the site's load. Make it an index (metadata + text hash) and load text on demand from sharded files, as the runs PR does with content/texts/.
Not checked: whether all docs round-trip byte-for-byte from docs.json + format.json, whether the grader depends on case order, whether redwood-inference and support-agent-knowledge seed tables overlap, and the 36 viewer tables.
Thanks, all 8 are in (commit 84fa92f): 109 MB β 55 MB, 161 β 122 files.
<domain>/
βββ task.json stages[].files (what each stage folder has), tests_from (packs sharing tickets)
βββ architectures.json skyway-air
βββ format.json how fetch_bench.py writes every file back, byte for byte
βββ train.json practice tickets, once (train split of every stage)
βββ train_seed/<table>.json
βββ seed/<table>.json non-empty only
βββ stages/<n>/
βββ docs.json each doc's original fields (`file`), born, edited
βββ changes.json only when something changed; rule_changes = id, status, what (+ diff)
βββ rules.json facts.json new or changed at this stage
βββ test.json rules as ids + the facts they need
βββ instruction.json
Differences from the proposal:
- 2: Redwood adds practice tickets at stages 4 and 5, so
train.jsonhas astagecolumn (first stage the builder has it). The practice tickets' sample records (Skyway adds some at stages 3β4 with no new ticket) are intrain_seed/. - To share one
train.jsonacross the stage configs, test rows also havestage,gradingis JSON text, and practice rows' tags are empty (their values are ingrading). Without that the viewer can't align the splits. - 5:
fact_tags.jsonis rebuilt from the tickets' facts; one Skyway ticket lists them in another order, kept informat.json.
Checks:
- Docs round-trip from docs.json + format.json: yes, all of them. Only one practice file (SAK
examples/seed/api_keys.json, hand-formatted) is kept as text in format.json.fetch_bench.pyfilled from this commit gives task folders byte-identical to the originals (all 12,861 files). - Grader and case order: order is kept. format.json stores each grader file's ticket order, so
tests/cases.jsoncomes back identical. - Redwood / SAK seed overlap: small. Tickets 0 shared (48 same id, different content), customers 9 of 15, api_keys 12 of 14, requests 1 of 3. SAK's whole seed is 44 KB, so I kept them separate.
- Viewer tables: 17 now (the seed tables were taken out earlier); all load with train + test.