core/evals/gsm8k_math
Shay bdb294eac3 feat(workbench): land B3.5-b/c/d/e — calibration evidence subject, B4a leeway gate, docs; runner-reproducible practice artifact
Completes the Wave M B3.5 consolidation slice (b–e), built on #728.

B3.5-b — calibration as a first-class evidence subject (`calibration_class`,
address `calibration:<class_name>`): RightInspector projection + Evidence
Chain Rail semantics (serving-discipline evidence, not runtime truth).

B3.5-c / B4a — nullable `LeewayEvidence` read model threaded through turn,
replay, cognition-proposal, and math-proposal surfaces, with a shared
absence-honest card. B4 is gated correctly: the tuple exists in typed data but
no producer populates it, so the card renders absence (verified: no non-null
producer in workbench/core/chat).

B3.5-d/e — UI-UX-GUIDE.md, b4-leeway-feasibility-gate.md, phase-a-residue-ledger.md.

Practice artifact — earn-it-for-real (runner-reproducible). The committed
`report.json` (additive earns PROPOSE @0.861, 95/5/50) is now emitted by a
deterministic runner rather than copied from the queue. `propose_runner`
gains `regenerate_practice_artifacts()`, which runs ONE sealed `resolve_pooled`
practice pass and writes BOTH report.json (the per-class ledger the calibration
reader consumes) and ratification_queue.json — two projections of one ledger,
coherent by construction and byte-reproducible. `runner.main()` delegates to
it (lazy import, no cycle), so both entry points produce the identical pair.
This closes the gap where a hand-copied report.json agreed with the queue but
no runner produced it. `resolve_pooled` is the aggressive sealed PROPOSE-regime
scorer (proposal-only/HITL, unsafe for serving, legitimate for
attempt-and-eliminate); wrong=5 is the sealed-practice learning signal, NOT the
serving wrong=0. No serving/derivation/reliability_gate source touched; the
practice lane is not in the serving-frozen SHA gate.

Validated:
- python -m pytest tests/test_workbench_{calibration,journal,replay,schemas}.py -> 31 passed
- python -m pytest tests/ -k "workbench or propose or learning_arena or practice"
  -> 190 passed (3 failing tests in test_adr_0175_phase2_practice_lane.py are
  PRE-EXISTING reds on clean origin/main: stale 4/0/46 assertions on build_report,
  which this change does not touch)
- report.json + ratification_queue.json: deterministic (run1==run2) and
  reproduced byte-identically by both `python -m ...runner` and `...propose_runner`
- pnpm build green; 144 UI tests across calibration/leeway/evidence/replay/
  doctrine-gates/routes-docs-drift all pass
2026-06-13 07:36:44 -07:00
..
adversarial
baselines
composition_validation/v1 feat: add gsm8k r1 reconstruction 2026-06-04 13:25:11 -07:00
confusers feat(adr-0182): cross-composer disagreement pooling — distractor 0014 + disguised-polarity refuse (confuser wrong 5->2) (#476) 2026-05-29 13:22:19 -07:00
dev
equivalence test(derivation): add ADR-0184 semantic replay equivalence harness 2026-06-10 14:35:22 -07:00
holdout_dev feat: add gsm8k r1 reconstruction 2026-06-04 13:25:11 -07:00
holdouts/v1
practice feat(workbench): land B3.5-b/c/d/e — calibration evidence subject, B4a leeway gate, docs; runner-reproducible practice artifact 2026-06-13 07:36:44 -07:00
public/v1
scoring
train_sample Merge pull request #546 from AssetOverflow/docs/reconcile-current-state-2026-06-03 2026-06-04 07:14:39 -07:00
contract.md
README.md
runner.py feat(adr-0174-phase5a): retire inert GSM8K scoring-path reader 2026-05-28 13:38:44 -07:00
verify.py

gsm8k_math — Curated Eval Split for the GSM8K Evaluation Lane

Status: ADR-0119.2. 200 cases authored. Schema source of truth: generate/math_problem_graph.py (typed dataclasses). Format: JSONL — one case per line.

Why this set is not drawn from GSM8K

The GSM8K eval lane (ADR-0119) treats the actual GSM8K corpus as a sealed holdout test set. To preserve that integrity, we author this dataset independently in the same style as GSM8K (grade-school word problems with integer answers and 1-8 reasoning steps) but using our own vocabulary and grammar, ensuring zero overlap with the sealed holdout.

The dataset measures the solver pipeline (parser → solver → verifier → realizer). A correctly-parsed and solved problem is one whose parser output matches the ground-truth graph byte-for-byte and solves to the expected answer and unit.

Case schema

Each line is one JSON object:

{
  "id": "gma-NNN",
  "problem": "<the natural-language word problem>",
  "expected_answer": <integer>,
  "expected_unit": "<unit string>",
  "ground_truth_graph": {
    "entities": ["<entity_1>", "<entity_2>", ...],
    "initial_state": [
      {"entity": "<entity>", "quantity": {"unit": "<unit>", "value": <number>}},
      ...
    ],
    "operations": [
      {"actor": "<entity>", "kind": "<add|subtract|transfer|multiply|divide>",
       "operand": {"unit": "<unit>", "value": <number>},
       "target": "<entity>"  /* required when kind=transfer; omitted otherwise */},
      ...
    ],
    "unknown": {"entity": "<entity>" | null, "unit": "<unit>"}
  },
  "patterns": ["<pattern_tag_1>", "<pattern_tag_2>", ...],
  "notes": "<authoring rationale>"
}

Field rules

  • idgma-NNN where:
    • gma-001 ... gma-050 are for the dev split.
    • gma-101 ... gma-250 are for the public split.
  • problem — one or more complete English sentences ending in a question. Use Title-Cased proper names for entities ("Sam", "Anna's Toy Box"). Be consistent: the same entity always spelled the same way in problem and ground_truth_graph.entities.
  • expected_answer — the integer answer to the question.
  • expected_unit — the unit string the answer is in. Must match ground_truth_graph.unknown.unit byte-for-byte.
  • ground_truth_graph.entities — tuple in order of first introduction in the problem text. Not alphabetical. No duplicates.
  • ground_truth_graph.initial_state — every entity that starts the problem with a known quantity. Empty list is legal if no initial possessions are asserted (rare).
  • ground_truth_graph.operations — in source-text order. Empty list is legal (e.g. multi-entity sum questions with no mutations).
  • ground_truth_graph.unknown.entity — set to the entity the question asks about, or null if the question asks for a total across all entities ("How many ... in total?"; "How many do they have altogether?").
  • patterns — tag list naming the constructions used. See Pattern registry below.
  • notes — author-supplied one-sentence rationale. Read by future reviewers when the parser fails this case.

Canonicalization rules

  • Units — lowercase, plural form ("apples", "candies", "dollars", "hours"). Use "dollars" for "$" quantities; the parser is expected to rewrite the "$" surface to the canonical unit.
  • Entities — preserve capitalization as written. Do not lowercase.
  • Numbers — integers when the text shows integers.
  • Operation kinds — exactly one of add, subtract, transfer, multiply, divide. Choose the one closest to the verb in the text:
    • "buys / gets / receives / earns / finds / adds" → add
    • "eats / loses / sells / spends / drops / uses / removes" → subtract
    • "gives / sends / hands / passes / mails / transfers" → transfer (and set target)
    • "doubles / triples / Nx as many" → multiply
    • "splits evenly into N / N% of / shares equally with N people" → divide

Scope limits (ADR-0119.2)

The parser and solver handle the following patterns and no others. Cases violating these constraints are out of scope:

  • NO Time-modal / conditional phrasing ("If Sam had 5 apples, ...") — out of scope. Use direct declarative phrasing only.
  • NO Rate/per-unit pricing requiring inference ("Each apple costs $2. Sam buys 4. How much does he spend?") — out of scope. A simpler variant ("Sam spends $8 on apples. How much does he have left?") IS in scope.
  • NO Multi-clause / compound-question problems ("How many does Sam have, and how many does Tom have?") — out of scope. One unknown per case.
  • NO Implicit-entity / generic plural ("There are 5 boys. Each has 2 apples.") — out of scope. Use named entities.
  • NO Comparative phrasing without explicit numbers ("Sam has twice as many as Tom") — out of scope. Use numeric multipliers only ("Sam has 2 times 3 apples").
  • NO metaphor or mixed units within one entity — out of scope. Keep units consistent.
  • NO numeric magnitude beyond integer scope — out of scope. Only use integers.

Pattern registry

When tagging a case under patterns, draw from this list.

Pattern tag Construction Example
initial_has " has ." "Sam has 5 apples."
initial_there_are "There are ." (no entity; rare) "There are 12 candies on the table."
operation_buy_more " buys more." "He buys 3 more."
operation_get_more " gets more ." "She gets 4 more pencils."
operation_find_adds " finds ." "Sam finds 2 apples on the path."
operation_eat_loses " eats ." "Tom eats 4 candies."
operation_lose_loses " loses ." "Anna loses 3 marbles."
operation_sell_loses " sells ." "Lisa sells 2 books."
operation_donate_loses " donates ." "Lisa donates 3 books."
operation_use_loses " uses ." "He uses 2 sheets of paper."
operation_give_transfer " gives to ." "Anna gives 3 marbles to Ben."
operation_send_transfer " sends to ." "Tom sends 4 letters to Sara."
operation_double " doubles ..." "Sam doubles his savings."
operation_triple " triples ..." "Sam triples his stickers."
operation_split_divide "splits/shares evenly" "They split 12 candies evenly."
question_how_many_entity "How many does have?" "How many apples does Sam have?"
question_how_many_left "How many ... left?" "How many candies does Tom have left?"
question_how_many_total "How many ... in total?" / "altogether" "How many stickers do they have in total?"
question_how_many_now "How many ... now?" "How many marbles does Anna have now?"