Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
387 changes: 387 additions & 0 deletions bench/accuracy/experiments/spider-grain-review/manifest.json

Large diffs are not rendered by default.

113 changes: 113 additions & 0 deletions bench/accuracy/experiments/spider-grain-review/protocol.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"purpose": "Check existing evidence-only review for lost group grain after per-group ranking",
"ids": [
"local059"
],
"model": "gpt-6.2-astra",
"reasoning_effort": "high",
"source": "/Users/seyoung/workspace/benchmarks/codex-mcp-astra-spider-backlog-20261127/spider-gpt-6.2-astra",
"metric": "One selected failure repair, not full accuracy or same-budget pass@1",
"inference": "Only original inputs and whitelisted previous model answer/tool observations; no counterfactual SQL, analyst diagnosis, reference data or grading feedback",
"change": "No product or prompt changes; current runtime inherited from PR347",
"source_code_sha256": {
"src/lang2sql/__init__.py": "d20cbfc39f51f4466f82cde35d38189762e3481a3e6855073919f4bc7f132318",
"src/lang2sql/ingestion/__init__.py": "2def2216d0079184747baf7f521d162172b84a4c654b7bf6f8a5974081652375",
"src/lang2sql/ingestion/pipeline.py": "c7142e44a3f19db25ebaafab63739cc4210fe64d9d4f153b0ac113bfe664a217",
"src/lang2sql/tools/explore_schema.py": "86a50470ec674f2302f1f554af978a02d77322c8d96ef4ba6d2152517182eac5",
"src/lang2sql/tools/ingest_doc.py": "73a64a29fd7a3f3aac4722c1086ddac57c24c747f9fab0bf05cc0ebb05feb6ca",
"src/lang2sql/tools/calendar_interval_sql.py": "c8395a11f42cc370bb1994c718c90563ab55824939effd3e4abe5865aeffe7ec",
"src/lang2sql/tools/confirm_ingest.py": "4ee700bf6d5a0147e5a2ba7ca738a9c6db723f96aa18465a45ba846c619a8334",
"src/lang2sql/tools/org_setup.py": "713a9b17773bdfffccdfdf5302bdb284ae6561b82d84b42908e706f0bad96aa0",
"src/lang2sql/tools/__init__.py": "d372cdea6c163a44bc83db2d7d296435454113f884287d23bef6de5845cc0f7f",
"src/lang2sql/tools/ask_user.py": "ed1f7128187776c71b1787a8506532587423cd023d5aba6b4842a098a73f20f6",
"src/lang2sql/tools/run_sql.py": "3a7352d3ee31f07687944100e5c7b19c8362a9d8debd9f92402bf3a46fce46f6",
"src/lang2sql/tools/semantic_federation.py": "0d1e83a4f76b9d3d4b2ffec636dcaaec924e1526e2eeac47c06f662a7b15471b",
"src/lang2sql/tools/context_candidates.py": "ee758ae4fdeb34ab5dad65de9bd452c1831a063800c9ba2874912071b24c3965",
"src/lang2sql/tools/resolve_business_terms.py": "53acbcc3e13fd8b2f24eafde9d23439b6d8a792dd62651db0faad1bc53e5c23a",
"src/lang2sql/tools/bound_metric.py": "d95f13419806cf6e882141faabe1438daeac631532e6158f37917a4bcfa901a9",
"src/lang2sql/tools/remember.py": "db66e08d6185cbee655f8f5b673e80a41179998dc7648b83ca88c5326d0079c6",
"src/lang2sql/tools/recall_memory.py": "ec2b9b2fafe9964dd259fbf468fca8ece31aaece909bc6b77d7bc258b68a840a",
"src/lang2sql/tools/fixed_decimal_sql.py": "48d7f31a2902a7d2fd0af30bdd09c7a78c6e662030d7beeb91d88e21d45b3bb9",
"src/lang2sql/tools/ping.py": "bf6d953e74c7d9844811ff1523c3d57c1f043ea320da00d8449bbd43700a5480",
"src/lang2sql/tools/enrich_schema.py": "5be7f39d9585da23e18ea3007b8983f3d2d74c5027e369b1b736d4a8f2151009",
"src/lang2sql/core/__init__.py": "59cbd8c3530f31cf76c088575daff17be9d1c85bfee67263ace3134125bfddab",
"src/lang2sql/core/types.py": "6f3cc279d62cf3e4ac8516c125083377762bf39fc65e5d2f0c7a2626a7d87883",
"src/lang2sql/core/identity.py": "0535134b5fd93746e4ed74bde3216df874d0acb2881d35061bbb580666f82bdc",
"src/lang2sql/memory/service.py": "ed57549ade7035d3004a3673bdefaa94e9d95928549ee6d5ba2d0421fbc4734e",
"src/lang2sql/memory/__init__.py": "7e33abdf9572504bf99b5d94028b2682ad2670e763b96ec6f86e5828129686bc",
"src/lang2sql/tenancy/__init__.py": "bcc9fcb0ffb57a859eeff2b8d52d3177f9d17d52d09c494c922a0e82e15b45e5",
"src/lang2sql/tenancy/tool_runtime.py": "aab33e961b8faf58c9db54e8abbeb1ed0cf6bde1f576bd486263372f736f7ab2",
"src/lang2sql/tenancy/concierge.py": "e2ab6e3843d4772bf00128e40214288b674972e149966d888991e5bfa6f8e9fa",
"src/lang2sql/tenancy/encrypted_secrets.py": "00e227d7c5f62a9fb32a3bf4df1051c4d6a0586247858abb9160e11bba2445bd",
"src/lang2sql/frontends/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"src/lang2sql/frontends/metadata_options.py": "be1b000cc1c0ef1c436fc14183cc05f73db1fd4dbe772763990e58877a1fc7ab",
"src/lang2sql/safety/__init__.py": "230c188e9ec443c75b649a2dd0b53bb06a41dc84564efad3b3ad0218808896ab",
"src/lang2sql/safety/pipeline.py": "8a75f6913c443d27a229e3f852e77807544f707daacc80122afe4162b78153b4",
"src/lang2sql/adapters/__init__.py": "09dba1b7e9efa2c1747bd631e3bb9b25b21bba7fd37ee12820b884ddf798c600",
"src/lang2sql/harness/tool_registry.py": "c0313d56c63da2382344755d6b5684b821219179984b1ea6d7c6a2addd69a486",
"src/lang2sql/harness/system_prompt.py": "913edf8303fa6977e3974d76dc6db95ec08d17cf012342b216ac99e49882f832",
"src/lang2sql/harness/session.py": "dae446ddcdbd5cb498fe5cd69984ccb8144de12dc19b3790d86afb5c48593330",
"src/lang2sql/harness/__init__.py": "f00c3d0fa8e7b08b0a967c95ef36a3422f35cbb13cbf4c1c2b70c2e894f8b108",
"src/lang2sql/harness/context.py": "7960927502b397544eb891074e3e65f72e4c8d2ba11d0dca3bf176b67d5349e2",
"src/lang2sql/harness/loop.py": "9941af684a573b1cb04b80211b8d2175a2aa20be23b028158b32e63fe3151736",
"src/lang2sql/semantic/__init__.py": "bbf42232e94bf022efc17e86524d3708c36b6d93cfd526b8b64900d689ac6eef",
"src/lang2sql/semantic/types.py": "709d8a40150d410db058cb62850dc092afc5b0006b40e6327f5b2575646d4af0",
"src/lang2sql/adapters/llm/fake.py": "ace77dca3c1a9e895981ae85deb1221c47178decb261b90c2a1038e2eeef018d",
"src/lang2sql/adapters/llm/__init__.py": "d960fe2dc214dec9aa22f2d6e4fffebb90c815690909cb703cb91fd267381783",
"src/lang2sql/adapters/llm/openai_.py": "538b8e603b6ddc1cc60e601bc55e0f5b438a05b581f7f1a4537282a3411efce2",
"src/lang2sql/adapters/storage/oracle_store.py": "50315049e241d35be2c76303251bf81e824599a7eec59d19d9835174b8c97787",
"src/lang2sql/adapters/storage/__init__.py": "3e323b08ae8bc8f840a0d4da096be4486d718d133497f5ebc23a757aa795fb6d",
"src/lang2sql/adapters/storage/sqlite_store.py": "7d3c612a7f649797da5012c4c5887a105166745b38a2242464704ccf7b454156",
"src/lang2sql/adapters/storage/okf_bundle.py": "b716df40e9b4bf5f6e0017389e77931c13f59ff5b1b720f78ad2fa68c2e4190b",
"src/lang2sql/adapters/storage/persistent_memory.py": "1a5fa263ab6e9fc17c62eccd5db0ff3cd34589ee8023c4edd4a839085cb96f40",
"src/lang2sql/adapters/db/d1_explorer.py": "547ff7e0e33ff94d9fb6662dcafd78aefc4fd65040ceecccc971bf049e84433a",
"src/lang2sql/adapters/db/__init__.py": "1692308cebe6d83309966f69882cd6b7674f5603ecf63d2b98ff81981171bbb9",
"src/lang2sql/adapters/db/dsn_builder.py": "e0d462d644cfef4fdad594bac059b65c57fb5233cd66f93f541945224438219b",
"src/lang2sql/adapters/db/factory.py": "af358be77a24879677236de81fc7d7f0a1f78e62f5471ffe79e0ea2dcb984c4b",
"src/lang2sql/adapters/db/oracle_view.py": "6e544be664c0ac5e6c32fce0d2780f400e52e5252bb3c1366753da4760cb0672",
"src/lang2sql/adapters/db/sqlalchemy_explorer.py": "cefba7994602e25c66a9134d4cb5243e32a713b72a50a733a187245298292839",
"src/lang2sql/adapters/db/postgres_explorer.py": "3309937b073c77c91a3a1352e74f5c78e9cbebe5671eeb27deb9e120c235ad87",
"src/lang2sql/safety/layers/whitelist.py": "6ae3ab7d2e4de5639bcd7be16a402d5cb9616eec9132252bfeedccbfafd9d35f",
"src/lang2sql/safety/layers/row_limit.py": "cb6ab7b0922059e1d9af0e1b2b2ead86590dfce9ffa7e5f27f60344d92ec5287",
"src/lang2sql/safety/layers/timeout.py": "9f04c8a18bb860f56fe8987477dd961b7041c5700a1589e47db0a438c7a1866e",
"src/lang2sql/safety/layers/__init__.py": "18e4e07626c56aa37e4b2c86b822f622ece4e9e1d275897005cb23beffc54797",
"src/lang2sql/frontends/discord/render.py": "ebc0d1a4544c6c2d03d3c1aad409df37b938dd343b0422722370edcba7438fe3",
"src/lang2sql/frontends/discord/__init__.py": "ce3131eb1702a3f1d18715de4b155706988192dca2b4ed483de63341f8a6de60",
"src/lang2sql/frontends/discord/setup_wizard.py": "f530876656916fe2da5726278fc9c9ac9805dbefdc192409459cf53af1c4c241",
"src/lang2sql/frontends/discord/bot.py": "41629ef351d6e1e1af14297fad076191c56291fb577effb3cb0dde4f9cceef97",
"src/lang2sql/frontends/discord/commands.py": "8369eabfb617bc74bd8c276cfea4827ffaeaa9eae109b21e10c6d785690e4e1e",
"src/lang2sql/frontends/discord/session_router.py": "e3459a59963d57f3c44fa113cbd372f6f24d58f7012f17405eb9c38bc3f64c46",
"src/lang2sql/frontends/discord/term_wizard.py": "22298a2b93d57b1537a76c5998ae7204dacee16d5ca46ffc220b98db33948a07",
"src/lang2sql/frontends/web/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"src/lang2sql/frontends/mcp/server.py": "0836ca4631f321c3f3a2c7524e71f6f31e60ac77286633833af6810d3443ddcb",
"src/lang2sql/frontends/mcp/__init__.py": "c4b763a246edae7bfe5e76bf61b81e416b6ef56fe80069b0b21ee2d03d7b4b17",
"src/lang2sql/frontends/cli/tools.py": "ee2e8d40003df65f0bcde00bc16ce4158ba8dfa6052dda809cb1570ae98d7818",
"src/lang2sql/frontends/cli/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"src/lang2sql/frontends/cli/app.py": "31fb34f648ad4df5fab996c9ffe96ef631f445dd5cec58e96c8368b48ce51b75",
"src/lang2sql/frontends/slack/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"src/lang2sql/memory/stores/__init__.py": "567c0208003e6309370af2dda9998d9ff915fe42156dcea29fb7fd36989ae08f",
"src/lang2sql/memory/stores/in_memory.py": "c1f24826872a88000ea10138979386df9c3013dcd3f74c66f628321a16505977",
"src/lang2sql/memory/recall/inject_all.py": "46652cde0d1863f80b805fd0b786ded74ff111cd2edec9608a654d34a451de66",
"src/lang2sql/memory/recall/__init__.py": "ab4a64d8ea78b3a455d730ec769a721c1a78dd9f2c5026af77dbaa1ca6fbe725",
"src/lang2sql/memory/extractors/__init__.py": "de126ed4f3bc931ecb7aa8a6c30cb788c8898e6bf88814afebe828c5ddf56aa9",
"src/lang2sql/memory/extractors/manual.py": "ba5bb4fb84c6150d8ac357b7f43800ccff23fa77d2671c18a846a116aeec6f05",
"src/lang2sql/core/ports/ingestion.py": "9679eee37db5b925246c46aabf821710ba34740a7b910651cc75352c3921e6d1",
"src/lang2sql/core/ports/metadata.py": "6f98ab915c0a483cba3c9c60ba6bc4910317e1af82342b89cc2ffc24867d5648",
"src/lang2sql/core/ports/audit.py": "caa6de80043f4514ee0b78212aa4a7ad909adb91cfc5f56156ed017b1ee3c3c4",
"src/lang2sql/core/ports/memory.py": "66e0529a2a2ff2baf8933d556d28eef3982bff622ead28918f7a2b20e52c8678",
"src/lang2sql/core/ports/semantic_scope.py": "6fd0cebd407cf5ec1f9067bcd37a3ae723f40250c117b7719f8e8390ab3b9d79",
"src/lang2sql/core/ports/frontend.py": "9742fae10353b76ef27c017f1f38fd8112b6ab102d54113676b1f26aa31ab715",
"src/lang2sql/core/ports/__init__.py": "9d55f36c80904fd6824ab4ac27bdafec3d7f119d0a09dd1920aaa140252740ac",
"src/lang2sql/core/ports/llm.py": "bbb5318234a268d65f88370726e6dca3d96898a9c57f151ec6effe7e3373676a",
"src/lang2sql/core/ports/explorer.py": "059e89e6b2731d61175a82fa95ad9d04a40477268d26c1365dae112fc8176584",
"src/lang2sql/core/ports/secrets.py": "bef215031fc1ade47256f55c18f3c7ff599be52fb73888c96774d96f154746c6",
"src/lang2sql/core/ports/safety.py": "4ca9716497bda4a8d3e09a1c0365966df6933af52f6d1e489f31ca204301c5fc",
"src/lang2sql/core/ports/session_store.py": "ac34f33175f30378ad3269a4b931fee8e4e073b8f52c20be3c5c229e21ad526d",
"src/lang2sql/core/ports/tool.py": "8ee910e7a5446f0ee0f1479a61a7a4017541ed062c6296bafb33c62bcc9242d2",
"src/lang2sql/ingestion/sources/file_source.py": "7a151ba64bbfb9e2117cee936c1bc47911be40adabfae5220df0717d4628612d",
"src/lang2sql/ingestion/sources/__init__.py": "67f4793e467bd9d07308bd3b7941781f49e9038d5000ba0a1f9e1a819f166f29",
"src/lang2sql/ingestion/extractors/__init__.py": "c52ac35a6ff7532e60fdcf7fdfd1785ea036460e7f851af0bac76a2afdfdf19e",
"src/lang2sql/ingestion/extractors/llm_extractor.py": "6a628c5edeb6b28de43fe88bf05285d42681ac52ecd1fdfd6ec6da1840419bec"
},
"record_sha256": "e15896e5ff434b51a544362308b83f4de98ce4e5e7205d2020a1979b98fc7a4b"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"revision": "f0d5b8e",
"model": "gpt-6.2-astra/high",
"correct": 0,
"total": 1,
"metric": "One selected failure review, not full Spider accuracy",
"result": "Retained global final AVG and changed intermediate entity grain from product_code to product name. No repair.",
"offline_diagnoses": {
"local059": "Keeping division in final AVG matches reference; counterfactual only, not a model success. Wording admits a global vsper-division interpretation difference.",
"local283": "Ranking within season and league gives90 rows; all88 reference rows and points match, plus two tied first-place teams. Reference retains only one per group without a question-specified tie rule.",
"local015": "Unpivoting unchanged numeric rates gives matching numeric percentages; some references require different group strings and others extra numerator/denominator columns. No reference-derived labels/count columns injected into model."
},
"decision": "Do not keep repeating unmodified evidence review; distinguish group interpretation and reference-output constraints from arithmetic defects",
"limits": [
"No production code or prompt edits",
"All counterfactual SQL and comparator analysis kept out of inference",
"Original official scores/denominators unchanged; offline matches not counted as repairs",
"One added invocation, not same-budget pass@1",
"No already-correct case rerun"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"scope": "Offline diagnostic only, not a model repair score. No reference-dependent edits beyond the explicitly recorded grain hypothesis. Never passed to inference.",
"evaluator_sha256": "e93624e4ffa00e51c67bdee1d9e42b534630087cb453270c0dedc0c73e618480",
"cases": [
{
"id": "local015",
"question": "Please calculate the fatality rate for motorcycle collisions, separated by helmet usage. Specifically, calculate two percentages: 1) the percentage of motorcyclist fatalities in collisions where parties (drivers or passengers) were wearing helmets, and 2) the percentage of motorcyclist fatalities in collisions where parties were not wearing helmets. For each group, compute this by dividing the total number of motorcyclist fatalities by the total number of collisions involving that group. Use the parties table to determine helmet usage (from party_safety_equipment fields).",
"record_sha256": "708749c8697be5b835c5d2012b119c99ac2d5d3b4b8f603cbd9a9ea4769da857",
"db_sha256": "14ace2b5213306081611b24647fe70778426bbcb0d5b30e85beb0386ffcf1020",
"original_rows": 1,
"counterfactual_rows": 2,
"change": "Unpivot the same numeric rates into helmet groups using descriptive labels derived from prior query, not reference strings",
"comparisons": [
{
"reference": "local015_a.csv",
"sha256": "1d0afabe2283a59d441749067202ebcd70738034bd51d5e594675912f1a65106",
"rows": 2,
"counterfactual_matches": false,
"unmatched_columns": [
"helmet_usage"
]
},
{
"reference": "local015_b.csv",
"sha256": "6d2f13248ceed54c99e70aae4c036a3886505ef8317f01cd84581180755d209e",
"rows": 2,
"counterfactual_matches": false,
"unmatched_columns": [
"helmet_usage_group"
]
},
{
"reference": "local015_c.csv",
"sha256": "97b0b536c43f4dd48a36cced476efd98a469d2c5dd0950dbaab29924e7a7b31c",
"rows": 2,
"counterfactual_matches": false,
"unmatched_columns": [
"collision_count",
"motorcyclist_fatalities"
]
},
{
"reference": "local015_d.csv",
"sha256": "56f7cfa3c4a037c1c333de502d69d6c916da6014cff549996b09ecc3a89503bd",
"rows": 2,
"counterfactual_matches": false,
"unmatched_columns": [
"HELMET_GROUP",
"TOTAL_COLLISIONS",
"TOTAL_FATALITIES"
]
},
{
"reference": "local015_e.csv",
"sha256": "a39ca5bb24cf3c1856102f53125f56c8fe686bc137b7402caaaac932e4a0d78f",
"rows": 2,
"counterfactual_matches": false,
"unmatched_columns": [
"HELMET_STATUS",
"TOTAL_FATALITIES",
"TOTAL_COLLISIONS"
]
}
]
},
{
"id": "local059",
"question": "For the calendar year 2021, what is the overall average quantity sold of the top three best-selling hardware products (by total quantity sold) in each division?",
"record_sha256": "e15896e5ff434b51a544362308b83f4de98ce4e5e7205d2020a1979b98fc7a4b",
"db_sha256": "d3498b07f44a4ac1757798d70f4cac7c44d16082c0608c58a74d5aa0d6d058f9",
"original_rows": 1,
"counterfactual_rows": 3,
"change": "Carry division to final AVG and GROUP BY division",
"comparisons": [
{
"reference": "local059_a.csv",
"sha256": "d9b908bce1098fec3340ca821a2d0cc8f1081c3c0b3d9dc443d70887371bbfc7",
"rows": 3,
"counterfactual_matches": true,
"unmatched_columns": []
}
]
},
{
"id": "local283",
"question": "Analyze the soccer match dataset to determine the champion team for each season across all countries and leagues, awarding 3 points for every win, 1 point for every tie, and 0 points for every loss. For each season, return the champion\u2019s team name, the league, the country, and the total points accumulated.",
"record_sha256": "16cfd2effe1b2ab58b57957e9cce05ee49381662a89055516511901fef224721",
"db_sha256": "b4ebd079625bb9cd20437eaae1ccd0fc82f0f390567cfe3ee1df78fa08ad5f9a",
"original_rows": 8,
"counterfactual_rows": 90,
"change": "Partition season rank by both season and league_id",
"comparisons": [
{
"reference": "local283_a.csv",
"sha256": "6e3d87df7b2a5a1147f62fe65de3b1292f5af15f1de5584593de863534442f68",
"rows": 88,
"counterfactual_matches": false,
"unmatched_columns": [
"total_points"
]
}
]
}
]
}
Loading