Skip to content

fix: retain requested summaries over selected detail rows - #329

Draft
seyoung4503 wants to merge 4 commits into
fix/sql-aggregate-scopefrom
fix/sql-selected-summary
Draft

seyoung4503 wants to merge 4 commits into
fix/sql-aggregate-scopefrom
fix/sql-selected-summary

Conversation

@seyoung4503

@seyoung4503 seyoung4503 commented Nov 26, 2026 •

Copy link
Copy Markdown
Collaborator

Repeated ranked-detail queries stop at a per-item allocation even when a summary across the selected items is also requested. The prior generic aggregation instruction emphasizes returning one grain and can leave this mixed detail/summary output unspecified.

Clarify the existing shared rule: select/rank items first, then compute the cross-item summary with a window or joined aggregate while retaining requested detail rows. Distinguish entity identifiers, ranking measures, per-item measures and final summaries. No example answers, schema names, benchmark identifiers or SQL replacement are added.

Validation: 260 root tests passed, 1 skipped; diff clean. Ruff passes excluding the pre-existing BLE001 finding in the untouched schema enrichment handler. A fresh Codex MCP execution completed on the affected remaining failure local194, with gpt-6.2-sol/high through ChatGPT login: 1/1 repaired. The model now selects the top items before applying AVG over the per-item allocations, retains the requested detail rows, and passes the unchanged official comparator. No previously correct cases are replayed and no grader feedback is provided to the model. This is one targeted repair, not full benchmark accuracy or an isolated causal-effect claim. Full MCP traces, answer, manifest, settings, scores and source hashes are committed under bench/accuracy/mcp-review-results/selected-summary-7aadca6. Stacked on #328; keep draft.

Reuse: existing BASE_INSTRUCTIONS -> production MCP initialization and internal harness; one rule replaced, net zero lines, no new function.

Principle Result Evidence
Reuse O Existing shared prompt and runner
Cause O Missing final aggregation after item selection
Logging/errors N/A No execution/error path changes
Environment/configuration N/A No new runtime values
Comments O No issue-number comments
Verification O 260 passed, 1 skipped; baseline lint exception disclosed
Authorization O Branch and draft PR only
Call path O Shared instructions -> Codex MCP -> existing SQL tools
Sync/async N/A No new I/O

Further evaluation of previously failed full-set cases is running from immutable revision 7aadca6: 44 Spider and 64 BIRD cases outside the already examined development20. No prior-correct cases are included. Prior API -> current Codex path differences are explicit; repair rates will not be combined into a full accuracy claim.

Completed broader Spider repair evaluation at frozen 7aadca6: 2/44 prior failures repaired; 15 clarification/no-final-SQL failures and 27 executed-result mismatches remain. This contradicts extrapolating the targeted single-case repair to broad accuracy. Full source-hashed MCP traces, answers, manifests and scores are committed under bench/accuracy/mcp-review-results/prior-full-failures-7aadca6/spider. BIRD evaluation is now complete: 24/64 prior failures repaired. Following user direction, new prompt tuning has stopped; deterministic tool/runtime fixes proceed separately in #331 and #332.

Completed diagnostic audit (not alternate grading): Spider has 15 no-final-SQL cases, 6 row-count mismatches against every reference variant, 21 column-value/projection mismatches and 2 correct cases. BIRD has 5 no-final-SQL cases, 2 projection-only mismatches, 3 tiny numeric-representation differences, 30 other value/population mismatches and 24 correct cases. Source-hashed complete records and per-case result-audit.json files are committed for both suites. These classifications do not alter official scores or feed reference values to inference. No active model evaluation remains from this batch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant