A seeded, recomputable benchmark for AIA G702/G703 pay-application review, with a generator, an arithmetic/entitlement oracle, a scorer, model-free floors, and the small-model studies run on it so far.
The original goal was a fine-tuned multimodal Qwen3.8-27B that outperforms frontier models on this task. That has not been shown: the 27B model has not been trained, and no frontier model has been scored on the full benchmark. What the repository does establish is in Status below.
Each month a contractor submits a G702 (application summary) + G703 (schedule of values) with invoices, lien waivers, and change orders. Plumb ingests the documents and emits PASS or line-level exceptions with corrected figures — every math error, retainage slip, double-counted change order, unbacked waiver, and over-certified line.
Third of four parallel repos (specula, suture, plumb,
habeas) on one shared methodology (docs/methodology.md). Independent and
operable in parallel.
- Pure document-to-structured-data + deterministic reconciliation — the recipe of ReconForge (a separate repository; its results are not reproduced or checked here), at a larger model size. Extraction is the only uncertainty and a verifier catches it.
- Dollar-denominated, recurring work. Pay applications are reviewed per project, monthly, at every tier. (Earlier revisions quoted rejection and on-time-payment rates and a competitive-gap statement here without a source; they are removed until one is cited.)
- Perfect-level target is crisp: every check is recomputable arithmetic. The verifier gives dense, deterministic RLVR rewards.
- Ingest G702 + G703 (PDF/scans or Procore/QuickBooks/Sage exports) + the contract SOV, prior approved apps, approved change orders, retainage rules, attached lien waivers.
- Extract every SOV line (% complete, this-period, cumulative, balance) and the G702 summary totals.
- Verify arithmetic; cross-check against contract/current SOV, prior approved cumulative, change-order entitlements, retainage, waivers.
- Emit
PASS | FLAG+{type, severity, line, observed, corrected, citation, correction}. That is the design intent, not a deployment claim: the benchmark is synthetic, nothing here has been run on a real pay application, and the output is not legal, accounting or lien-law advice. A person signs off on every payment.
Benchmark v0.2, seed 777, 1000 tasks, 770 FLAG. The floor and Path A numbers are regenerated from committed inputs and checked in CI; the 7B line is a stored result.
Model-free floors (make floors, docs/FLOORS.json):
| Predictor | sw-recall | HIGH recall | precision | FP/task | verdict acc. |
|---|---|---|---|---|---|
| always PASS | 0.000 | 0.000 | n/a (0 emitted) | 0.00 | 0.230 |
| flag every type | 1.000 | 1.000 | 0.112 | 7.99 | 0.770 |
| flag every HIGH type | 0.594 | 1.000 | 0.112 | 3.55 | 0.770 |
| one random type | 0.125 | 0.132 | 0.122 | 0.88 | 0.770 |
| context-only rule (never reads the form) | 0.226 | 0.224 | 1.000 | 0.00 | 0.440 |
| oracle that reads only the first and last line | 0.992 | 0.987 | 1.000 | 0.00 | 1.000 |
| oracle (gold) | 1.000 | 1.000 | 1.000 | 0.00 | 1.000 |
Flagging every type scores severity-weighted recall 1.000 and verdict accuracy 0.770. A recall figure is not evidence of review without precision, FP/task and verdict accuracy beside it. An oracle that looks only at the first and last schedule line keeps 0.992 of the severity weight, because line-level injections sit at fixed positions; a model can learn the position instead of the check.
Gold corrected figures: 0 of 780 monetary gold strings reject the true cent-exact value (v0.1 stored them with :g; see docs/DECISIONS.md, benchmark v0.2).
Trained 1.7B text adapters, Path A, n=1000, one training seed per arm, arms differ in train size (hand-seeded 223, Ornith-only 58, blend 281) (make path-a, docs/PATH_A_PAIRED.json):
| Arm | sw-recall | HIGH recall | precision | FP/task | verdict acc. | flags PASS tasks |
|---|---|---|---|---|---|---|
| hand-seeded | 0.318 [0.290, 0.347] | 0.336 | 0.308 [0.279, 0.337] | 0.69 | 0.771 | 0.926 |
| Ornith-only | 0.241 [0.214, 0.268] | 0.287 | 0.111 [0.098, 0.124] | 1.74 | 0.768 | 0.996 |
| blend | 0.334 [0.306, 0.363] | 0.365 | 0.374 [0.342, 0.406] | 0.53 | 0.720 | 0.783 |
Paired differences, blend minus hand-seeded (same 1,000 tasks, 10000 resamples): severity-weighted recall +0.016 [-0.015, 0.047], HIGH recall +0.029 [-0.018, 0.076], precision +0.066 [0.035, 0.097], verdict accuracy -0.051 [-0.072, -0.029]. Against always-FLAG (0.770) on verdict accuracy: hand-seeded +0.001 [-0.010, 0.012], Ornith-only -0.002 [-0.005, 0.000], blend -0.050 [-0.074, -0.026]. No arm separates above the floor on the PASS/FLAG decision.
Benchmark v0.3 (position twin), seed 777, position seed 303: the same 1000 tasks with the same gold exception types on 1000 of 1000, but line-level injections sit on a random line (367 tasks differ in content). Line-level gold on the first or last line: 340 of 346 on v0.2, 124 of 346 on v0.3. v0.2 and v0.3 are different benchmarks; a row names its version.
Shortcut gap, v0.2 minus v0.3, same predictor, paired by task (10000 resamples; make gap, docs/SHORTCUT_GAP.json):
| Predictor | sw-recall v0.2 | sw-recall v0.3 | gap [95% CI] | verdict acc. v0.2 | v0.3 |
|---|---|---|---|---|---|
| oracle that reads only the first and last line | 0.992 | 0.770 | +0.222 [0.194, 0.251] | 1.000 | 0.877 |
| five position-tied cues, no arithmetic | 0.511 | 0.265 | +0.247 [0.221, 0.274] | 0.722 | 0.482 |
| the same plus one line-1 subtraction | 0.669 | 0.298 | +0.371 [0.341, 0.401] | 0.812 | 0.504 |
| five position-blind cues, no arithmetic | 0.519 | 0.519 | 0 (identical on every task) | 0.722 | 0.722 |
| flag every type | 1.000 | 1.000 | 0 (identical on every task) | 0.770 | 0.770 |
| oracle (gold) | 1.000 | 1.000 | 0 (identical on every task) | 1.000 | 1.000 |
Controls: 4 predictors that cannot read position have a gap of exactly 0: true; 2 that read only position have an interval excluding 0: true. Rules that never recompute a figure reach verdict accuracy 0.722 on both files; the best model-free row by verdict accuracy is cues_position_fixed_plus_sub (0.812) on v0.2 and flag_all (0.770) on v0.3. A model row is compared with that row, not only with always-FLAG.
Locally trained baseline: a 78,857-parameter transformer over hand-built numeric line features, not a language model. 40 runs (2 arms x 2 training files x 10 seeds), fixed recipe, no search; intervals resample seeds and tasks (make trained-baseline, docs/TRAINED_BASELINE.json):
| Arm | sw-recall v0.2 | sw-recall v0.3 | gap [95% CI] | verdict acc. v0.2 | v0.3 | v0.3 minus best model-free row [95% CI] |
|---|---|---|---|---|---|---|
| position input, trained on fixed positions | 0.694 | 0.598 | +0.096 [0.076, 0.119] | 0.804 | 0.745 | -0.025 [-0.059, 0.009] |
| position input, trained on random positions | 0.665 | 0.666 | -0.001 [-0.010, 0.007] | 0.794 | 0.795 | +0.025 [-0.007, 0.056] |
| no position input, trained on fixed positions | 0.699 | 0.695 | +0.004 [-0.001, 0.009] | 0.801 | 0.801 | +0.031 [0.001, 0.061] |
| no position input, trained on random positions | 0.698 | 0.698 | -0.001 [-0.005, 0.004] | 0.807 | 0.807 | +0.037 [0.008, 0.067] |
The model with a position input, trained on fixed positions, loses recall when the injection moves (interval excludes 0: true); trained on random positions it does not (interval includes 0: true). Random minus fixed training for that arm is -0.029 [-0.042, -0.016] on v0.2 and +0.069 [0.046, 0.094] on v0.3: the two files rank the two models in opposite order (both intervals exclude 0: true), so a v0.2 score alone does not separate a checker from a position reader. On v0.2 the four trained cells sit -0.018 to -0.005 from the best model-free row on verdict accuracy. Observed effort for the 40 runs: 911 CPU-seconds on one thread each, peak memory 453 MB, no GPU, no model API call, external cost USD 0. Language-model rows on v0.3 are in the next section: no trained cell above is a language model, has been scored on v0.3.
Zero-shot open-weights language models on the text track, v0.2 and v0.3 (make lm-row-check, docs/LM_ZERO_SHOT.json; raw completions in docs/artifacts/lm_zero_shot/; protocol frozen before the run, docs/DECISIONS.md R10). The prompt prints every field the oracle reads and the nine types with their severities. Each model answered a hash-ordered subsample that a clock ended, not the full file: Qwen2.5-0.5B-Instruct (Q4_K_M) 44 of 200 planned tasks; Qwen2.5-1.5B-Instruct (Q4_K_M) 31 of 100 planned tasks. Greedy decoding, CPU only, no fine-tuning, no few-shot examples.
| Row | n | sw-recall v0.2 [95% CI] | v0.3 [95% CI] | precision v0.2 | v0.3 | verdict acc. v0.2 | v0.3 | located recall v0.2 | v0.3 | parse rate v0.2 |
|---|---|---|---|---|---|---|---|---|---|---|
| Qwen2.5-0.5B-Instruct (Q4_K_M) | 44 | 0.000 [0.000, 0.000] | 0.000 [0.000, 0.000] | 0.000 | 0.000 | 0.114 | 0.136 | 0.000 | 0.000 | 0.591 |
| always PASS, same 44 tasks | 44 | 0.000 | 0.000 | n/a | n/a | 0.204 | 0.204 | 0.000 | 0.000 | 1.000 |
| five position-tied cues, no arithmetic, same 44 tasks | 44 | 0.615 | 0.263 | 1.000 | 1.000 | 0.818 | 0.455 | 0.000 | 0.000 | 1.000 |
| five position-blind cues, no arithmetic, same 44 tasks | 44 | 0.615 | 0.615 | 1.000 | 1.000 | 0.818 | 0.818 | 0.000 | 0.000 | 1.000 |
| rule program on the same text (regex + Decimal, no model), same 44 tasks | 44 | 1.000 | 1.000 | 1.000 | 0.980 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
| Qwen2.5-1.5B-Instruct (Q4_K_M) | 31 | 0.000 [0.000, 0.000] | 0.000 [0.000, 0.000] | n/a | n/a | 0.258 | 0.258 | 0.000 | 0.000 | 1.000 |
| always PASS, same 31 tasks | 31 | 0.000 | 0.000 | n/a | n/a | 0.258 | 0.258 | 0.000 | 0.000 | 1.000 |
| five position-tied cues, no arithmetic, same 31 tasks | 31 | 0.645 | 0.281 | 1.000 | 1.000 | 0.871 | 0.516 | 0.000 | 0.000 | 1.000 |
| five position-blind cues, no arithmetic, same 31 tasks | 31 | 0.645 | 0.645 | 1.000 | 1.000 | 0.871 | 0.871 | 0.000 | 0.000 | 1.000 |
| rule program on the same text (regex + Decimal, no model), same 31 tasks | 31 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 | 1.000 |
Qwen2.5-0.5B-Instruct (Q4_K_M) minus the position-blind cue floor: sw-recall v0.2 -0.615 [-0.763, -0.472], Holm p < 0.0024, below; verdict accuracy v0.2 -0.705 [-0.841, -0.545], Holm p < 0.0024, below; sw-recall v0.3 -0.615 [-0.763, -0.472], Holm p < 0.0024, below; verdict accuracy v0.3 -0.682 [-0.818, -0.523], Holm p < 0.0024, below. Its v0.2 minus v0.3 gap: sw-recall +0.000 [0.000, 0.000], Holm p 1.0000, not separated from 0; verdict accuracy -0.023 [-0.068, 0.000], Holm p 1.0000, not separated from 0; post hoc, not the registered row: 18 / 19 completions wrote the verdict FAIL, which the frozen rule counts as a parse miss; read as FLAG they give sw-recall 0.000 / 0.000, precision 0.000 / 0.000, verdict accuracy 0.432 / 0.477, parse rate 1.000 / 1.000 (22 of 44 tasks have a different prompt on v0.3). Observed effort, all recorded calls: 66 calls, 3917 CPU-seconds, 2201 wall-seconds on a shared machine, no GPU, USD 0. Qwen2.5-1.5B-Instruct (Q4_K_M) minus the position-blind cue floor: sw-recall v0.2 -0.645 [-0.826, -0.465], Holm p < 0.0024, below; verdict accuracy v0.2 -0.613 [-0.774, -0.452], Holm p < 0.0024, below; sw-recall v0.3 -0.645 [-0.826, -0.465], Holm p < 0.0024, below; verdict accuracy v0.3 -0.613 [-0.774, -0.452], Holm p < 0.0024, below. Its v0.2 minus v0.3 gap: sw-recall +0.000 [0.000, 0.000], Holm p 1.0000, not separated from 0; verdict accuracy +0.000 [0.000, 0.000], Holm p 1.0000, not separated from 0 (16 of 31 tasks have a different prompt on v0.3). Observed effort, all recorded calls: 48 calls, 4026 CPU-seconds, 2202 wall-seconds on a shared machine, no GPU, USD 0. Holm adjusts the 12 contrasts in this paragraph together. The cue floors emit no line, so their located recall is 0 by construction.
Rule-program ceiling for the text track, all 1000 tasks of each file: a program that reads only the prompt text (regular expressions and Decimal arithmetic, no model) scores sw-recall 0.999 / 0.999, precision 0.988 / 0.987, verdict accuracy 0.997 / 0.997, located recall 0.999 / 0.999 on v0.2 / v0.3. The frozen bar for writing 'the text track is solved by parsing and arithmetic' was 0.99 recall and 0.99 precision on both files; precision misses it, so that sentence is not written. What the row does show: a text-track score measures whether a model can do what this program does. The program and the oracle disagree on 13 / 14 tasks. Post hoc: every one is a RETAINAGE_ERROR on a form where line 2 times the retainage rate ends in exactly half a cent; the oracle rounds a binary float there and the program rounds half-up, so the gold on those tasks is set by float representation, not by a stated rounding rule.
7B extract-then-verify adapter on the official scan, first 50 tasks (docs/ROUND3_RESULTS.json, not reproducible from this repo): field accuracy 0.852, severity-weighted recall 1.000, precision 0.174, FP/task 5.14, corrected-figure exact match 0.887 (scored against v0.1 gold strings). Precision and exact-match targets are missed. No frontier model has been scored on the full benchmark.
Contamination monitor (docs/CONTAMINATION_AUDIT.json): published train sets vs benchmark, exact / near-duplicate — hand-seeded 0 / 0, Ornith-only 0 / 0, blend 0 / 0. Planted near-copies caught: 450 of 450; verbatim copies with a stale stored signature: 50 of 50 (the previous monitor: 0). Template overlap (same exception types, state and line count) with the benchmark is hand-seeded 0.427, Ornith-only 0.048, blend 0.457: the split is signature-disjoint, not template-disjoint.
Reproduce: make sync && make validate (Linux or macOS, Python 3.12, no GPU,
no API key), then make floors-check path-a-check gap-check trained-baseline-check lm-row-check status-check. The language-model rows are re-scored from the
committed raw completions; regenerating the completions needs
llama-cpp-python and the two GGUF files named in docs/LM_ZERO_SHOT.json
(make lm-prompts lm-generate, not part of make validate).
What is not established: any 27B result; any frontier comparison on the full
benchmark; any language-model score on all 1,000 tasks of v0.2 or v0.3 (the
zero-shot rows cover a clock-bounded subsample of two small models, one
prompt, greedy decoding); training-seed variance for the Path A arms (one seed each, and
the arms differ in size as well as source); validity on real pay
applications (the benchmark is synthetic and its injections sit at fixed
positions, see injection_position_audit in docs/FLOORS.json).
See CONTRACTS.md — fixed exception taxonomy + severity weights, scoring,
contamination, benchmark rules.
forge/ seeded pay-app generator + arithmetic/entitlement verifier +
contamination monitor + golden benchmark (pkg plumb_forge)
model/ multimodal dataset builder, QLoRA SFT, GRPO RLVR, benchmark eval
cloud/ Modal app + Dockerfile + GCP spot scripts
eval/ deterministic golden harness, model-free floors, README gate
curriculum/ Ornith proposer study (Path A): curricula, intervals, paired
bootstrap over committed per-task rows (pkg plumb_curriculum)
docs/ DECISIONS.md, BENCHMARK.md, HANDOFF.md, methodology.md,
FLOORS.json, PATH_A_PAIRED.json, CONTAMINATION_AUDIT.json,
artifacts/path_a/ (per-task score rows)
Shared stack (docs/methodology.md): QLoRA 4-bit SFT → GRPO/Dr.GRPO
(DAPO-style) RLVR against the pay-app verifier → ReST-EM → s1 curation →
benchmark. Modal your-modal-profile primary, GCP fallback. Smoke LoRA first
(DeltaNet gate).
These are targets, not results. None has been met by a trained model on the full benchmark; see Status.
| Metric | Target |
|---|---|
| Arithmetic-error recall | 100% |
| Severity-weighted exception recall | > 0.95 |
| Precision (no phantom exceptions) | > 95% |
| Corrected-figure exact match | > 95% |
| Parse rate | 100% |
Planned head-to-head: Qwen3.8-2.4T-A95B, DeepSeek v4-flash, base Qwen3.8-27B. Not run on the full benchmark.
P0 scaffold → P1 verifier + hand-verified cases → P2 generator + golden set are done. P3 dataset + SFT has been run at 1.7B (text) and 7B (image) only. P4 RLVR, P5 self-play/judges and the P6 full head-to-head are not done.
- State retainage/prompt-pay rules: the registry has four entries (DEFAULT,
CA, TX, WA;
forge/src/plumb_forge/rules.py) and its figures have not been checked against statute. Fifty states is the requirement, not the coverage. - Scanned/hand-stamped form variance → OCR-noise augmentation.
- Financial-data security → synthetic-only; liability → human sign-off.