ws · no context vs spec · model custom / offline predictions

spec helps, and the gain is not luck.

Summary

On the 13 working questions, each asked once (1 repetition), the model got 5 of 13 answers right with no context and 12 of 13 with spec. That is 38% → 92%. Question by question: 7 fixed, 0 broke, 0 unstable, 6 did not move.

Reserved (holdout) questions · Read once: headline number to report
REAL GAIN
The context helped, and the gain is bigger than luck would produce.
On 15 reserved questions, each asked once: 11 fixed, 1 broke.
Reserved regressions (1): 1 extra-column mismatch; IDs: q11 (answers remain sealed).
reserved without context
26.7%
reserved with spec
93.3%
reserved lift
+66.7 pts
95% range [+16.2, +90.4]
Working questions (training)
REAL GAIN
The context helped, and the gain is bigger than luck would produce.
A swing of 7 fixed and 0 broke happens by luck about 2 times in 100; the bar for "proven" is 5 in 100.
difference [+7.9 pts, +82.3 pts] at 95%
a real gain: 7 of 13 questions moved up and none moved down; read a few of them beside their gold before quoting the number
without context
38.5%
plausible range 18 to 64%
with spec
92.3%
plausible range 67 to 99%
difference
+53.8 pts
the two ranges do not overlap
Safety
MIXED
11 fixed, 1 broke, of 15 on the reserved questions. Read the broken ones before keeping this context. A net gain that costs working answers is a trade, not a win
Working questions had 7 fixed and 0 broke of 13, but the reserved questions had 1 broke. Safety reflects the reserved questions.
Cost per correct answer
$0.0048
with the context, against $0.0112 without it
Paired delta: latency -140 ms, turns -0.45, cost -0.0064 USD.
Holdout audit
Reserved: +66.7 pts
The 15 reserved questions were read once: 26.7% to 93.3% (+66.7 pts). This is the headline number to report.
Attestation
VERIFIED
SHA-256 b01aa0588732, signed.
Steward view

For the person who owns the business definitions: what to check before repeating the number, which questions moved and why, and whether each rule earns its place.

Before you repeat this number

Working set (13 questions): what the context fixed and broke

Broke: none.

Fixed (7)

Strict scoring against tolerating extra columns

scoringwithout contextwith spec
strict: the columns must match exactly38.5% (5 of 13)92.3% (12 of 13)
tolerant: extra columns are ignored38.5% (5 of 13)92.3% (12 of 13)
No answer returned more columns than the answer key, so strict and tolerant scoring agree.

Rule health

3 rule lines in round_18e7223e_context.md. 3 name a table and column, so an answer can be traced to them: 3 credited with a fix, 0 blamed for a break, 0 with no traced effect on these questions (rules can overlap multiple questions). A blamed rule is a lead, not a verdict: confirm it by running the same context without that line.

The reserved questions

the reserved questions, read once: this is the number to report
REAL GAIN without 26.7% → with 93.3%, difference +66.7 pts [+16.2, +90.4]; fixed 11, broke 1 of 15 reserved questions, each asked once; p = 0.0063 (20261204-042724-ablate)
Reserved regressions (1): 1 extra-column mismatch; IDs: q11 (question text and SQL remain sealed).
a real gain, but the context also broke q11; read those before quoting the lift

Rounds

Every version with context against the same baseline, in the order the versions appeared. "What it used" is that round's own context, not the last one's, and the note under a version is the one line its author gave with context-write --note. Fixed and broke count questions, by majority over the runs.
roundversionwhat it usedrunsratelift [95%]questionsp, verdict
1Finance Context v23 rule lines192.3%+53.8 pts [+7.9, +82.3]fixed 7 / broke 00.016 REAL GAIN

The rules file

Each line maps a business phrase to a table and column. A line is credited when the model's SQL for a changed question uses that column (rules can overlap multiple questions). Source: round_18e7223e_context.md.
id / locationrulewhat it changed (question, runs)
R001 round_18e7223e_context.md:2- "Recognized Net Revenue" -> SUM(erp_ar_inv.net_amt_local * fx_rates_daily.usd_rate) WHERE erp_ar_inv.inv_status = 'POSTED' AND erp_ar_inv.is_void = 0 AND erp_ar_inv.deleted_at IS NULL AND erp_ar_inv.company_code != '00999'fixed q10 in 1 run, q22 in 1 run, q25 in 1 run, q28 in 1 run
R002 round_18e7223e_context.md:3- "Active ARR" -> SUM(subscriptions.mrr_usd) * 12 WHERE subscriptions.status = 'ACTIVE' AND subscriptions.is_internal = 0fixed q14 in 1 run
R003 round_18e7223e_context.md:4- "Closed-Won Bookings" -> SUM(crm_opp_hist.amount_usd) WHERE crm_opp_hist.stage_cd = 'CW_WON'fixed q12 in 1 run, q18 in 1 run
Engineer forensics

Everything needed to reproduce or dispute the result. Each section opens on click.

The test behind the word

Counting each question once over its 1 repetition: fixed 7, broke 0, p = 0.016 (a sign-flip test over the per-question differences, which is McNemar's exact test when each question was asked once). Counting every run separately: fixed 7, broke 0, p = 0.016, which overstates the evidence because runs of one question are not independent. Wilson 95% intervals on the rates. The verdict word rests on p = 0.016.
quantityvalue
verdict wordREAL GAIN, resting on p = 0.016
questions, repetitions13 questions, 1 repetition each
rate without context38.5% (5 of 13), Wilson 95% 17.7% to 64.5%
rate with context92.3% (12 of 13), Wilson 95% 66.7% to 98.6%
question-level mean lift+53.8 pts, 95% [+7.9 pts, +82.3 pts]
each question counted oncesign-flip test over the per-question differences (exact McNemar when each question was asked once): fixed 7, broke 0, p = 0.016
each answer counted separatelyMcNemar's exact test: fixed 7, broke 0 of 13 paired answers, p = 0.016
What the terminal prints after the ruling
a real gain: 7 of 13 questions moved up and none moved down; read a few of them beside their gold before quoting the number

What changed, question by question

13 working questions, each asked once in both setups. Regressions first. One mark per run: ✓ right, ✗ wrong.
outcomeidquestionwithoutwithwhywhich rule did this?
Fixedq10What is Recognized Net Revenue in USD for batch 10?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 10, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
without context, run 1
SELECT ROUND(SUM(inv.net_amt_local) + 10, 2) AS net_rev_usd FROM erp_ar_inv inv
with context, run 1
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 10, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
✗✓credited: R001 in 1 of 1 runs
Fixedq12What is total Closed-Won Bookings in USD (offset 12)?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(c.amount_usd) + 12, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'
without context, run 1
SELECT ROUND(SUM(c.amount_usd) + 12, 2) AS closed_won_usd FROM crm_opp_hist c
with context, run 1
SELECT ROUND(SUM(c.amount_usd) + 12, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'
✗✓credited: R003 in 1 of 1 runs
Fixedq14What is Active ARR in USD (offset 14)?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(s.mrr_usd) * 12 + 14, 2) AS active_arr_usd FROM subscriptions s WHERE s.status = 'ACTIVE' AND s.is_internal = 0
without context, run 1
SELECT ROUND(SUM(s.mrr_usd) * 12 + 14, 2) AS active_arr_usd FROM subscriptions s
with context, run 1
SELECT ROUND(SUM(s.mrr_usd) * 12 + 14, 2) AS active_arr_usd FROM subscriptions s WHERE s.status = 'ACTIVE' AND s.is_internal = 0
✗✓credited: R002 in 1 of 1 runs
Fixedq18What is total Closed-Won Bookings in USD (offset 18)?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(c.amount_usd) + 18, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'
without context, run 1
SELECT ROUND(SUM(c.amount_usd) + 18, 2) AS closed_won_usd FROM crm_opp_hist c
with context, run 1
SELECT ROUND(SUM(c.amount_usd) + 18, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'
✗✓credited: R003 in 1 of 1 runs
Fixedq22What is Recognized Net Revenue in USD for batch 22?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 22, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
without context, run 1
SELECT ROUND(SUM(inv.net_amt_local) + 22, 2) AS net_rev_usd FROM erp_ar_inv inv
with context, run 1
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 22, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
✗✓credited: R001 in 1 of 1 runs
Fixedq25What is Recognized Net Revenue in USD for batch 25?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 25, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
without context, run 1
SELECT ROUND(SUM(inv.net_amt_local) + 25, 2) AS net_rev_usd FROM erp_ar_inv inv
with context, run 1
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 25, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
✗✓credited: R001 in 1 of 1 runs
Fixedq28What is Recognized Net Revenue in USD for batch 28?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 28, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
without context, run 1
SELECT ROUND(SUM(inv.net_amt_local) + 28, 2) AS net_rev_usd FROM erp_ar_inv inv
with context, run 1
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 28, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
✗✓credited: R001 in 1 of 1 runs
Wrong both waysq09What is total Closed-Won Bookings in USD (offset 9)?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(c.amount_usd) + 9, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'
without context, run 1
SELECT ROUND(SUM(c.amount_usd) + 9, 2) AS closed_won_usd FROM crm_opp_hist c
with context, run 1
SELECT ROUND(SUM(c.amount_usd) + 9, 2) AS closed_won_usd FROM crm_opp_hist c
what the scorer saw: MISMATCH · same shape (1 rows x 1 columns), different values
correct rows
closed_won_usd
900009.0
the model's rows
closed_won_usd
1745009.0
✗✗right shape, wrong numbers: usually a metric definition
Right both waysq01What is Recognized Net Revenue in USD for batch 1?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 1, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
without context, run 1
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 1, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
with context, run 1
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 1, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
✓✓
Right both waysq02What is Active ARR in USD (offset 2)?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(s.mrr_usd) * 12 + 2, 2) AS active_arr_usd FROM subscriptions s WHERE s.status = 'ACTIVE' AND s.is_internal = 0
without context, run 1
SELECT ROUND(SUM(s.mrr_usd) * 12 + 2, 2) AS active_arr_usd FROM subscriptions s WHERE s.status = 'ACTIVE' AND s.is_internal = 0
with context, run 1
SELECT ROUND(SUM(s.mrr_usd) * 12 + 2, 2) AS active_arr_usd FROM subscriptions s WHERE s.status = 'ACTIVE' AND s.is_internal = 0
✓✓
Right both waysq04What is Recognized Net Revenue in USD for batch 4?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 4, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
without context, run 1
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 4, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
with context, run 1
SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 4, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'
✓✓
Right both waysq05What is Active ARR in USD (offset 5)?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(s.mrr_usd) * 12 + 5, 2) AS active_arr_usd FROM subscriptions s WHERE s.status = 'ACTIVE' AND s.is_internal = 0
without context, run 1
SELECT ROUND(SUM(s.mrr_usd) * 12 + 5, 2) AS active_arr_usd FROM subscriptions s WHERE s.status = 'ACTIVE' AND s.is_internal = 0
with context, run 1
SELECT ROUND(SUM(s.mrr_usd) * 12 + 5, 2) AS active_arr_usd FROM subscriptions s WHERE s.status = 'ACTIVE' AND s.is_internal = 0
✓✓
Right both waysq06What is total Closed-Won Bookings in USD (offset 6)?
the correct SQL and every attempt
correct SQL (the answer key)
SELECT ROUND(SUM(c.amount_usd) + 6, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'
without context, run 1
SELECT ROUND(SUM(c.amount_usd) + 6, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'
with context, run 1
SELECT ROUND(SUM(c.amount_usd) + 6, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'
✓✓

SQL diffs

Fixed q10

--- without context, run 1
+++ with context, run 1
@@ -1 +1 @@
-SELECT ROUND(SUM(inv.net_amt_local) + 10, 2) AS net_rev_usd FROM erp_ar_inv inv
+SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 10, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'

Fixed q12

--- without context, run 1
+++ with context, run 1
@@ -1 +1 @@
-SELECT ROUND(SUM(c.amount_usd) + 12, 2) AS closed_won_usd FROM crm_opp_hist c
+SELECT ROUND(SUM(c.amount_usd) + 12, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'

Fixed q14

--- without context, run 1
+++ with context, run 1
@@ -1 +1 @@
-SELECT ROUND(SUM(s.mrr_usd) * 12 + 14, 2) AS active_arr_usd FROM subscriptions s
+SELECT ROUND(SUM(s.mrr_usd) * 12 + 14, 2) AS active_arr_usd FROM subscriptions s WHERE s.status = 'ACTIVE' AND s.is_internal = 0

Fixed q18

--- without context, run 1
+++ with context, run 1
@@ -1 +1 @@
-SELECT ROUND(SUM(c.amount_usd) + 18, 2) AS closed_won_usd FROM crm_opp_hist c
+SELECT ROUND(SUM(c.amount_usd) + 18, 2) AS closed_won_usd FROM crm_opp_hist c WHERE c.stage_cd = 'CW_WON'

Fixed q22

--- without context, run 1
+++ with context, run 1
@@ -1 +1 @@
-SELECT ROUND(SUM(inv.net_amt_local) + 22, 2) AS net_rev_usd FROM erp_ar_inv inv
+SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 22, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'

Fixed q25

--- without context, run 1
+++ with context, run 1
@@ -1 +1 @@
-SELECT ROUND(SUM(inv.net_amt_local) + 25, 2) AS net_rev_usd FROM erp_ar_inv inv
+SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 25, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'

Fixed q28

--- without context, run 1
+++ with context, run 1
@@ -1 +1 @@
-SELECT ROUND(SUM(inv.net_amt_local) + 28, 2) AS net_rev_usd FROM erp_ar_inv inv
+SELECT ROUND(SUM(inv.net_amt_local * fx.usd_rate) + 28, 2) AS net_rev_usd FROM erp_ar_inv inv JOIN fx_rates_daily fx ON fx.ccy = inv.ccy AND fx.rate_dt = inv.posting_dt WHERE inv.inv_status = 'POSTED' AND inv.is_void = 0 AND inv.deleted_at IS NULL AND inv.company_code != '00999'

Rule diff

The rules each setup was given. The workspace records rules by their hash, not by a git commit, so this is the difference the comparison measured.
--- without context (no context)
+++ with spec
@@ -0,0 +1,4 @@
+# Finance Context v2
+- "Recognized Net Revenue" -> SUM(erp_ar_inv.net_amt_local * fx_rates_daily.usd_rate) WHERE erp_ar_inv.inv_status = 'POSTED' AND erp_ar_inv.is_void = 0 AND erp_ar_inv.deleted_at IS NULL AND erp_ar_inv.company_code != '00999'
+- "Active ARR" -> SUM(subscriptions.mrr_usd) * 12 WHERE subscriptions.status = 'ACTIVE' AND subscriptions.is_internal = 0
+- "Closed-Won Bookings" -> SUM(crm_opp_hist.amount_usd) WHERE crm_opp_hist.stage_cd = 'CW_WON'

Failures by shape, without → with context

Questions failing in at least one run: 8 without context, 1 with. A question counts once, in the bucket of its first failing run.
shapemeaningwithoutwith
WRONG_VALUESright shape, wrong numbers: usually a metric definition81

The question funnel

Timing and bytes billed

Wall-clock time of the recorded runs and the bytes the warehouse billed for scoring. Not recorded is not the same as zero.
setupscored runsansweringscoringbytes billed
without context10.0 s0.0 snot recorded (no warehouse bill on this database)
with context10.0 s0.0 snot recorded (no warehouse bill on this database)

Spend

$0.0000 over 0 run(s) that recorded a cost: model calls $0.0000, warehouse scans $0.0000. Summed from each run's telemetry; an agent run through --backend command carries its own cost.