liovina commited on
Commit
3f1a281
Β·
verified Β·
1 Parent(s): 9c471a3

Deploy NL_SQL HEAD to HF Space

Browse files
app/streamlit_app.py CHANGED
@@ -61,7 +61,7 @@ I18N: dict[str, dict[str, str]] = {
61
  "metric_percent": "100%",
62
  "metric_caption": "30 dev + 30 held-out, balanced split, all ten query categories at 100% on the free-tier codestral pipeline.",
63
  "research_kicker": "BIRD Mini-Dev research benchmark",
64
- "research_value": "93.0% / 200",
65
  "research_caption": (
66
  "Hybrid pipeline: "
67
  "<span class='nl-term' title='Mistral codestral-latest β€” SQL-specialised generation model, free tier'>codestral</span> + "
@@ -70,8 +70,8 @@ I18N: dict[str, dict[str, str]] = {
70
  "<span class='nl-term' title='helallao reverse-engineered HTTPS bridge to Perplexity backend β€” Grok 4.1, GPT-5.2, Claude 4.5 Sonnet, kimi-k2-thinking, gpt-5.2-thinking + DAC on residue, claude-4.5-sonnet-thinking on v18 residue, plain kimi-k2-thinking on v19 residue, reasoning + Pro modes'>helallao multi-model voting</span>. "
71
  "Scored under "
72
  "<span class='nl-term' title='bird-bench/mini_dev evaluation_ex.py β€” set-equality on row tuples, the methodology used by the BIRD leaderboard and by AskData/CHESS/XiYan in their reported numbers'>BIRD-official set semantics</span>. "
73
- "+45.2pp over the GPT-4 zero-shot reference (47.8%), $0 external cost. "
74
- "On <span class='nl-term' title='Jin et al., CIDR/VLDB 2026, arXiv:2601.08778 β€” corrected BIRD gold annotations'>Arcwise-Plat corrected gold</span>: 74.87% (149/199) β€” honest noise-floor; +7 sql_only catches where our prediction is correct under Arcwise's corrected gold but BIRD's original gold disagrees. "
75
  "Seven late-stage model rescues on v16β†’v22, two archive-audit rescores on v23/v24 (qid 1205 via archive sweep, qid 959 via archive-rescore after the day-5 bind-bug fix), and six targeted P3.F schema-link hints on v25β†’v29: qid 902 (driverStandings.position vs results.position), qid 1531 (yearmonth.Consumption subquery + SUM(Price/Amount) row-wise), qid 894 (lapTimes.milliseconds first SELECT column), qid 1251 (Patient β‹ˆ Laboratory β‹ˆ Examination semi-join), qid 408 (rulings.text filter via cards.uuid join + COUNT(DISTINCT cards.id)), qid 1275 (Laboratory.CENTROMEA/SSB IN ('negative','0') instead of fabricated tokens against Examination). Every cell verified via audit_rescore.py β€” 0 mismatches."
76
  ),
77
  "settings_header": "Settings",
@@ -142,7 +142,7 @@ I18N: dict[str, dict[str, str]] = {
142
  "metric_percent": "100%",
143
  "metric_caption": "30 dev + 30 held-out, сбалансированный сплит, всС Π΄Π΅ΡΡΡ‚ΡŒ ΠΊΠ°Ρ‚Π΅Π³ΠΎΡ€ΠΈΠΉ запросов Π½Π° 100% Ρ‡Π΅Ρ€Π΅Π· бСсплатный codestral.",
144
  "research_kicker": "Π˜ΡΡΠ»Π΅Π΄ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΡΠΊΠΈΠΉ Π±Π΅Π½Ρ‡ΠΌΠ°Ρ€ΠΊ BIRD Mini-Dev",
145
- "research_value": "93,0% / 200",
146
  "research_caption": (
147
  "Π“ΠΈΠ±Ρ€ΠΈΠ΄Π½Ρ‹ΠΉ ΠΏΠ°ΠΉΠΏΠ»Π°ΠΉΠ½: "
148
  "<span class='nl-term' title='Mistral codestral-latest β€” модСль, спСциализированная ΠΏΠΎΠ΄ Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΡŽ SQL, бСсплатный Ρ‚Π°Ρ€ΠΈΡ„'>codestral</span> + "
@@ -151,8 +151,8 @@ I18N: dict[str, dict[str, str]] = {
151
  "<span class='nl-term' title='РСвСрс-ΠΈΠ½ΠΆΠΈΠ½ΠΈΡ€ΠΈΠ½Π³ HTTPS моста ΠΊ бэкСнду Perplexity β€” Grok 4.1, GPT-5.2, Claude 4.5 Sonnet, kimi-k2-thinking, gpt-5.2-thinking + DAC Π½Π° residue, claude-4.5-sonnet-thinking Π½Π° v18 residue, plain kimi-k2-thinking Π½Π° v19 residue; Ρ€Π΅ΠΆΠΈΠΌΡ‹ reasoning + Pro'>multi-model voting Ρ‡Π΅Ρ€Π΅Π· helallao</span>. "
152
  "Scoring β€” "
153
  "<span class='nl-term' title='bird-bench/mini_dev evaluation_ex.py β€” set-равСнство Π½Π° Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚ΠΈΡ€ΡƒΡŽΡ‰ΠΈΡ… ΠΊΠΎΡ€Ρ‚Π΅ΠΆΠ°Ρ…. Π’ΠΎΡ‚ ΠΆΠ΅ ΠΌΠ΅Ρ‚ΠΎΠ΄ считаСт BIRD leaderboard ΠΈ SOTA-числа AskData/CHESS/XiYan'>BIRD-official set-сСмантика</span>. "
154
- "+45,2 ΠΏ.ΠΏ. Π½Π°Π΄ zero-shot GPT-4 (47,8%), внСшниС расходы β€” ноль. "
155
- "На <span class='nl-term' title='Jin et al., CIDR/VLDB 2026, arXiv:2601.08778 β€” исправлСнныС Π°Π½Π½ΠΎΡ‚Π°Ρ†ΠΈΠΈ gold BIRD'>исправлСнном gold Arcwise-Plat</span>: 74,87% (149/199) β€” чСстный noise-floor; +7 sql_only catches, Π³Π΄Π΅ наш ΠΎΡ‚Π²Π΅Ρ‚ ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½Π΅Π΅ эталона BIRD согласно Arcwise. "
156
  "БСмь late-stage rescue ΠΏΠΎ модСлям Π½Π° ΠΏΡƒΡ‚ΠΈ v16β†’v22, плюс v23/v24 β€” archive-sweep ΠΈ archive-rescore (qid 1205 / qid 959 послС day-5 bind-bug fix), плюс v25β†’v29 β€” ΡˆΠ΅ΡΡ‚ΡŒ ΡƒΠ·ΠΊΠΈΡ… P3.F schema-link hint'ΠΎΠ²: qid 902 (driverStandings.position вмСсто results.position), qid 1531 (subquery ΠΏΠΎ yearmonth.Consumption + SUM(Price/Amount) построчно), qid 894 (lapTimes.milliseconds ΠΏΠ΅Ρ€Π²ΠΎΠΉ ΠΊΠΎΠ»ΠΎΠ½ΠΊΠΎΠΉ), qid 1251 (ΠΏΠΎΠ»Ρƒ-Π΄ΠΆΠΎΠΉΠ½ Patient β‹ˆ Laboratory β‹ˆ Examination), qid 408 (Ρ„ΠΈΠ»ΡŒΡ‚Ρ€ ΠΏΠΎ rulings.text Ρ‡Π΅Ρ€Π΅Π· join cards.uuid + COUNT(DISTINCT cards.id)) ΠΈ qid 1275 (Laboratory.CENTROMEA/SSB IN ('negative','0') вмСсто Π½Π΅ΡΡƒΡ‰Π΅ΡΡ‚Π²ΡƒΡŽΡ‰ΠΈΡ… Examination columns + invented '-'/'+-' tokens). КаТдая ячСйка Π²Π΅Ρ€ΠΈΡ„ΠΈΡ†ΠΈΡ€ΠΎΠ²Π°Π½Π° Ρ‡Π΅Ρ€Π΅Π· audit_rescore.py β€” 0 mismatches."
157
  ),
158
  "settings_header": "Настройки",
 
61
  "metric_percent": "100%",
62
  "metric_caption": "30 dev + 30 held-out, balanced split, all ten query categories at 100% on the free-tier codestral pipeline.",
63
  "research_kicker": "BIRD Mini-Dev research benchmark",
64
+ "research_value": "92.5% / 200",
65
  "research_caption": (
66
  "Hybrid pipeline: "
67
  "<span class='nl-term' title='Mistral codestral-latest β€” SQL-specialised generation model, free tier'>codestral</span> + "
 
70
  "<span class='nl-term' title='helallao reverse-engineered HTTPS bridge to Perplexity backend β€” Grok 4.1, GPT-5.2, Claude 4.5 Sonnet, kimi-k2-thinking, gpt-5.2-thinking + DAC on residue, claude-4.5-sonnet-thinking on v18 residue, plain kimi-k2-thinking on v19 residue, reasoning + Pro modes'>helallao multi-model voting</span>. "
71
  "Scored under "
72
  "<span class='nl-term' title='bird-bench/mini_dev evaluation_ex.py β€” set-equality on row tuples, the methodology used by the BIRD leaderboard and by AskData/CHESS/XiYan in their reported numbers'>BIRD-official set semantics</span>. "
73
+ "+44.7pp over the GPT-4 zero-shot reference (47.8%), $0 external cost. "
74
+ "On <span class='nl-term' title='Jin et al., CIDR/VLDB 2026, arXiv:2601.08778 β€” corrected BIRD gold annotations'>Arcwise-Plat corrected gold</span>: 74.37% (148/199) β€” honest noise-floor; +7 sql_only catches where our prediction is correct under Arcwise's corrected gold but BIRD's original gold disagrees. "
75
  "Seven late-stage model rescues on v16β†’v22, two archive-audit rescores on v23/v24 (qid 1205 via archive sweep, qid 959 via archive-rescore after the day-5 bind-bug fix), and six targeted P3.F schema-link hints on v25β†’v29: qid 902 (driverStandings.position vs results.position), qid 1531 (yearmonth.Consumption subquery + SUM(Price/Amount) row-wise), qid 894 (lapTimes.milliseconds first SELECT column), qid 1251 (Patient β‹ˆ Laboratory β‹ˆ Examination semi-join), qid 408 (rulings.text filter via cards.uuid join + COUNT(DISTINCT cards.id)), qid 1275 (Laboratory.CENTROMEA/SSB IN ('negative','0') instead of fabricated tokens against Examination). Every cell verified via audit_rescore.py β€” 0 mismatches."
76
  ),
77
  "settings_header": "Settings",
 
142
  "metric_percent": "100%",
143
  "metric_caption": "30 dev + 30 held-out, сбалансированный сплит, всС Π΄Π΅ΡΡΡ‚ΡŒ ΠΊΠ°Ρ‚Π΅Π³ΠΎΡ€ΠΈΠΉ запросов Π½Π° 100% Ρ‡Π΅Ρ€Π΅Π· бСсплатный codestral.",
144
  "research_kicker": "Π˜ΡΡΠ»Π΅Π΄ΠΎΠ²Π°Ρ‚Π΅Π»ΡŒΡΠΊΠΈΠΉ Π±Π΅Π½Ρ‡ΠΌΠ°Ρ€ΠΊ BIRD Mini-Dev",
145
+ "research_value": "92,5% / 200",
146
  "research_caption": (
147
  "Π“ΠΈΠ±Ρ€ΠΈΠ΄Π½Ρ‹ΠΉ ΠΏΠ°ΠΉΠΏΠ»Π°ΠΉΠ½: "
148
  "<span class='nl-term' title='Mistral codestral-latest β€” модСль, спСциализированная ΠΏΠΎΠ΄ Π³Π΅Π½Π΅Ρ€Π°Ρ†ΠΈΡŽ SQL, бСсплатный Ρ‚Π°Ρ€ΠΈΡ„'>codestral</span> + "
 
151
  "<span class='nl-term' title='РСвСрс-ΠΈΠ½ΠΆΠΈΠ½ΠΈΡ€ΠΈΠ½Π³ HTTPS моста ΠΊ бэкСнду Perplexity β€” Grok 4.1, GPT-5.2, Claude 4.5 Sonnet, kimi-k2-thinking, gpt-5.2-thinking + DAC Π½Π° residue, claude-4.5-sonnet-thinking Π½Π° v18 residue, plain kimi-k2-thinking Π½Π° v19 residue; Ρ€Π΅ΠΆΠΈΠΌΡ‹ reasoning + Pro'>multi-model voting Ρ‡Π΅Ρ€Π΅Π· helallao</span>. "
152
  "Scoring β€” "
153
  "<span class='nl-term' title='bird-bench/mini_dev evaluation_ex.py β€” set-равСнство Π½Π° Ρ€Π΅Π·ΡƒΠ»ΡŒΡ‚ΠΈΡ€ΡƒΡŽΡ‰ΠΈΡ… ΠΊΠΎΡ€Ρ‚Π΅ΠΆΠ°Ρ…. Π’ΠΎΡ‚ ΠΆΠ΅ ΠΌΠ΅Ρ‚ΠΎΠ΄ считаСт BIRD leaderboard ΠΈ SOTA-числа AskData/CHESS/XiYan'>BIRD-official set-сСмантика</span>. "
154
+ "+44,7 ΠΏ.ΠΏ. Π½Π°Π΄ zero-shot GPT-4 (47,8%), внСшниС расходы β€” ноль. "
155
+ "На <span class='nl-term' title='Jin et al., CIDR/VLDB 2026, arXiv:2601.08778 β€” исправлСнныС Π°Π½Π½ΠΎΡ‚Π°Ρ†ΠΈΠΈ gold BIRD'>исправлСнном gold Arcwise-Plat</span>: 74,37% (148/199) β€” чСстный noise-floor; +7 sql_only catches, Π³Π΄Π΅ наш ΠΎΡ‚Π²Π΅Ρ‚ ΠΏΡ€Π°Π²ΠΈΠ»ΡŒΠ½Π΅Π΅ эталона BIRD согласно Arcwise. "
156
  "БСмь late-stage rescue ΠΏΠΎ модСлям Π½Π° ΠΏΡƒΡ‚ΠΈ v16β†’v22, плюс v23/v24 β€” archive-sweep ΠΈ archive-rescore (qid 1205 / qid 959 послС day-5 bind-bug fix), плюс v25β†’v29 β€” ΡˆΠ΅ΡΡ‚ΡŒ ΡƒΠ·ΠΊΠΈΡ… P3.F schema-link hint'ΠΎΠ²: qid 902 (driverStandings.position вмСсто results.position), qid 1531 (subquery ΠΏΠΎ yearmonth.Consumption + SUM(Price/Amount) построчно), qid 894 (lapTimes.milliseconds ΠΏΠ΅Ρ€Π²ΠΎΠΉ ΠΊΠΎΠ»ΠΎΠ½ΠΊΠΎΠΉ), qid 1251 (ΠΏΠΎΠ»Ρƒ-Π΄ΠΆΠΎΠΉΠ½ Patient β‹ˆ Laboratory β‹ˆ Examination), qid 408 (Ρ„ΠΈΠ»ΡŒΡ‚Ρ€ ΠΏΠΎ rulings.text Ρ‡Π΅Ρ€Π΅Π· join cards.uuid + COUNT(DISTINCT cards.id)) ΠΈ qid 1275 (Laboratory.CENTROMEA/SSB IN ('negative','0') вмСсто Π½Π΅ΡΡƒΡ‰Π΅ΡΡ‚Π²ΡƒΡŽΡ‰ΠΈΡ… Examination columns + invented '-'/'+-' tokens). КаТдая ячСйка Π²Π΅Ρ€ΠΈΡ„ΠΈΡ†ΠΈΡ€ΠΎΠ²Π°Π½Π° Ρ‡Π΅Ρ€Π΅Π· audit_rescore.py β€” 0 mismatches."
157
  ),
158
  "settings_header": "Настройки",
docs/NEXT_SESSION.md CHANGED
@@ -9,7 +9,7 @@
9
  # 1. Π§Ρ‚ΠΎ сСйчас Π² Ρ€Π΅ΠΏΠΎ?
10
  cd D:/NL_SQL
11
  git log --oneline -5
12
- # Expected top: v29 93.0% commit / v28 commit / 72b7a21 cookbook / 92c52f4 docs sync v27 / 99bae66 v27
13
 
14
  # 2. Π“Π΄Π΅ actual baseline merged report?
15
  ls eval/reports/2026-05-24/v29-v28-plus-p3f-q1275-merged.json
@@ -29,9 +29,11 @@ uv run mypy --strict src
29
  # Expected: 328 pass / clean / clean
30
  ```
31
 
32
- **Π’Π΅ΠΊΡƒΡ‰Π΅Π΅ состояниС:** repo + Streamlit + README + UI captions = **v29 93.0%** (186/200).
33
- **HF Space live URL <https://liovina-nl-sql.hf.space> = v17 86.0%** (last redeploy 2026-05-18).
34
- Repo Π²ΠΏΠ΅Ρ€Π΅Π΄ΠΈ live HF Π½Π° v18-v29 (+7.0pp); redeploy gated ΠΊ user (external publish via `.deploy_hf.py`).
 
 
35
 
36
  ## Cookbook: ΠΊΠ°ΠΊ Π΄ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ Π΅Ρ‰Ρ‘ ΠΎΠ΄ΠΈΠ½ P3.F rescue (ΠΏΠΎΠ²Ρ‚ΠΎΡ€ΡΡŽΡ‰ΠΈΠΉΡΡ pattern)
37
 
@@ -52,7 +54,7 @@ error), ΠΏΠΎΠ²Ρ‚ΠΎΡ€ΠΈΡ‚ΡŒ эти 8 шагов:
52
  voted_by tag ΠΈ delta, inline Python Π΄Π°Ρ‘Ρ‚ control + audit trail. НС Π²Ρ‹Π½ΠΎΡΠΈΡ‚ΡŒ Π²
53
  `scripts/merge_p3f.py` Π±Π΅Π· явного запроса.
54
 
55
- ## 2026-05-24 v29 β€” **93.0% EA verified** via targeted P3.F schema-link hint for qid 1275 (thrombosis "anti-centromere"/"anti-SSB")
56
 
57
  **Π‘Π΄Π΅Π»Π°Π½ΠΎ:**
58
  - Π Π°ΡΡˆΠΈΡ€Π΅Π½ `scripts/p3f_acceptance.py` Π²ΠΎΡΡŒΠΌΡ‹ΠΌ target'ΠΎΠΌ: qid `1275` moderate
@@ -78,7 +80,7 @@ voted_by tag ΠΈ delta, inline Python Π΄Π°Ρ‘Ρ‚ control + audit trail. НС Π²Ρ‹Π½
78
  Wins `[1275]`, regressions `[]`, 185 β†’ 186.
79
  - Audit: `scripts/audit_rescore.py` β†’ stored 186 / true 186 / 0 mismatches.
80
  - P3.F acceptance Π½Π° v29: qids 207, 1404, 902, 1531, 894, 1251, 408, 1275 β€” всС PASS.
81
- - README + Streamlit + UI captions подняты с 92.5% β†’ **93.0% / 200**,
82
  per-tier moderate 90.9 β†’ **91.9**, +10.55 β†’ **+11.05pp** Π½Π°Π΄ AskData+GPT-4o,
83
  +44.7 β†’ **+45.2pp** Π½Π°Π΄ GPT-4 zero-shot.
84
 
@@ -101,7 +103,7 @@ fetch). Local heterogeneous CSC lever остаётся parked.
101
  3-model helallao reasoning sweep (claude-4.5-sonnet-thinking + gpt-5.2-thinking
102
  + grok-4.1-reasoning) Π½Π° 14 v29 residue qids Π΄Π°Π» **42 attempts, 0 rescues,
103
  0 regressions**. Helallao Π΄Π°Ρ‘Ρ‚ Ρ‚Π΅ ΠΆΠ΅ ΠΌΠΎΠ΄Π΅Π»ΠΈ Π·Π° $0 Ρ‡Π΅Ρ€Π΅Π· Pro подписку; paid OR
104
- эквивалСнт бСсполСзСн с Ρ‚Π΅ΠΌΠΈ ΠΆΠ΅ reasoning routes. Past 93.0% Ρ‚Ρ€Π΅Π±ΡƒΠ΅Ρ‚ Π»ΠΈΠ±ΠΎ
105
  Π΄Ρ€ΡƒΠ³ΠΎΠΉ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρ‹ (custom JOIN-path linker, semantic equality check), Π»ΠΈΠ±ΠΎ
106
  ΠΏΡ€ΠΈΠ½ΡΡ‚ΡŒ Ρ‚Π΅ΠΊΡƒΡ‰ΠΈΠΉ ceiling. АртСфакты Π² `eval/reports/2026-05-24/helallao-*-on-v29-residue.json`.
107
  2. **ΠœΠ΅ΡΡ‚Π½Ρ‹ΠΉ heterogeneous CSC:** retry `qwen2.5-coder:7b-instruct` pull ΠΊΠΎΠ³Π΄Π°
@@ -121,19 +123,19 @@ fetch). Local heterogeneous CSC lever остаётся parked.
121
  2026-06-16). Если ΠΏΡ€ΠΎΡ‚ΡƒΡ…Π½ΡƒΡ‚ β€” re-extract Ρ‚Π΅ΠΌ ΠΆΠ΅ скриптом, Π½Π΅ Ρ‚Ρ€ΠΎΠ³Π°Ρ‚ΡŒ GraceKelly
122
  browser path.
123
 
124
- **Ceiling сСйчас β€” final для $0 budget Π±Π΅Π· runner-level Ρ€Π΅Ρ„Π°ΠΊΡ‚ΠΎΡ€ΠΈΠ½Π³Π°.** v29 = 93.0% / 200, Π² 0.04pp ΠΎΡ‚ human expert (BIRD paper 92.96%). Π’Ρ€ΠΈΠΏΠ»Π΅Ρ‚ 93.0% / 74.87% / 68.84% Π½Π΅ сдвигаСтся Π±Π΅Π· Π½ΠΎΠ²ΠΎΠΉ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρ‹. ΠŸΠΎΡ€Ρ‚Ρ„ΠΎΠ»ΠΈΠΎ-narrative ΠΏΠΎΠ»Π½Ρ‹ΠΉ.
125
 
126
  **Closed 2026-05-24 EOD:** `scripts/rescore_arcwise.py` pred-exec фикс
127
  (ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅Ρ‚ `execute_readonly` Π½Π°ΠΏΡ€ΡΠΌΡƒΡŽ, Π½Π΅ `_execute_gold` с
128
  SQLAlchemyError fallback). Symmetric с canonical `scripts/audit_rescore.py`.
129
  Ξ” Π½Π° v29 Arcwise sql_only: 148/199 (74.37%) β†’ 149/199 (74.87%), BIRD
130
- original 185/200 β†’ 186/200 (совпадаСт с canonical audit). Headline 93.0%
131
  Π½Π΅ сдвигаСтся, Arcwise headline +0.5pp. README + Streamlit + handoff
132
  ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½Ρ‹.
133
 
134
- **Ceiling-caveat (portfolio honesty):** 93.0% free-tier β€” **Π² 0.04pp ΠΎΡ‚ human
135
  expert baseline (BIRD paper 92.96%)**. РСалистичный ΠΏΠΎΡ‚ΠΎΠ»ΠΎΠΊ Π±Π΅Π· paid OR / Π±Π΅Π·
136
- fine-tune скорСС всСго 93.0%. Past 93% β€” paid territory ΠΈΠ»ΠΈ Π½ΠΎΠ²Ρ‹ΠΉ
137
  runner-level fix.
138
 
139
  ## 2026-05-24 v28 β€” **92.5% EA verified** via targeted P3.F schema-link hint for qid 408 (card_games "triggered ability")
 
9
  # 1. Π§Ρ‚ΠΎ сСйчас Π² Ρ€Π΅ΠΏΠΎ?
10
  cd D:/NL_SQL
11
  git log --oneline -5
12
+ # Expected top: v29 92.5% commit / v28 commit / 72b7a21 cookbook / 92c52f4 docs sync v27 / 99bae66 v27
13
 
14
  # 2. Π“Π΄Π΅ actual baseline merged report?
15
  ls eval/reports/2026-05-24/v29-v28-plus-p3f-q1275-merged.json
 
29
  # Expected: 328 pass / clean / clean
30
  ```
31
 
32
+ **Π’Π΅ΠΊΡƒΡ‰Π΅Π΅ состояниС:** repo + Streamlit + README + UI captions + **live HF Space** = **v29 92.5%** (185/200) послС 2026-05-25 EOD-3 CC-CX-KM audit
33
+ correction (qid 518 v13 false positive исправлСн Ρ‡Π΅Ρ€Π΅Π· `safe_compare_pred` short-circuit).
34
+ HF redeploy Π²Ρ‹ΠΏΠΎΠ»Π½Π΅Π½ 2026-05-25 EOD-3; E2E grep Π½Π° <https://liovina-nl-sql.hf.space>
35
+ ΠΏΠΎΠ΄Ρ‚Π²Π΅Ρ€Π΄ΠΈΠ» `92.5%` (EN) / `92,5%` (RU comma format). Screenshots `docs/ui-live-{en,ru}.png` ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½Ρ‹.
36
+ ВсС surface (repo / UI captions / live URL) синхронизированы β€” gap Π½ΡƒΠ»Π΅Π²ΠΎΠΉ.
37
 
38
  ## Cookbook: ΠΊΠ°ΠΊ Π΄ΠΎΠ±Π°Π²ΠΈΡ‚ΡŒ Π΅Ρ‰Ρ‘ ΠΎΠ΄ΠΈΠ½ P3.F rescue (ΠΏΠΎΠ²Ρ‚ΠΎΡ€ΡΡŽΡ‰ΠΈΠΉΡΡ pattern)
39
 
 
54
  voted_by tag ΠΈ delta, inline Python Π΄Π°Ρ‘Ρ‚ control + audit trail. НС Π²Ρ‹Π½ΠΎΡΠΈΡ‚ΡŒ Π²
55
  `scripts/merge_p3f.py` Π±Π΅Π· явного запроса.
56
 
57
+ ## 2026-05-24 v29 β€” **92.5% EA verified** via targeted P3.F schema-link hint for qid 1275 (thrombosis "anti-centromere"/"anti-SSB")
58
 
59
  **Π‘Π΄Π΅Π»Π°Π½ΠΎ:**
60
  - Π Π°ΡΡˆΠΈΡ€Π΅Π½ `scripts/p3f_acceptance.py` Π²ΠΎΡΡŒΠΌΡ‹ΠΌ target'ΠΎΠΌ: qid `1275` moderate
 
80
  Wins `[1275]`, regressions `[]`, 185 β†’ 186.
81
  - Audit: `scripts/audit_rescore.py` β†’ stored 186 / true 186 / 0 mismatches.
82
  - P3.F acceptance Π½Π° v29: qids 207, 1404, 902, 1531, 894, 1251, 408, 1275 β€” всС PASS.
83
+ - README + Streamlit + UI captions подняты с 92.5% β†’ **92.5% / 200**,
84
  per-tier moderate 90.9 β†’ **91.9**, +10.55 β†’ **+11.05pp** Π½Π°Π΄ AskData+GPT-4o,
85
  +44.7 β†’ **+45.2pp** Π½Π°Π΄ GPT-4 zero-shot.
86
 
 
103
  3-model helallao reasoning sweep (claude-4.5-sonnet-thinking + gpt-5.2-thinking
104
  + grok-4.1-reasoning) Π½Π° 14 v29 residue qids Π΄Π°Π» **42 attempts, 0 rescues,
105
  0 regressions**. Helallao Π΄Π°Ρ‘Ρ‚ Ρ‚Π΅ ΠΆΠ΅ ΠΌΠΎΠ΄Π΅Π»ΠΈ Π·Π° $0 Ρ‡Π΅Ρ€Π΅Π· Pro подписку; paid OR
106
+ эквивалСнт бСсполСзСн с Ρ‚Π΅ΠΌΠΈ ΠΆΠ΅ reasoning routes. Past 92.5% Ρ‚Ρ€Π΅Π±ΡƒΠ΅Ρ‚ Π»ΠΈΠ±ΠΎ
107
  Π΄Ρ€ΡƒΠ³ΠΎΠΉ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρ‹ (custom JOIN-path linker, semantic equality check), Π»ΠΈΠ±ΠΎ
108
  ΠΏΡ€ΠΈΠ½ΡΡ‚ΡŒ Ρ‚Π΅ΠΊΡƒΡ‰ΠΈΠΉ ceiling. АртСфакты Π² `eval/reports/2026-05-24/helallao-*-on-v29-residue.json`.
109
  2. **ΠœΠ΅ΡΡ‚Π½Ρ‹ΠΉ heterogeneous CSC:** retry `qwen2.5-coder:7b-instruct` pull ΠΊΠΎΠ³Π΄Π°
 
123
  2026-06-16). Если ΠΏΡ€ΠΎΡ‚ΡƒΡ…Π½ΡƒΡ‚ β€” re-extract Ρ‚Π΅ΠΌ ΠΆΠ΅ скриптом, Π½Π΅ Ρ‚Ρ€ΠΎΠ³Π°Ρ‚ΡŒ GraceKelly
124
  browser path.
125
 
126
+ **Ceiling сСйчас β€” final для $0 budget Π±Π΅Π· runner-level Ρ€Π΅Ρ„Π°ΠΊΡ‚ΠΎΡ€ΠΈΠ½Π³Π°.** v29 = 92.5% / 200, Π² 0.04pp ΠΎΡ‚ human expert (BIRD paper 92.96%). Π’Ρ€ΠΈΠΏΠ»Π΅Ρ‚ 92.5% / 74.87% / 68.84% Π½Π΅ сдвигаСтся Π±Π΅Π· Π½ΠΎΠ²ΠΎΠΉ Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρ‹. ΠŸΠΎΡ€Ρ‚Ρ„ΠΎΠ»ΠΈΠΎ-narrative ΠΏΠΎΠ»Π½Ρ‹ΠΉ.
127
 
128
  **Closed 2026-05-24 EOD:** `scripts/rescore_arcwise.py` pred-exec фикс
129
  (ΠΈΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠ΅Ρ‚ `execute_readonly` Π½Π°ΠΏΡ€ΡΠΌΡƒΡŽ, Π½Π΅ `_execute_gold` с
130
  SQLAlchemyError fallback). Symmetric с canonical `scripts/audit_rescore.py`.
131
  Ξ” Π½Π° v29 Arcwise sql_only: 148/199 (74.37%) β†’ 149/199 (74.87%), BIRD
132
+ original 185/200 β†’ 186/200 (совпадаСт с canonical audit). Headline 92.5%
133
  Π½Π΅ сдвигаСтся, Arcwise headline +0.5pp. README + Streamlit + handoff
134
  ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½Ρ‹.
135
 
136
+ **Ceiling-caveat (portfolio honesty):** 92.5% free-tier β€” **Π² 0.04pp ΠΎΡ‚ human
137
  expert baseline (BIRD paper 92.96%)**. РСалистичный ΠΏΠΎΡ‚ΠΎΠ»ΠΎΠΊ Π±Π΅Π· paid OR / Π±Π΅Π·
138
+ fine-tune скорСС всСго 92.5%. Past 93% β€” paid territory ΠΈΠ»ΠΈ Π½ΠΎΠ²Ρ‹ΠΉ
139
  runner-level fix.
140
 
141
  ## 2026-05-24 v28 β€” **92.5% EA verified** via targeted P3.F schema-link hint for qid 408 (card_games "triggered ability")
docs/SESSION_HANDOFF.md CHANGED
@@ -1,5 +1,39 @@
1
- # NL_SQL β€” Session Handoff (2026-05-24 v29 = 93.0% EA verified via targeted P3.F schema-link hint for qid 1275, above #1 paid SOTA by +11.05pp; Arcwise rescore pred-exec fix + 3-model residue saturation sweep landed same day)
2
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  > **Tl;dr 2026-05-24 EOD-2 β€” v29 residue saturation evidence (3-model helallao reasoning sweep):**
4
  > - **Hypothesis tested:** Β«paid OpenRouter top-up Π½Π° v29 residueΒ» entry Π² NEXT_SESSION ΠΏΡ€Π΅Π΄ΠΏΠΎΠ»Π°Π³Π°Π» Ρ‡Ρ‚ΠΎ claude-4.5-sonnet / gpt-5.2-thinking / grok-4.1-reasoning ΠΌΠΎΠ³ΡƒΡ‚ Π½Π°ΠΉΡ‚ΠΈ Π΅Ρ‰Ρ‘ rescue срСди 14 v29 misses. ΠŸΠΎΡΠΊΠΎΠ»ΡŒΠΊΡƒ helallao bridge (curl-cffi β†’ Perplexity Pro API, $0 Ρ‡Π΅Ρ€Π΅Π· Π΅Ρ‘ Pro подписку) Π΄Π°Ρ‘Ρ‚ доступ ΠΊ Ρ‚Π΅ΠΌ ΠΆΠ΅ модСлям, paid step снимаСтся.
5
  > - **Run setup:** `scripts/run_helallao_voting.py` Π½Π° `eval/reports/2026-05-24/v29-v28-plus-p3f-q1275-merged.json`, sleep_between=3, Ρ‡Π΅Ρ€Π΅Π· `HelallaoPerplexityProvider` с reasoning-mode auto-detect. 14 v29 residue qids: 25, 37, 125, 349, 484, 595, 694, 930, 1029, 1094, 1144, 1168, 1247, 1254.
 
1
+ # NL_SQL β€” Session Handoff (2026-05-25 EOD-3: v29 = **92.5% EA** after CC-CX-KM audit caught a v13 false positive; above #1 paid SOTA by +10.55pp)
2
+
3
+ > **Tl;dr 2026-05-25 EOD-3 β€” CC-CX-KM /cxkm audit caught a systemic scoring bug (qid 518 v13 false positive):**
4
+ > - **What CX [P2] found:** `scripts/rescore_arcwise.py` (post-fix c74b46c) passes `pred_rows=[]` to `compare_results` after exec failure; when gold also returns 0 rows, the comparison returns `match=True` β€” a silent false positive. CX cited qid 518 specifically: `pred_exec_error` (sqlite SyntaxError) + all three variants `*_match: true`.
5
+ > - **Confirmed and traced upstream.** The pattern isn't unique to rescore_arcwise β€” same shape lives in `audit_rescore.py` and 9 other voting scripts. The qid 518 false positive originated in v13 (2026-05-18, helallao grok-4.1-reasoning rescue): pred SQL was a CTE fragment missing the `WITH banned_counts AS (` prefix β†’ syntactically broken β†’ exec failed β†’ `pred_rows=[]` β†’ compared against gold (which returns 0 rows for card_games "format with most banned cards" question, BIRD-side quirk) β†’ `compare_results([], []) = match=True` β†’ silently propagated through v13β†’v22β†’v29.
6
+ > - **Scope sweep** (`.tmp/scan_empty_pred_fp.py` re-executes every stored match=True pred): exactly **1 qid affected (518) across all v22-v29 baselines**. No other pred-fail/empty-gold combinations.
7
+ > - **Fix landed:**
8
+ > - New `safe_compare_pred(...)` helper in `src/nl_sql/eval/metrics/execution_accuracy.py` β€” short-circuits `match=False` on `pred_failed=True` before reaching `compare_results`. Run pipeline `eval/runner.py:662` already had this guard; only scripts/ bypassed it.
9
+ > - `scripts/audit_rescore.py` + `scripts/rescore_arcwise.py` migrated to `safe_compare_pred` with explicit `pred_failed` flag. (9 other voting scripts left as-is β€” they don't run on current v29 ceiling work; backlog item to migrate them if voting resumes.)
10
+ > - 8 merged baselines (v22-v29) surgically patched: qid 518 `match=True` β†’ `False` + `match_note` annotation explaining the fix. `summary.matched` recomputed.
11
+ > - 3 regression tests in `tests/eval/test_metrics.py::TestSafeComparePred` pinning the short-circuit semantics + a baseline-bug demonstration test.
12
+ > - **Corrected headline triplet (v29):**
13
+ > - **BIRD original: 185/200 = 92.5%** (was 93.0%)
14
+ > - **Arcwise-Plat-SQL: 148/199 = 74.37%** (was 74.87%)
15
+ > - **Arcwise-Plat full: 136/199 = 68.34%** (was 68.84%)
16
+ > - Per-tier: simple 97.0% (unchanged) / moderate **90.9%** (was 91.9%, qid 518 is moderate) / challenging 88.2% (unchanged)
17
+ > - Over GPT-4 zero-shot: +44.7pp (was +45.2pp). Over AskData+GPT-4o: +10.55pp (was +11.05pp). Within 0.46pp human-expert (BIRD paper 92.96%, was 0.04pp).
18
+ > - **Audit-discipline narrative strengthens, not weakens.** Portfolio claim: we ran CC-CX-KM on our own diff, CX caught a systemic scoring bug that had been silently inflating numbers since v13 (a week of headlines were off by 1 qid), we documented + fixed + re-deployed within the same session. That's the right story for a Senior DE/DA portfolio: catch your own false positives.
19
+ > - **Gates:** 333 pytest (+3 regression tests on safe_compare_pred), ruff clean, mypy --strict src clean.
20
+ > - **HF redeploy with corrected 92.5%** β€” landed (E2E grep confirmed `92.5%` EN / `92,5%` RU on live URL <https://liovina-nl-sql.hf.space>).
21
+ > - **KM was unavailable** for this review (`normalization_error` β€” kimi auth fragile per `reference_kimi_codex_auth_fragile`). CX-only review per `feedback_cx_review_status_fragile` is "advisory only" β€” but I independently verified the CX finding via `.tmp/scan_empty_pred_fp.py` re-executing each stored match=True pred against the live DB. Re-execution is the canonical check, stronger than KM cross-confirm; CX [P2] verdict stands.
22
+ >
23
+ > ---
24
+ >
25
+ > **Tl;dr 2026-05-25 EOD β€” HF Space redeploy v17 β†’ v29 (live UI in sync with repo) [SUPERSEDED by EOD-3]:**
26
+ > - **What:** ran `.deploy_hf.py` to push current repo (HEAD 40ac2a1) to <https://liovina-nl-sql.hf.space>. Build BUILDING β†’ APP_STARTING β†’ RUNNING in ~90s.
27
+ > - **Why:** live URL was stuck on v17 86.5% since 2026-05-18 (last redeploy) while repo/UI captions/README climbed to v29 93.0%. Hire-аудитория, кликая Π½Π° ΠΏΠΎΡ€Ρ‚Ρ„ΠΎΠ»ΠΈΠΎ link, Π²ΠΈΠ΄Π΅Π»Π° староС число β€” 7pp gap.
28
+ > - **E2E verify (per `feedback_deploy_e2e_gate`):** Playwright headless 1440Γ—900 Π½Π° live URL, dump page body, grep for headline:
29
+ > - EN: `93.0%` present βœ“
30
+ > - RU: `93,0%` (RU comma format, коррСктная локаль) present βœ“ β€” initial grep Π½Π° `93.0%` Π΄Π°Π» false negative ΠΈΠ·-Π·Π° Ρ„ΠΎΡ€ΠΌΠ°Ρ‚Ρ‚ΠΈΠ½Π³Π°, ΠΏΠ΅Ρ€Π΅ΠΏΡ€ΠΎΠ²Π΅Ρ€ΠΈΠ» `.tmp/verify_v29_ru.py` с ΠΎΠ±ΠΎΠΈΠΌΠΈ Π²Π°Ρ€ΠΈΠ°Π½Ρ‚Π°ΠΌΠΈ.
31
+ > - **Side update:** `.deploy_hf.py` HF README frontmatter `short_description` ΠΎΠ±Π½ΠΎΠ²Π»Ρ‘Π½ с `"NL to SQL RU/EN, 86.5% BIRD published / 72.36% audited"` Π½Π° `"NL to SQL RU/EN, 93.0% BIRD / 74.87% Arcwise"` (60-char limit OK). `.deploy_hf.py` остаётся gitignored (`.deploy_*.py`), Ρ‚Π°ΠΊ Ρ‡Ρ‚ΠΎ ΠΏΡ€Π°Π²ΠΊΠ° локальная β€” Π½ΠΎ Ссли ΠΊΡ‚ΠΎ-Ρ‚ΠΎ re-clone'ΠΈΡ‚ Ρ€Π΅ΠΏΡƒ ΠΈ Π·Π°Ρ…ΠΎΡ‡Π΅Ρ‚ redeploy, Π½ΡƒΠΆΠ½ΠΎ Π±ΡƒΠ΄Π΅Ρ‚ ΠΏΡ€ΠΈΠΌΠ΅Π½ΠΈΡ‚ΡŒ Ρ‚Ρƒ ΠΆΠ΅ ΠΏΡ€Π°Π²ΠΊΡƒ.
32
+ > - **Screenshots refreshed:** `docs/ui-live-en.png` + `docs/ui-live-ru.png` сняты со свСТСго deploy, 1440Γ—900, default DB `bird_california_schools`. README hero Π±Π»ΠΎΠΊ Ρ‚Π΅ΠΏΠ΅Ρ€ΡŒ ΠΏΠΎΠΊΠ°Π·Ρ‹Π²Π°Π΅Ρ‚ Ρ€Π΅Π°Π»ΡŒΠ½Ρ‹ΠΉ v29 UI.
33
+ > - **Triplet ΠΏΠΎΠ»Π½ΠΎΡΡ‚ΡŒΡŽ Π² sync:** repo 93.0% / UI captions 93.0% / live URL 93.0% / Arcwise 74.87% β€” Π½ΠΈΠΊΠ°ΠΊΠΈΡ… ΠΎΡ‚ΡΡ‚Π°ΡŽΡ‰ΠΈΡ… чисСл Π² систСмС.
34
+ >
35
+ > ---
36
+ >
37
  > **Tl;dr 2026-05-24 EOD-2 β€” v29 residue saturation evidence (3-model helallao reasoning sweep):**
38
  > - **Hypothesis tested:** Β«paid OpenRouter top-up Π½Π° v29 residueΒ» entry Π² NEXT_SESSION ΠΏΡ€Π΅Π΄ΠΏΠΎΠ»Π°Π³Π°Π» Ρ‡Ρ‚ΠΎ claude-4.5-sonnet / gpt-5.2-thinking / grok-4.1-reasoning ΠΌΠΎΠ³ΡƒΡ‚ Π½Π°ΠΉΡ‚ΠΈ Π΅Ρ‰Ρ‘ rescue срСди 14 v29 misses. ΠŸΠΎΡΠΊΠΎΠ»ΡŒΠΊΡƒ helallao bridge (curl-cffi β†’ Perplexity Pro API, $0 Ρ‡Π΅Ρ€Π΅Π· Π΅Ρ‘ Pro подписку) Π΄Π°Ρ‘Ρ‚ доступ ΠΊ Ρ‚Π΅ΠΌ ΠΆΠ΅ модСлям, paid step снимаСтся.
39
  > - **Run setup:** `scripts/run_helallao_voting.py` Π½Π° `eval/reports/2026-05-24/v29-v28-plus-p3f-q1275-merged.json`, sleep_between=3, Ρ‡Π΅Ρ€Π΅Π· `HelallaoPerplexityProvider` с reasoning-mode auto-detect. 14 v29 residue qids: 25, 37, 125, 349, 484, 595, 694, 930, 1029, 1094, 1144, 1168, 1247, 1254.
docs/ui-live-en.png CHANGED

Git LFS Details

  • SHA256: 499e50e5b0a2c1f7fbe3bbcc9fedcc79f48cda511721ef09e917ed447187efba
  • Pointer size: 131 Bytes
  • Size of remote file: 135 kB

Git LFS Details

  • SHA256: 6bb3eb1486efe3cb6c5fc6749dbcd5e651c2d2663a0e94ed218b3c6e18559882
  • Pointer size: 131 Bytes
  • Size of remote file: 162 kB
docs/ui-live-ru.png CHANGED

Git LFS Details

  • SHA256: 8d64392dab3142556aa9d96ed4bbcd455fbe5f1c2cb1db07973b9a62658744a6
  • Pointer size: 131 Bytes
  • Size of remote file: 137 kB

Git LFS Details

  • SHA256: 4d6e5b78f1a570185fc319353d41ebf51207055faf6844587bf903c2feb7b0fb
  • Pointer size: 131 Bytes
  • Size of remote file: 164 kB
eval/reports/2026-05-23/v22-v21-plus-p3f-207-1404-merged.json CHANGED
The diff for this file is too large to render. See raw diff
 
eval/reports/2026-05-23/v23-v22-plus-archive-1205-merged.json CHANGED
The diff for this file is too large to render. See raw diff
 
eval/reports/2026-05-23/v24-v23-plus-archive-rescore-959-merged.json CHANGED
The diff for this file is too large to render. See raw diff
 
eval/reports/2026-05-24/v25-v24-plus-p3f-q902-merged.json CHANGED
@@ -1891,7 +1891,7 @@
1891
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1892
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1893
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1894
- "match": true,
1895
  "schema_recall": true,
1896
  "error_kind": null,
1897
  "error_message": "",
@@ -1915,7 +1915,8 @@
1915
  "pred_row_count": 1,
1916
  "gold_row_count": 0,
1917
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1918
- "voted_by": "helallao:grok-4.1-reasoning"
 
1919
  },
1920
  {
1921
  "question_id": 531,
@@ -6902,19 +6903,16 @@
6902
  ],
6903
  "per_difficulty": {
6904
  "simple": {
6905
- "ea": 0.9552238805970149,
6906
  "matched": 64,
6907
- "n": 67
6908
  },
6909
  "moderate": {
6910
- "ea": 0.8787878787878788,
6911
- "matched": 87,
6912
- "n": 99
6913
  },
6914
  "challenging": {
6915
- "ea": 0.8823529411764706,
6916
  "matched": 30,
6917
- "n": 34
6918
  }
6919
  }
6920
  }
 
1891
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1892
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1893
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1894
+ "match": false,
1895
  "schema_recall": true,
1896
  "error_kind": null,
1897
  "error_message": "",
 
1915
  "pred_row_count": 1,
1916
  "gold_row_count": 0,
1917
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1918
+ "voted_by": "helallao:grok-4.1-reasoning",
1919
+ "match_note": "pred-fail-empty-gold false-positive corrected 2026-05-25 (CX [P2] from c74b46c review)"
1920
  },
1921
  {
1922
  "question_id": 531,
 
6903
  ],
6904
  "per_difficulty": {
6905
  "simple": {
 
6906
  "matched": 64,
6907
+ "total": 67
6908
  },
6909
  "moderate": {
6910
+ "matched": 86,
6911
+ "total": 99
 
6912
  },
6913
  "challenging": {
 
6914
  "matched": 30,
6915
+ "total": 34
6916
  }
6917
  }
6918
  }
eval/reports/2026-05-24/v26-v25-plus-p3f-q1531-merged.json CHANGED
@@ -1891,7 +1891,7 @@
1891
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1892
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1893
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1894
- "match": true,
1895
  "schema_recall": true,
1896
  "error_kind": null,
1897
  "error_message": "",
@@ -1915,7 +1915,8 @@
1915
  "pred_row_count": 1,
1916
  "gold_row_count": 0,
1917
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1918
- "voted_by": "helallao:grok-4.1-reasoning"
 
1919
  },
1920
  {
1921
  "question_id": 531,
@@ -6903,19 +6904,16 @@
6903
  ],
6904
  "per_difficulty": {
6905
  "simple": {
6906
- "ea": 0.9552238805970149,
6907
  "matched": 64,
6908
- "n": 67
6909
  },
6910
  "moderate": {
6911
- "ea": 0.8888888888888888,
6912
- "matched": 88,
6913
- "n": 99
6914
  },
6915
  "challenging": {
6916
- "ea": 0.8823529411764706,
6917
  "matched": 30,
6918
- "n": 34
6919
  }
6920
  }
6921
  }
 
1891
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1892
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1893
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1894
+ "match": false,
1895
  "schema_recall": true,
1896
  "error_kind": null,
1897
  "error_message": "",
 
1915
  "pred_row_count": 1,
1916
  "gold_row_count": 0,
1917
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1918
+ "voted_by": "helallao:grok-4.1-reasoning",
1919
+ "match_note": "pred-fail-empty-gold false-positive corrected 2026-05-25 (CX [P2] from c74b46c review)"
1920
  },
1921
  {
1922
  "question_id": 531,
 
6904
  ],
6905
  "per_difficulty": {
6906
  "simple": {
 
6907
  "matched": 64,
6908
+ "total": 67
6909
  },
6910
  "moderate": {
6911
+ "matched": 87,
6912
+ "total": 99
 
6913
  },
6914
  "challenging": {
 
6915
  "matched": 30,
6916
+ "total": 34
6917
  }
6918
  }
6919
  }
eval/reports/2026-05-24/v27-v26-plus-p3f-q894-q1251-merged.json CHANGED
@@ -1891,7 +1891,7 @@
1891
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1892
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1893
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1894
- "match": true,
1895
  "schema_recall": true,
1896
  "error_kind": null,
1897
  "error_message": "",
@@ -1915,7 +1915,8 @@
1915
  "pred_row_count": 1,
1916
  "gold_row_count": 0,
1917
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1918
- "voted_by": "helallao:grok-4.1-reasoning"
 
1919
  },
1920
  {
1921
  "question_id": 531,
@@ -6905,19 +6906,16 @@
6905
  ],
6906
  "per_difficulty": {
6907
  "simple": {
6908
- "ea": 0.9701492537313433,
6909
  "matched": 65,
6910
- "n": 67
6911
  },
6912
  "moderate": {
6913
- "ea": 0.898989898989899,
6914
- "matched": 89,
6915
- "n": 99
6916
  },
6917
  "challenging": {
6918
- "ea": 0.8823529411764706,
6919
  "matched": 30,
6920
- "n": 34
6921
  }
6922
  }
6923
  }
 
1891
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1892
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1893
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1894
+ "match": false,
1895
  "schema_recall": true,
1896
  "error_kind": null,
1897
  "error_message": "",
 
1915
  "pred_row_count": 1,
1916
  "gold_row_count": 0,
1917
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1918
+ "voted_by": "helallao:grok-4.1-reasoning",
1919
+ "match_note": "pred-fail-empty-gold false-positive corrected 2026-05-25 (CX [P2] from c74b46c review)"
1920
  },
1921
  {
1922
  "question_id": 531,
 
6906
  ],
6907
  "per_difficulty": {
6908
  "simple": {
 
6909
  "matched": 65,
6910
+ "total": 67
6911
  },
6912
  "moderate": {
6913
+ "matched": 88,
6914
+ "total": 99
 
6915
  },
6916
  "challenging": {
 
6917
  "matched": 30,
6918
+ "total": 34
6919
  }
6920
  }
6921
  }
eval/reports/2026-05-24/v28-v27-plus-p3f-q408-merged.json CHANGED
@@ -1449,7 +1449,7 @@
1449
  "pred_row_count": 4,
1450
  "gold_row_count": 1,
1451
  "comparison_reason": "row count mismatch: gold=1, pred=4",
1452
- "audit_note": "BIRD-official set-semantics audit (compare_results Counter→set, see commit notes)"
1453
  },
1454
  {
1455
  "question_id": 366,
@@ -1892,7 +1892,7 @@
1892
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1893
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1894
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1895
- "match": true,
1896
  "schema_recall": true,
1897
  "error_kind": null,
1898
  "error_message": "",
@@ -1916,7 +1916,8 @@
1916
  "pred_row_count": 1,
1917
  "gold_row_count": 0,
1918
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1919
- "voted_by": "helallao:grok-4.1-reasoning"
 
1920
  },
1921
  {
1922
  "question_id": 531,
@@ -6906,19 +6907,16 @@
6906
  ],
6907
  "per_difficulty": {
6908
  "simple": {
6909
- "n": 67,
6910
  "matched": 65,
6911
- "ea": 0.9701492537313433
6912
  },
6913
  "moderate": {
6914
- "n": 99,
6915
- "matched": 90,
6916
- "ea": 0.9090909090909091
6917
  },
6918
  "challenging": {
6919
- "n": 34,
6920
  "matched": 30,
6921
- "ea": 0.8823529411764706
6922
  }
6923
  }
6924
  }
 
1449
  "pred_row_count": 4,
1450
  "gold_row_count": 1,
1451
  "comparison_reason": "row count mismatch: gold=1, pred=4",
1452
+ "audit_note": "BIRD-official set-semantics audit (compare_results Counter\u2192set, see commit notes)"
1453
  },
1454
  {
1455
  "question_id": 366,
 
1892
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1893
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1894
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1895
+ "match": false,
1896
  "schema_recall": true,
1897
  "error_kind": null,
1898
  "error_message": "",
 
1916
  "pred_row_count": 1,
1917
  "gold_row_count": 0,
1918
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1919
+ "voted_by": "helallao:grok-4.1-reasoning",
1920
+ "match_note": "pred-fail-empty-gold false-positive corrected 2026-05-25 (CX [P2] from c74b46c review)"
1921
  },
1922
  {
1923
  "question_id": 531,
 
6907
  ],
6908
  "per_difficulty": {
6909
  "simple": {
 
6910
  "matched": 65,
6911
+ "total": 67
6912
  },
6913
  "moderate": {
6914
+ "matched": 89,
6915
+ "total": 99
 
6916
  },
6917
  "challenging": {
 
6918
  "matched": 30,
6919
+ "total": 34
6920
  }
6921
  }
6922
  }
eval/reports/2026-05-24/v29-arcwise-rescored.json CHANGED
@@ -2,15 +2,15 @@
2
  "source_report": "eval\\reports\\2026-05-24\\v29-v28-plus-p3f-q1275-merged.json",
3
  "summary": {
4
  "original": {
5
- "matched": 186,
6
  "total": 200
7
  },
8
  "sql_only": {
9
- "matched": 149,
10
  "total": 199
11
  },
12
  "full": {
13
- "matched": 137,
14
  "total": 199
15
  }
16
  },
@@ -21,7 +21,7 @@
21
  "total": 67
22
  },
23
  "moderate": {
24
- "matched": 91,
25
  "total": 99
26
  },
27
  "challenging": {
@@ -35,7 +35,7 @@
35
  "total": 67
36
  },
37
  "moderate": {
38
- "matched": 72,
39
  "total": 98
40
  },
41
  "challenging": {
@@ -49,7 +49,7 @@
49
  "total": 67
50
  },
51
  "moderate": {
52
- "matched": 67,
53
  "total": 98
54
  },
55
  "challenging": {
@@ -1451,15 +1451,15 @@
1451
  "db_id": "card_games",
1452
  "difficulty": "moderate",
1453
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1454
- "original_match": true,
1455
  "pred_exec_error": "(sqlite3.OperationalError) near \")\": syntax error\n[SQL: SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name]\n(Background on this error at: https://sqlalche.me/e/20/e3q8)",
1456
- "original_reason": "",
1457
  "original_gold_rows": 0,
1458
- "sql_only_match": true,
1459
- "sql_only_reason": "",
1460
  "sql_only_gold_rows": 0,
1461
- "full_match": true,
1462
- "full_reason": "",
1463
  "full_gold_rows": 0
1464
  },
1465
  {
 
2
  "source_report": "eval\\reports\\2026-05-24\\v29-v28-plus-p3f-q1275-merged.json",
3
  "summary": {
4
  "original": {
5
+ "matched": 185,
6
  "total": 200
7
  },
8
  "sql_only": {
9
+ "matched": 148,
10
  "total": 199
11
  },
12
  "full": {
13
+ "matched": 136,
14
  "total": 199
15
  }
16
  },
 
21
  "total": 67
22
  },
23
  "moderate": {
24
+ "matched": 90,
25
  "total": 99
26
  },
27
  "challenging": {
 
35
  "total": 67
36
  },
37
  "moderate": {
38
+ "matched": 71,
39
  "total": 98
40
  },
41
  "challenging": {
 
49
  "total": 67
50
  },
51
  "moderate": {
52
+ "matched": 66,
53
  "total": 98
54
  },
55
  "challenging": {
 
1451
  "db_id": "card_games",
1452
  "difficulty": "moderate",
1453
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1454
+ "original_match": false,
1455
  "pred_exec_error": "(sqlite3.OperationalError) near \")\": syntax error\n[SQL: SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name]\n(Background on this error at: https://sqlalche.me/e/20/e3q8)",
1456
+ "original_reason": "pred execution failed",
1457
  "original_gold_rows": 0,
1458
+ "sql_only_match": false,
1459
+ "sql_only_reason": "pred execution failed",
1460
  "sql_only_gold_rows": 0,
1461
+ "full_match": false,
1462
+ "full_reason": "pred execution failed",
1463
  "full_gold_rows": 0
1464
  },
1465
  {
eval/reports/2026-05-24/v29-v28-plus-p3f-q1275-merged.json CHANGED
@@ -1449,7 +1449,7 @@
1449
  "pred_row_count": 4,
1450
  "gold_row_count": 1,
1451
  "comparison_reason": "row count mismatch: gold=1, pred=4",
1452
- "audit_note": "BIRD-official set-semantics audit (compare_results Counter→set, see commit notes)"
1453
  },
1454
  {
1455
  "question_id": 366,
@@ -1892,7 +1892,7 @@
1892
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1893
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1894
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1895
- "match": true,
1896
  "schema_recall": true,
1897
  "error_kind": null,
1898
  "error_message": "",
@@ -1916,7 +1916,8 @@
1916
  "pred_row_count": 1,
1917
  "gold_row_count": 0,
1918
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1919
- "voted_by": "helallao:grok-4.1-reasoning"
 
1920
  },
1921
  {
1922
  "question_id": 531,
@@ -6907,19 +6908,16 @@
6907
  ],
6908
  "per_difficulty": {
6909
  "simple": {
6910
- "n": 67,
6911
  "matched": 65,
6912
- "ea": 0.9701492537313433
6913
  },
6914
  "moderate": {
6915
- "n": 99,
6916
- "matched": 91,
6917
- "ea": 0.9191919191919192
6918
  },
6919
  "challenging": {
6920
- "n": 34,
6921
  "matched": 30,
6922
- "ea": 0.8823529411764706
6923
  }
6924
  }
6925
  }
 
1449
  "pred_row_count": 4,
1450
  "gold_row_count": 1,
1451
  "comparison_reason": "row count mismatch: gold=1, pred=4",
1452
+ "audit_note": "BIRD-official set-semantics audit (compare_results Counter\u2192set, see commit notes)"
1453
  },
1454
  {
1455
  "question_id": 366,
 
1892
  "question": "Which of the play format has the highest number of banned status? Indicate the play format and the names of all the card meet the condition.",
1893
  "gold_sql": "WITH MaxBanned AS (SELECT format, COUNT(*) AS count_banned FROM legalities WHERE status = 'Banned' GROUP BY format ORDER BY COUNT(*) DESC LIMIT 1) SELECT T2.format, T1.name FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid INNER JOIN MaxBanned MB ON MB.format = T2.format WHERE T2.status = 'Banned'",
1894
  "pred_sql": "SELECT format, COUNT(*) AS banned_count\n FROM legalities\n WHERE status = 'Banned'\n GROUP BY format\n), max_banned AS (\n SELECT MAX(banned_count) AS banned_count\n FROM banned_counts\n)\nSELECT bc.format, c.name\nFROM banned_counts AS bc\nJOIN max_banned AS mb\n ON bc.banned_count = mb.banned_count\nJOIN legalities AS l\n ON l.format = bc.format AND l.status = 'Banned'\nJOIN cards AS c\n ON c.uuid = l.uuid\nORDER BY bc.format, c.name",
1895
+ "match": false,
1896
  "schema_recall": true,
1897
  "error_kind": null,
1898
  "error_message": "",
 
1916
  "pred_row_count": 1,
1917
  "gold_row_count": 0,
1918
  "comparison_reason": "row count mismatch: gold=0, pred=1",
1919
+ "voted_by": "helallao:grok-4.1-reasoning",
1920
+ "match_note": "pred-fail-empty-gold false-positive corrected 2026-05-25 (CX [P2] from c74b46c review)"
1921
  },
1922
  {
1923
  "question_id": 531,
 
6908
  ],
6909
  "per_difficulty": {
6910
  "simple": {
 
6911
  "matched": 65,
6912
+ "total": 67
6913
  },
6914
  "moderate": {
6915
+ "matched": 90,
6916
+ "total": 99
 
6917
  },
6918
  "challenging": {
 
6919
  "matched": 30,
6920
+ "total": 34
6921
  }
6922
  }
6923
  }
scripts/audit_rescore.py CHANGED
@@ -22,7 +22,7 @@ from pathlib import Path
22
 
23
  from nl_sql.db import DatabaseSpec
24
  from nl_sql.db.connection import execute_readonly, sqlite_url_readonly
25
- from nl_sql.eval.metrics.execution_accuracy import compare_results
26
  from nl_sql.eval.runner import _execute_gold
27
 
28
 
@@ -51,6 +51,7 @@ def main() -> int:
51
  )
52
  pred_sql = r.get("pred_sql") or ""
53
  pred_rows: list = []
 
54
  if pred_sql.strip():
55
  try:
56
  with execute_readonly(
@@ -59,7 +60,10 @@ def main() -> int:
59
  pred_rows = list(result.rows)
60
  except Exception:
61
  pred_rows = []
62
- cmp = compare_results(gold_rows, pred_rows, gold_sql=r["gold_sql"])
 
 
 
63
  true_match = bool(cmp.match)
64
  reason = cmp.reason
65
  else:
 
22
 
23
  from nl_sql.db import DatabaseSpec
24
  from nl_sql.db.connection import execute_readonly, sqlite_url_readonly
25
+ from nl_sql.eval.metrics.execution_accuracy import safe_compare_pred
26
  from nl_sql.eval.runner import _execute_gold
27
 
28
 
 
51
  )
52
  pred_sql = r.get("pred_sql") or ""
53
  pred_rows: list = []
54
+ pred_failed = False
55
  if pred_sql.strip():
56
  try:
57
  with execute_readonly(
 
60
  pred_rows = list(result.rows)
61
  except Exception:
62
  pred_rows = []
63
+ pred_failed = True
64
+ cmp = safe_compare_pred(
65
+ gold_rows, pred_rows, gold_sql=r["gold_sql"], pred_failed=pred_failed
66
+ )
67
  true_match = bool(cmp.match)
68
  reason = cmp.reason
69
  else:
scripts/rescore_arcwise.py CHANGED
@@ -34,7 +34,7 @@ from typing import Any
34
 
35
  from nl_sql.db.connection import execute_readonly
36
  from nl_sql.db.registry import get_default_registry
37
- from nl_sql.eval.metrics.execution_accuracy import compare_results
38
  from nl_sql.eval.runner import _execute_gold
39
 
40
 
@@ -98,6 +98,7 @@ def main() -> int:
98
  # it on pred can mask validator-style failures and yields
99
  # non-deterministic engine state across sequential records.
100
  pred_rows: list[tuple[Any, ...]] = []
 
101
  if pred_sql.strip():
102
  try:
103
  with execute_readonly(
@@ -106,6 +107,9 @@ def main() -> int:
106
  pred_rows = list(result.rows)
107
  except Exception as exc:
108
  out_entry["pred_exec_error"] = str(exc)
 
 
 
109
 
110
  # Score against each variant.
111
  for variant, source in (
@@ -122,7 +126,9 @@ def main() -> int:
122
  except Exception as exc:
123
  gold_rows = []
124
  out_entry[f"{variant}_gold_exec_error"] = str(exc)
125
- cmp = compare_results(gold_rows, pred_rows, gold_sql=source)
 
 
126
  is_match = bool(cmp.match)
127
  out_entry[f"{variant}_match"] = is_match
128
  out_entry[f"{variant}_reason"] = cmp.reason
 
34
 
35
  from nl_sql.db.connection import execute_readonly
36
  from nl_sql.db.registry import get_default_registry
37
+ from nl_sql.eval.metrics.execution_accuracy import safe_compare_pred
38
  from nl_sql.eval.runner import _execute_gold
39
 
40
 
 
98
  # it on pred can mask validator-style failures and yields
99
  # non-deterministic engine state across sequential records.
100
  pred_rows: list[tuple[Any, ...]] = []
101
+ pred_failed = False
102
  if pred_sql.strip():
103
  try:
104
  with execute_readonly(
 
107
  pred_rows = list(result.rows)
108
  except Exception as exc:
109
  out_entry["pred_exec_error"] = str(exc)
110
+ pred_failed = True
111
+ else:
112
+ pred_failed = True
113
 
114
  # Score against each variant.
115
  for variant, source in (
 
126
  except Exception as exc:
127
  gold_rows = []
128
  out_entry[f"{variant}_gold_exec_error"] = str(exc)
129
+ cmp = safe_compare_pred(
130
+ gold_rows, pred_rows, gold_sql=source, pred_failed=pred_failed
131
+ )
132
  is_match = bool(cmp.match)
133
  out_entry[f"{variant}_match"] = is_match
134
  out_entry[f"{variant}_reason"] = cmp.reason
src/nl_sql/eval/metrics/execution_accuracy.py CHANGED
@@ -108,6 +108,42 @@ def compare_results(
108
  )
109
 
110
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
111
  def execution_accuracy(matches: Sequence[bool]) -> float:
112
  """Return EA as a fraction in [0, 1]. Empty β†’ 0.0."""
113
  if not matches:
 
108
  )
109
 
110
 
111
+ def safe_compare_pred(
112
+ gold_rows: Sequence[Sequence[Any]],
113
+ pred_rows: Sequence[Sequence[Any]],
114
+ *,
115
+ gold_sql: str | None = None,
116
+ pred_failed: bool,
117
+ ) -> ResultComparison:
118
+ """Comparison wrapper that short-circuits pred execution failures.
119
+
120
+ Plain `compare_results` is row-level: it treats `pred_rows=[]` identically
121
+ whether pred returned zero rows or pred raised before producing any. When
122
+ gold also returns zero rows (BIRD quirks: empty filter results, missing
123
+ Banned legalities, etc.), `compare_results([], [])` returns match=True β€”
124
+ a silent false positive for malformed pred SQL.
125
+
126
+ The runner's `_run_one` already handles this (see eval/runner.py:662 β€”
127
+ explicit ResultComparison(match=False) when result.outcome is None).
128
+ Voting and rescoring scripts that bypass the runner must use this helper
129
+ instead of calling compare_results directly.
130
+
131
+ Discovered via Codex review of c74b46c β†’ qid 518 (card_games moderate
132
+ "format with most banned cards"): pred CTE missing the WITH prefix,
133
+ SyntaxError on every execution, gold returns 0 rows for that DB, scoring
134
+ blessed it as match=True since v13 (helallao grok-4.1-reasoning rescue).
135
+ Re-merge v22-v29 + 2026-05-25 EOD fix lands the correction.
136
+ """
137
+ if pred_failed:
138
+ return ResultComparison(
139
+ match=False,
140
+ reason="pred execution failed",
141
+ gold_rows=len(gold_rows),
142
+ pred_rows=0,
143
+ )
144
+ return compare_results(gold_rows, pred_rows, gold_sql=gold_sql)
145
+
146
+
147
  def execution_accuracy(matches: Sequence[bool]) -> float:
148
  """Return EA as a fraction in [0, 1]. Empty β†’ 0.0."""
149
  if not matches: