diff --git a/bench/accuracy/experiments/spider-grain-review/manifest.json b/bench/accuracy/experiments/spider-grain-review/manifest.json new file mode 100644 index 00000000..b107ba31 --- /dev/null +++ b/bench/accuracy/experiments/spider-grain-review/manifest.json @@ -0,0 +1,387 @@ +{ + "benchmark": "Spider 2.0-Lite SQLite subset", + "upstream_commit": "cafb867313aab4e674652054198f383cf4018943", + "baseline_commit": "e0a7fb1", + "seed": 20261114, + "selection": "seeded shuffle of local IDs before inference", + "question_file_sha256": "4ba48916576fbd60311a2478c6d4550b5d8cf3fcbc512457ea493b5941ca009d", + "evaluator_sha256": "e93624e4ffa00e51c67bdee1d9e42b534630087cb453270c0dedc0c73e618480", + "db_sha256": { + "IPL": "bf5ddbf887bbf992a091ef31ee681b9339ba716c327263fce0f3b4da924f22c1", + "bank_sales_trading": "10c8b8136486902a19c3f974f210e9fb7c8f98918ae0313114c720219b02e18c", + "city_legislation": "6a9714f9fe11676691c38bb6e2cd048ab877415d28c358a2647ff1b8b8bfe763", + "modern_data": "d4910db155d7be8070d14cab6e44862d0fa74d71e6588d114c4bacb4225942e4", + "delivery_center": "d882e3e6552634e27739beab4c65fe8ec2086b84155489762f9052a663913f9e", + "Pagila": "dbca3837b9965d75fbc2b4af1b2daec57d841f95942e656cea44db997e05da88", + "E_commerce": "49446afd935721ee12fc95316fbee9666a3e1bd4872dfa194fe4625d6762a81a", + "electronic_sales": "8e759e113c316c7f996c2e721b596f73979fe679abeacb21e6ea5dbe6fc62eaa", + "oracle_sql": "ace68ede8f7fddc523d522e938ccfeee1f54c11888fd2c956ebc27892fc595fe", + "Airlines": "83dd643367785c6b38b5379eecaf2c37128babac96805a48362783ff0cafc0a1", + "education_business": "d3498b07f44a4ac1757798d70f4cac7c44d16082c0608c58a74d5aa0d6d058f9", + "California_Traffic_Collision": "14ace2b5213306081611b24647fe70778426bbcb0d5b30e85beb0386ffcf1020", + "Baseball": "4784826541ea40d76dd9c2da2812e189ec351ca79e2738916da5587b465341cd", + "music": "f82efedb6c5c40734609e168bc5be5616a2eca6b90ed0048451a8674625e03a3", + "complex_oracle": "2244dbd99d5205941353024332eb62b1754d3383bcd7c8c20361344d736be00c", + "WWE": "5e21654b3ea344583c921864c499ea984e66fb46579f7d4e74f531d0f415a52a", + "EU_soccer": "b4ebd079625bb9cd20437eaae1ccd0fc82f0f390567cfe3ee1df78fa08ad5f9a", + "f1": "35ad3b824678e8435bde02f14bcd554630792874749fdd59fe9ca1385234ce23", + "Db-IMDB": "34b043fffa7e10a152c8d1536bb54e5365df102ac9d8c09d4549ef0d9ef6aadf", + "log": "800191cd5ba91dcaebb427bb9313dc5bef1571b848b597508f15372e77c2dbd8", + "sqlite-sakila": "dbca3837b9965d75fbc2b4af1b2daec57d841f95942e656cea44db997e05da88", + "EntertainmentAgency": "24237bd0232f4b542b3e5c0417c9890c1d02ae8e2434253af58528e517a0fd07", + "school_scheduling": "bf37030ee170906bfa6bf5958766cf2a63dc0ad8168b3892ad96940be838fe63", + "Brazilian_E_Commerce": "96d1becb02714d76ef1a728d8ca0de33e52acead1668abd5f7d8a73a45f6d0f3", + "imdb_movies": "175c1da2deb00fe28d70608f7839aea5abc214dca15bb3e8622c9b7258c25b9e", + "BowlingLeague": "f8ceb5692677a5a4e04d0a08dd495ae8dbebffbacdb2a66dec551613775bc12c", + "northwind": "80a1d9591da7aeaaa439ba0002023d5ab69d3f15a3d8b2ac9389dfd30543c1e7", + "chinook": "d6c11e2ccda2a36883af57f031f76fbd55e247f3be1710c4c8aaa72ec06a18cb", + "stacking": "eb683890921eb597f176692fe6ac9fb544dde3fd78084d019bf82cd0e6efe780", + "AdventureWorks": "f8bb86bfde5fca5636030fa9490ad37d4397b0b21591ee62c7aca363a64f2653" + }, + "gold_sha256": { + "local020_a.csv": "c1b371bd6f78e69c1fbf6c18aeb322eb8eb6ee941d2ab38891867bbeebf6ae19", + "local020_b.csv": "7c70ccf7dcf12696171f65f84ac3a12ec0c186c9d652e17eb4bca16ecdc713f0", + "local064_b.csv": "dec7e4121cca37fbc2382cc8cc6ee1aeaef25db34fb2b48402cb535a5a6529c0", + "local064_c.csv": "06a27d4d7c5abc98f940988e1a3e42b63013f67a64cfbc380026678d9cfd8c7c", + "local064_a.csv": "500a9aa255bca20726cd09bb246f629cbd646a8add8fb1909392ecd09f93b297", + "local169_d.csv": "5220ca53e1d1d4f299f003c98c0d3d0f6beaa89a19648cb5be05f8c4979b24ee", + "local169_a.csv": "b3dec45955dc3e802667d623e072f56cf164bd5aa3ef7488e4126dff07887437", + "local169_c.csv": "1a36de9147b3b3ca4d39f111e15401ab332d343784744e4400e0c44768dea798", + "local169_b.csv": "a7f5b51992d6a1f5ac5aafc37a89b9d77b5a04d459cb7ca450e0f5777dc6c2ee", + "local073_b.csv": "203926fa65c2315ce652c2c648edf76f84d2a324f61218bcb3ebbd140335ae60", + "local073_a.csv": "7bd11f899aab7c37790cdf55b7f04b09a060d36d44ca57343018a22ae64f88e0", + "local302_b.csv": "1cdb9b8168d2bab6b7897b79122d767026313001c9df4846146c70d012ba9ab5", + "local302_a.csv": "6865f086e47dc7842c167d5907830506a7c591a0f387c3a1f4106eb56555269b", + "local212_b.csv": "bb74516e6d3253874a418c2af2a5240011b36fd104e340881b41377279731c07", + "local212_c.csv": "3e9ffdfbb80e8c424d7c927495c04b575113dc129237d674384490b6f19f7a95", + "local212_a.csv": "a7ec3f8b50d95a2c946b9904841ad97c48ee2ae066f18e95840ca041f2653228", + "local075_b.csv": "ecb3ddc0d38d6561d4633006dd578b1150d1eb79ab1b753d9bb3d529f496c361", + "local075_a.csv": "ecd72e006e9322343c1d008e606b1f87dd9cea8c522821603adefe2e15e74f61", + "local038_b.csv": "7a92c8c4d7b6aedd050aabb1bcfe26348038cfc3429e99ff2e1168e0f5d75d09", + "local038_a.csv": "ee3a29f76657fdbc0ac015d17a647bcead7f7edbf2bc9ecfdd33238c4dc16a52", + "local003_c.csv": "96fba57f2fe200d7b18b2d862bc956f98befa8ead69a6d3ff0593197fbecded1", + "local003_b.csv": "35d1fb54543e7b6de87d5d5e7fee1d4dbbd67b7d5d98e72e8fd959ac8a0d38eb", + "local003_a.csv": "dfe02288dc4d860119b85b2629e240b283c19c4828ff92d115de38d2553f2208", + "local003_d.csv": "88569b7c814a488dcf872675bc5cb21b314d81c736574569dd10dcc8cac5765d", + "local286_i.csv": "67282b3f4efdfaee5d82d004381caa8ef9c2d70ded77e5f018bc12121ba648b9", + "local286_h.csv": "b9745253b4426a4754d5f22b7a158c682b69d215467cd20ff39d59b464b8e52f", + "local286_e.csv": "3e2c801aa106e114ac238d3f0593e4b51cb1ab8d333f9ba88ebab1138aa651de", + "local286_d.csv": "e6592fcf5accaed189bcec1a1a6a7d6906932542da0acdd34427d7c05ee4910a", + "local286_f.csv": "3f59abfefe275b81255fe3d591057a807a9110f1baddd41661fe6326dbe80eaa", + "local286_g.csv": "e8900c3cc4a15f719e54346df7e857bf5fa677b25e62a6d211aa57e705a6c53e", + "local286_c.csv": "0f58057a69e464d146ad40b470c2a6e593dbc44209d6b8ca6312bce47142c832", + "local286_b.csv": "ee6565e66e7580bd4bd9766171b6b78a5563099b7b3e2ac7b8c5feb1b8159e0b", + "local286_a.csv": "a10378fc736e6bbdf16a23aeb65840dce586d06db9f7543df5649c0a876c558f", + "local004_a.csv": "7f1b06203ef6e8400537f3ee59295b0794edaf2c4d20cbf428b742205dc79745", + "local004_b.csv": "b727d6aaccf9806451d3aa60f21c4830c51268a8c4ba1c2373bb20b02e4b8ad2", + "local277_a.csv": "ec9a93c0d9df1bf97e71c07f51281bc51c94c8bdc3b3468321f18386beb03d28", + "local277_b.csv": "bb0393ebfe836fec7f6382b8c60f173081aee06706de5f808738e58ef74d14ed", + "local277_c.csv": "474344a708d34dfb21b540c0b9c37b566d7dc3e716efae55e40dad2a42f8a141", + "local009_a.csv": "55d99171b807ec637db5e5537862c0a95e7c80e6ff9141ff0954903114bee214", + "local168_e.csv": "973f35863944634ce8e1a0f71ccdf3e3b2e9b4e4af7a7af7cb8d2880369cae35", + "local168_d.csv": "7c350f87225d15834980a48d7eb151d49d7ccb54b0a34063c6353d35d1360a04", + "local168_c.csv": "a099fd0094964acec9e9b7dc780e2d74e3b352d0a406fbd26492b16254a3e9ac", + "local168_b.csv": "0ba23c452b58b79505385e9d640647eb222ff03a8ecc42c3ea735e0dc5a3c47c", + "local168_a.csv": "2e0139876cf21db59202e70f35265ef7153f860a1552b2dbb45b74239d2f41af", + "local058_a.csv": "c74e9663427d34d34cb641480e4807b0459db608f792c2f35b2d072a94b489fd", + "local017_b.csv": "93766776794bd5ae3f393b387b3e96ec4607d1a1b51cbc8efde4ceed137cf1a5", + "local017_a.csv": "51256921f42d6e90afd3d2c173c6c41f78edae73dd08c3db89f4b058d6ccac6b", + "local008_b.csv": "ec056a18be1876a4d931f0a3470e972c83ecda7b2b398b1075f7568e4ccf5815", + "local008_c.csv": "fd4647652ddd17aafd4e2ee4e2beffd47405db36edf56ca756f8e12839f3b65b", + "local008_a.csv": "89ca9045bc066b6f9e407b19bcf51f3972bf6d60c34cb423333ec675489ff9cc", + "local244_a.csv": "5965bfa1f61aa4f176dafa1f6404853176c6c1bb7a2a23611fbf19d947afcbb6", + "local244_b.csv": "a0e9f988fcb19cf1de3e04c2336c9d69ca45f452213e50144d52c12bdd9355e4", + "local063_a.csv": "1793aa1c7acc50826abd3658b0f4e33559fbd6d731d8ec93fafbade87c9d5234", + "local063_b.csv": "a1441c9bb8dc7e44fb5a07fd7859819557c9736cd288d134cedc863840eec30b", + "local063_c.csv": "b755b88cd040cfeec296a84e3047d28c83cc4610578a5dbefd79b237f248dea5", + "local063_d.csv": "d8368237d3fc65210a2fdf27842d5b547ef00140ebee87e1b5e7ee5acf0e7d23", + "local063_e.csv": "4ac60e76e037ba5e62532d02bd6c9009b16bf6ecfeed2d3927892f8164f0772a", + "local259_b.csv": "f2d95d3a692176ef5a7a08318c2257af1e1971db71bff98e7fae55343253e842", + "local259_c.csv": "df6c3de0deee12fbddc77b2b5a0de57c80b0826fa3fa182b4d9615d69c4f2a70", + "local259_a.csv": "2c2419415a341c10edec2e05be6aebbba30f7428456455edf0f46de2ec5b3f2e", + "local019_b.csv": "5a3e07334d13b00ed6b6f0b6ead9542dac5da69a4320e71d942235514a3fb231", + "local019_a.csv": "6094d8e25f80e75f1c7b91b27d5943e71eb63acd8407c0e7165644787b77cbbd", + "local021_a.csv": "0936bacb011189be56c7b695bf624d8ec171e453a34fa6e0ab8817b8fe508caa", + "local002_a.csv": "97eb32859e39d7ee65b2a7501b157e1cd67fe932d58d2c5b931c3442d6a0afbc", + "local002_c.csv": "9deb74fe0ac8eb52df9ebe72260aa5b12c3f574e1858c843b91234f8d92c0cf9", + "local002_b.csv": "d1382f9c7802b5d2e55c3c3431322df282f4059d352ef588bdb70ec076d61879", + "local220_h.csv": "29bc54cf4eefd315349bde9119d4355bf9e8fa315b32ecb9cdaafec1d84b34af", + "local220_i.csv": "72eb0dcadb3803e4db881e56f3e983cf1f70d30f4aea1f3d5ae6d9f12ccdb004", + "local220_a.csv": "3fd793f820da7caf070fa30e734fc50fd512de91bb8726157791e6505b19f2ca", + "local220_b.csv": "307f4b3b18444ac7d3e2e0621f3e446bb0b3542c663d48bf0a3c88c0db8611be", + "local220_c.csv": "cec03dbe63fba9147b27e0d97ee1a750943e8326029df162ca7a54f2950b7e83", + "local220_g.csv": "c9d54b9e5320fd510c11afa8d7ca9a4b0f9b86e13da1a8d6fae8065472e01340", + "local220_f.csv": "6e6ab60d41c302b668986d652e63081989a7c9fa4d8eadce5097a1669be4ed8e", + "local220_d.csv": "38bdcb5070e77309a6968db11620e91994432b85feea07eeea4a998d496ed37f", + "local220_e.csv": "588ce337a1878cb035e7116a0910bf3a1a932446c02dc1da315de913fb19deaa", + "local336_a.csv": "28d892a0a923deac963020adf6123c94465bf5ff0f575e881442968f225db7c6", + "local336_c.csv": "89fea80e22a96f737ea5fc60113d26e4b81b2c6649721f51117fd9ec80215de2", + "local336_b.csv": "43131e08623badb368d1b3b253546e089d9e58ff1013a0c22b89c4ba5c733fbe", + "local336_d.csv": "493f99d0374d955882bca3f0257a2c714eee78111f465a1dc003ee2dcc47f34a", + "local077_d.csv": "55982709bcc150ee95ebd23d9d9389fee472f2f569979462c170cc1f17a42990", + "local077_a.csv": "f6e756eb78b1229ea23bf75d44de15ab0fc5cf79c63815595696186ee3a8ca09", + "local077_b.csv": "77fe93d9db1ab584637158c4a4c0ed60a528a2ecbefb0211eac390647a16b694", + "local077_c.csv": "d05b442624aebc3e586434af3b2837dbc4f2c0810465a97b85c50724bb3a09e9", + "local100_a.csv": "1c65e8f88161a7f86810c6f4669588ca1d3ef321674341c8a11979c489cf692d", + "local210_a.csv": "6560065fb4722f6ad2f6b1690c82d92ed50cdbea71936b2c48f50ed1898db22d", + "local210_b.csv": "47762ab50ef3d12a0a4a5ef5f10c41a7b8047b254e30b8a68ce302f8335f0245", + "local163_a.csv": "96ea14d9b3d8f61947989d5dc62c696eb15425dd86efc3290239b703bf99d506", + "local269_a.csv": "7267c436f72664d40ed245834186360188fa127f28c4a13c5e21d16c9840e28a", + "local285_d.csv": "712513f473959279273b3d6eb70f443ce7fc1f8296e5eab2e666bae2200de666", + "local285_b.csv": "a87ab59dece88c9811bcd52981d716d119609de051975383f4c741d37c98e878", + "local285_c.csv": "f1d1471ad889b1ec40b6ef4bbb691168523b8b01ede4327a5e41461a1f1d65cb", + "local285_a.csv": "3a88e7542df7ebdf18d21e3765fa1f0fcfd7c2af088b36ce169a81c9790431c8", + "local219_e.csv": "12ec2399787f1ca5a882346e9bb24021d9df7cf73787fab77952a7b8db84757c", + "local219_d.csv": "f5d2bdabf22b17758a44df650e6be6fe4a2c0f94a9ed5d0f6b30435dc285a419", + "local219_f.csv": "b8acd8c449ec4e0f38160ef5bd325671b773c2879cad84531da1780044471b08", + "local219_c.csv": "7803b6fc3cb1c317d0d02bb7eb529555659fe416a9fc281fded398f26280c294", + "local219_b.csv": "3d73969fd39cf5a1cbae9d32f3147b19339396083c877b52612b6cf78def4d81", + "local219_a.csv": "9dcf380a8086a2f4ef87a8d6d2db72455c83032f3f7a6e9d6e03281dd602a0d4", + "local360_c.csv": "1b8a564021b0ccd7f0aba665f54bea7f01c17aa48a8d4a2cd920ac12e0e8bf8f", + "local360_b.csv": "e2764c72c8aabc4430bb46ffc6c873f09408a758dbc757d87c6a1aea2d26a371", + "local360_a.csv": "de935d70c61b69e9bb632db32d60e07543447126a30f738eb52b4433dbbeff8d", + "local331_c.csv": "5575b855b619782c80380d2e932b9f8013b5a4e400d17bd6723aff8965f36622", + "local331_b.csv": "398b4c221861dd10271520f700c0ccd5169d9713e3f30c4d8d04f74726f6096c", + "local331_a.csv": "be4bc308953866f6e4b173319a1b0934a3404829753c7662f317ce26bb5be91b", + "local193_a.csv": "15bf368dd71c4ca644d590268b57fe2fe1d080e26ededbf3de3fd3985ea355c2", + "local132_a.csv": "ce397426bf6cb0280cfcc1abc74a4b64e4048568ee9a2d878ef296a4e41576e6", + "local310_a.csv": "35d7876cd66bff44654add1596d74a6a916d15994c5f4a015a48633ec8e4e8c9", + "local041_a.csv": "4b61532d00887c35ce49c293e9a8cdbedf93da39ae84139a3744a07b1a551144", + "local041_b.csv": "2dd088064fc0b86e4deaf8356aa902d290321b5de6fbecb737e0c6da9660f30d", + "local099_b.csv": "fbdca4cd81c62b3d93bc93eb215520d892ba4c290751919f20dd71418ce6a7e4", + "local099_a.csv": "bec10511e51815d3a874d90ce4a83af43396138460f02d4e36d0b0880fa03724", + "local130_a.csv": "6694afd62cbcfd4fba3f359e3e76af114f615c01606190c9787933728ee54daf", + "local066_a.csv": "c1899edc643a416e7b90e8d7d78b8bf46661e9eeb3a87e7d8bad6b9d547cda2b", + "local066_c.csv": "6551bf0440d4bc3e41c471f6dc247f300f93b0fd2b5fd4a8308bdf96e18dbee7", + "local066_b.csv": "cab923a50ec2151f75792452874ef2e7fae3ee533a07e8f8725fd6355762f585", + "local030_a.csv": "161284a3c6f2c5ec916f4886536315005752236edb3f1906d2e894202614144a", + "local209_a.csv": "deddc04c50a244e75de82f47ba6c3f54fbb6f97b988985f6993db03183b8778e", + "local209_b.csv": "e7f4324fd0a268ef8db517670215e03a14ca4d738abd5adce0bb1d48857b84c1", + "local067_b.csv": "c6b945e3fc178475ac8c6440ff33ab4a33578dcf1187f79ba7c2a577f17ce7e8", + "local067_a.csv": "34477c4b74140e991f932a86b10e3ae6cace0a425a4efe9480d2d52ded344180", + "local050_a.csv": "58dfb380fd1b78d1ffdcdd41136ee6d29f5fe878497fd8c447a5643a945bbf42", + "local050_b.csv": "2be2c502211501cac9fe28882a163b8e8e0ada559e88df12d84279f960c98508", + "local050_c.csv": "c02d70fd6770f3b8b7c7400017f9de5fe4a3d98d5bcff5d23bb855bd34e8193c", + "local022_a.csv": "5b0274a5bdf4cb2da91e1cb86da639d2788ff6c9ce12be709c89ebe431a405cc", + "local171_b.csv": "438b893ebb918cc5270c7c83ce5b9c66a2e5c1bee69b01ce916bf44ba01322da", + "local171_a.csv": "43c4b12ce24776c1cb3a4b3d6ccbfbabd2697449aeae73f43f4a8b217f348a94", + "local131_a.csv": "99088095afe2b7e918cd1362c7bfc329d0769b29cbdca8d3a0db17c12cefa257", + "local152_a.csv": "ccc36f93451600109f70423f3f2b22c59efc2aeec4481a34c40c6cd03762ec35", + "local356_b.csv": "5fb856cd42618d59fd31df1d5cd709c44c9ab461f06332c7cb42c4fb0525d875", + "local356_c.csv": "2d55de8bf7ca99d16767c4dd1afc8aac75f555903707439e862e9ae93f9df93a", + "local356_a.csv": "89856e985d2871649e2886240252cdc23f93da31724184c8d5a4a84124c8beb0", + "local356_d.csv": "c2cbf79260717e789c4a46bf0730c3476bbbc825cd8de28dddb12871e901fccb", + "local097_a.csv": "ab059c081ce0df9c377b85691022bb1f9f3667ce570bd81b3939d3051a53ece3", + "local062_a.csv": "2b9d26110be67fe46bcb3660fcf6999b4a003bf2a67cd089e6167870ceba77a1", + "local031_a.csv": "75b4daf5e59d7b7a5ef8810934833306d92260dc859ffa703a04d975c9f337ff", + "local128_a.csv": "2749b51ed71b2551d35f0d59c6ca189bdabfbdbc03ad154d0054c029eede7e0e", + "local081_a.csv": "9da7d88a04332b1b3fe6e84984e5d438fc2259026c92f0a617cd5b288c8b5981", + "local061_b.csv": "657640cf09e4f966f3b27816d2eac9868bc9afd2482a522e2cfca11c1308435f", + "local061_a.csv": "daba05cde352f1495ee5d5fe44e2e97d385dba25daaf9c9eead07d769e296593", + "local037_a.csv": "366902a6892471d22a9c5daf4a0a3a2b00eea621eb2aa7c2488fcd15f3a4b164", + "local037_b.csv": "e1b83ddd4a92ff112d597dd1b7f58242d2311417ae489aa2de8f07d88a08b4c0", + "local157_a.csv": "03259b07da7e44b85bf7f9e29e5acfac68bac669521afd3fb7a58ad56b7eb549", + "local157_b.csv": "624762a24072777e61e04392667b9102a2a75c1d75a120e30a990e7504de3ab6", + "local157_c.csv": "8e17cc7aa611d37ab4cafc7e70b1dfb6b7acb6bbd350fb15df7f2cd33e2fb4f1", + "local253_a.csv": "12bf95bf4418538435351a274cd99e3c5de8f7f51191b8d1f9acbe6167334c82", + "local253_c.csv": "f039653401cf392269288eea252ec11b9521fe764cc1304824a68a85f9c440c0", + "local253_b.csv": "47481be8a36053414a51168cf5f07a50cab22a5ef21d78cf6bcafdbf81b24e49", + "local054_a.csv": "6b684a3248c29aa8a29dc465edb8521463c3f0bd5e069df6e1f8a9e1df602333", + "local274_a.csv": "83d9b383b5f3db1b6d1880a91dde84a7c198d27bb34f5ad70078aa34a426c310", + "local274_b.csv": "bac6a3a31918621fb89e8c4c09b58001e81ad8257195ecab138f4eb20e4ba254", + "local263_a.csv": "af3936a3f06d0148c560a6781446bd98c758195d8c61cc2976b74435928f594e", + "local202_a.csv": "85e9369fc30751cdc1412cb5c7e78c2abeec2985dd4a5a41c5cdd71ddcc18519", + "local015_d.csv": "56f7cfa3c4a037c1c333de502d69d6c916da6014cff549996b09ecc3a89503bd", + "local015_e.csv": "a39ca5bb24cf3c1856102f53125f56c8fe686bc137b7402caaaac932e4a0d78f", + "local015_a.csv": "1d0afabe2283a59d441749067202ebcd70738034bd51d5e594675912f1a65106", + "local015_b.csv": "6d2f13248ceed54c99e70aae4c036a3886505ef8317f01cd84581180755d209e", + "local015_c.csv": "97b0b536c43f4dd48a36cced476efd98a469d2c5dd0950dbaab29924e7a7b31c", + "local195_c.csv": "3f35e382a09418f07f0c5afc5079b8b8fb7caa85215659fdec8f75fd52ca222e", + "local195_b.csv": "c948a0a429525ba0ff477d20448dc822c854ba9a5130dc2a2e1ba45036a1cacf", + "local195_a.csv": "6d010cf196c1cf9df4dbc8c5a5ef43c512870ac233c91264a28eaea8d4c46e2d", + "local201_a.csv": "080af4ed42042e04fe32a13854213d666382484739a9b353c0ae16295fc9fa87", + "local201_b.csv": "839abb14e25553a9f02394bc3ba35c53e528435fdef74dd9ba09acf20e5f7c91", + "local270_b.csv": "c6930b4e54ede426f04d641b7dec97d3794f3b44a2c7edd3c32bc3eef0b7c908", + "local270_a.csv": "44cbe0fc3c486a69790f015ad4b0944b7214d04ac9e1be0f3b3ac098aaf9605f", + "local354_a.csv": "a7a64d27016f986a8e8147b7c9d3a223b8f4082ea600ced8e5556e9080bdc2f3", + "local354_c.csv": "b846ff6920213823d198c67e147fbc7e3dd9924b951b47a3fdc1c9178dab4db0", + "local354_b.csv": "47de60a37350b531c54141ab5c1f46c294f2548fd6ef066ba2dbaf6f3f0802d0", + "local354_f.csv": "f3f2f1c0d9f0cf62a1b62770172eae26df2c961e190a5ed400dc83a48c53aae6", + "local354_g.csv": "8f9205af30974a993814edd1cccf5bdcd966a0641a0fc779246ed08beb457846", + "local354_e.csv": "d64bc9fa961ed98903c44ab63a73335502f3708fed027e618d35171c088210f3", + "local354_d.csv": "3672e9edce01bc9365f9fdef6ff15b4e94229c86f666a6a2686f241c7f25e931", + "local354_h.csv": "a4650a35efeaa4abf6142031a5cadf3dbee302a2abc232e8bb111d40fb6c89a8", + "local355_c.csv": "3b325c85166cd828601d40d98fbcb5a8b9ad301a8205c4f249cadd007c81f471", + "local355_b.csv": "45a67bcdebf25080c908c0449493e2ba503b7dd3168a17736629950d93a0fc83", + "local355_a.csv": "b6791e332962e204bca0fb65dc5cc521772bd22ed4bd2c9e0dd1436c5cf91bb6", + "local355_e.csv": "5edac8923a319e1630ddb13b8b0a50660363739a9c8f874adfc1be98242ec83f", + "local355_d.csv": "8c0297b41ffdac464accf4ca3dfafdba1caf68861fcf75545c6f1780649a1d44", + "local272_a.csv": "674a1e63a234810e0cedd5cb866b94177232be38c05e636bb08ef0a4756c8f01", + "local170_a.csv": "2b42a04d9f2a941f4f9e8ec8d8d6cab30636aeb97a68a9986f5281d7e8614a52", + "local170_b.csv": "75ba2f192c088b310f6f430e44f6be6c2975f7c2304602c04518731c444b146b", + "local059_a.csv": "d9b908bce1098fec3340ca821a2d0cc8f1081c3c0b3d9dc443d70887371bbfc7", + "local096_a.csv": "2a72e80ea25a693763018bbb412b540bc37449ffd1a113b332a68c762821f146", + "local026_a.csv": "8b0566d063be61514dd41fd6c20b7f872677ef6e9b74a1959a930c344e73e6ab", + "local065_a.csv": "a88fe08e758fc1ec3e5445c72e82f94e21b134c50fd020b849034d9c3d7e7512", + "local065_b.csv": "5222f53ddf2a5f19fdf8a4c126a89821f02dfb113f8b5149fbefc3f84ab2780f", + "local279_a.csv": "4f7378f0e26249ba807745040c85b6755ecc47ff70fcc44b6aa22caad2d2a437", + "local141_b.csv": "f1274a92ef605fa942f1777b10ee9549869b2c69e6c71db8f0e21060b16fca17", + "local141_a.csv": "f0f881eff759810e1a157ebec160506f64fcecf175c015d384403830765e9513", + "local070_b.csv": "fc5d8fa9225349c33a07ca52643a7f11434e9e8fd5711769b0fca0af3addac15", + "local070_a.csv": "fd0136749fd3215a1d9fcc910a6050866a928f3be65713f5518b5ce3a79acf9a", + "local023_a.csv": "abe0ba55aec5aa107a322556bc4dc73d8d76426eee7f7679a9b4329df0458e3a", + "local221_a.csv": "12397cf2182c3d6fabc5fa3c5d1e1b72abfee48e5852eaaa7f6cc94dc113acdf", + "local301_b.csv": "fe96a3ffda30fcd83a40abde6f463160287f678b600c89ec6d8845f89d2ae5c1", + "local301_c.csv": "2fad0ac554543c8b4adde67d898593b4c102b70777c9c992eaec45067bf8eee3", + "local301_a.csv": "cfd0aa58b5f02bfcd83872d5dac729d9962725bfb558cb70d431fbd1d360dd77", + "local018_a.csv": "be83eb216699f3aaf4769f1dbaa2b483718548855da59eb7fb6466ff15f2d902", + "local298_a.csv": "f295cf8ade91d7120c18bc811a1b3839135437b36a9c71efb59e8979896a8bb9", + "local028_a.csv": "4b08cd97c949a352f8450696db24d140ea0cb5b7c94636dc46d495db8dcc8c01", + "local028_b.csv": "742d31b1c4ca1c891bd22bec5701b18eda75cea427aeaa8ed3f66a5c32743180", + "local196_a.csv": "b3114812d1bd2ee0f83f593cc1ba00228c52add975720b1b9a7a4a596d5e9d5a", + "local230_a.csv": "fa93c03d618f3be4b3046f38c93489b6c5511ced7796b4cc23ae9531d2538234", + "local300_a.csv": "8881876917149ed5fa7a655ddec6de301e4b9eb88691c8d3717159cec1f10a66", + "local300_b.csv": "b6e12cd56de4bbd1fad3bc8003dab7f8378600c310ed0ff8dfeb9e3c5520d4f2", + "local300_c.csv": "dbf8c9c285c1e3ec012a20e21256117a7662aa34882bd84536ef9dcfcc3e3901", + "local300_d.csv": "1c4f4fe5c79c2207a15f215759f31915dad213988b02e13bb405170ad6122bf8", + "local198_a.csv": "1e552fd1326323711ba031bae7fd1a9c2bc4b6b45404916a7066532bc29fd86a", + "local299_b.csv": "1c3b8a170deb6ea5016ee61ce649c3ce32ad08ae2724485fbf4999c55501a45f", + "local299_a.csv": "27a88bb2600981bbbe3052d03218f2b385a267c36a5497f3169afae7d99b78f0", + "local032_g.csv": "c0abe3fc89883986bf833673e7c1c120c4ee3fa3270716be84a69aa6e14b8ec5", + "local032_f.csv": "4b490e2e387a9157ab92ec22b68499867016f8e8d4d4a68a938434c60699996f", + "local032_d.csv": "01443bc088adfa7cc0918a81db1138b49902aa8b4871777043e3c39af64e4f05", + "local032_e.csv": "7f44365729a449f5640d90abb9eb3822d84a667bf556ed69607f0153fb4627a3", + "local032_a.csv": "8930472f79242c09ace8a7093a53e1d86638294a4e448bc29e903046c9b3ecd9", + "local032_b.csv": "4880656d98d611ad49603d442a7c69669b4dc97fcfa56781ba2a00685a4e2ca0", + "local032_c.csv": "375d25de984ea7d9738126f8c58594850213ae32f41ccb211885361086fa8b5c", + "local032_l.csv": "ef4356f6a6245f33195b88728ed42eb541f378640570e3eb1def8eb9e45abfb0", + "local032_h.csv": "10f3f8a7c4f1c6e0aed6b7f1a263ea51982572bf6d325b5173666f027387b00b", + "local032_i.csv": "7b8ff88f98980484f9cac707765238478cd3ec989907d413e66c877f3426124e", + "local032_k.csv": "1e56f65fda398bdd603ab7f0966e8c1487b455f1b501f3d1b4f57294fbc96224", + "local032_j.csv": "992f644d9d30324ec54f5f5cef120405891922ceeabd12e68bb9c7d171392a5c", + "local068_a.csv": "1299f2e8ee0af71305e879036489e9f898f093d55fd7634f0a19d67a98773f16", + "local068_c.csv": "c4535adaf3fe73d83e3c54f469ae5851cdeab601f0abbd49a33c3d7f62770735", + "local068_b.csv": "ab3e5b470012a477e90877a36682721dfff3b9b2a9d436f516b64bfdef579d0e", + "local264_b.csv": "35426254849f620276bbaa67df521a55a81fd1e10ebfbedff1c2ffa218edfe5d", + "local264_c.csv": "86288a60be71d946e2403cd44c608ada7bb163ce11f102cc4402c67ba0ae8ef9", + "local264_a.csv": "8de3723af25cb543685497a4631c081bd8cf7e9ead498e6a1eee52273cf0498c", + "local034_a.csv": "1090ffc6a0c35bf35d9295d47914234c997e7309397238747977b6dad213855d", + "local034_b.csv": "5e5b95c5964a0760c48d12c6e64a42e89a6671042665fa0fa2afdd98df142f07", + "local197_a.csv": "f8908a3f904dfcc900a7967db60b3fc1eb3c16d573374f4cb8e6f68ebacf464e", + "local197_b.csv": "dfa9d044fdf582d19e0cd7ee6229c3583044a763608e2ca8573ed300d89b2f35", + "local197_c.csv": "bd4f275d821d4f09ca0d6042e4c7780991213abdb8e302bd0d412f8654226827", + "local024_b.csv": "1022178fcdafb1c112bd8770b884ca39f554f50586ac0002e420bf6430d3d24d", + "local024_a.csv": "8699022579239fad51d09ef039352855312af9f0a6a8d3737c39b60158d0e053", + "local228_a.csv": "6d2ee53c1196edb090a3618695c3f922b0a2a526e37bbb0855b8646d9a5b09fc", + "local228_b.csv": "570907525713d4124189f7b82aba2108f1bdc64e931b33f13d817342f8c17480", + "local060_a.csv": "e02a8024be874c7b95464b19712840659e4209165ed7e472b57351c0cc1ba0e1", + "local060_b.csv": "cbb428dd80f1532502baa09ad60aa65381ed21ea6056e26082bdcd6cb962af93", + "local358_b.csv": "eff96b54297c2251143325360d15086046e9c154e50752a4203f9f1ff18d5f10", + "local358_a.csv": "6a7e8c424c6a52662c0abf5d6873d827f5688f9355e46889075f51d9c70bd439", + "local283_a.csv": "6e3d87df7b2a5a1147f62fe65de3b1292f5af15f1de5584593de863534442f68", + "local035_b.csv": "6ae7a8e32f25813841a79ca35376928d094f10ce1a532e2a1f23e4d9ef1b7fd9", + "local035_c.csv": "2381226b424af0f88ab4c493dd201ee5f059d86ea5c9605ecd0f2035c97976d9", + "local035_a.csv": "710eb0aea469add745f72f1f4b5b568cb0c84c4507a61a3930b70d54d7e7f47a", + "local071_a.csv": "ebeaefb552dd18841ab1d63602ffbba67a1b679722fb7bf86f4aad05d115ea29", + "local071_b.csv": "e73ef52d22cfc7eb7dc76c959cf4d6f11079a1d186fb1f3346bbdb2ec61efaa8", + "local039_a.csv": "ab6af5a1dc6c24ddae09852a5538b7552f5c153eab566e861fe8276c6dcef087", + "local039_b.csv": "cd3cbdb9528d7a50197836db8f6abb45ab59241d6bf8035915fba312c52fc892", + "local167_a.csv": "f87897a23204ee6f79b2821fdf50611d055ab847a2670fcb8c548b098c187aaa", + "local167_b.csv": "7e385bbdfcf240dc6b6264aadd220a2404603a1944ef850f5a4a221cef501dc3", + "local133_a.csv": "000b2e5e4f3ce526d4a442dc28d1f792576eed5943ec7416dd5fd43265769b11", + "local133_b.csv": "24371a161c1a35386116dde49c31ceec123ed2d3abc8aaa411d6ad98d31b53c1", + "local297_b.csv": "5ec5763867426b0b6cf21c0d707e69bbd2f11ef80e14eb0f4cce29d4479669c8", + "local297_a.csv": "4a37f869a34af47d766efaac9b2909c7d736bd35f6c18e41ed207ce5b3f0c260", + "local309_b.csv": "e4ee052a9a5b625b3f9f3d0f9fde804b6f2b204324b794ff3960be8c55074f93", + "local309_c.csv": "a1fa582e425c2bdfc3fdac62123c22a77a0b8e9f292d30bfc1c3f6cbf36d0584", + "local309_a.csv": "99e9032b151143ad152f2b086c21e3d5ad2b641adbcee2c349fbe7f2eaca5c93", + "local098_d.csv": "9386a5c0c81fb3753bcecec2cf7c86d67977094c09b0a0666e2a3ffd95bb0d23", + "local098_e.csv": "7668d333202c9f22c657d65b80346c092798f889c8ffa7c8859ad20a0eb441cd", + "local098_a.csv": "2b9adab647439652f27faf4c53ccfdb4aab9e280636e904c2bdece4d72c9b8f4", + "local098_b.csv": "f7f59e32e9843b3af1b7c1304203b2d50c1d5092226c3f713c69b87a23bc3086", + "local098_c.csv": "7992ce39a5d37324ffcca04c64828b8b3fbe4fd13ba56d09ad2e1f6d6686cdc5", + "local329_a.csv": "d51cb49e4f858fc1f62361fbf199c1f0145b2d5a192812f919f9f74598ad2c27", + "local040_d.csv": "4f8346cdaa161013159d36bb29ab6bcfa9c1496066ce99adf101da50b7e55eaa", + "local040_c.csv": "6c25ec05e7e36d47887dd9ec91a24987d99ea677b6fa1ed6659152c193d255c8", + "local040_b.csv": "894fd4c4aa2af4d479540508bd503e9c34ac574755c6a09b0b1b92edf11b5a59", + "local040_a.csv": "86040f986565e2f0827ade68d894ae227b0e20b4a0a5f879da8857fcff9d100c", + "local056_a.csv": "fb8f6dad94f2ccad8ff035a504758ae7f67a514071005e9d330940d09cd242e3", + "local056_b.csv": "669482fb368f7458dae1f1b084e10e145f513fdfb0ab5c648d006204a4b7b844", + "local218_a.csv": "59aaf31f0bdc6f4d891251e969ae5dcb0733b2f027bea6a6e02b8922b57e7a57", + "local074_d.csv": "575905edd9d23b7a0dfa7d4d4d6c71c1e53b8df47ca5d997e34b30821ea5d476", + "local074_a.csv": "1d249b4de50434c538dbbc566ec00c0b3d33f6f50b76f9d2d947fcd2447b8e5b", + "local074_c.csv": "4c048efea3992cccd47cb21a735fa82f4c55db5c8da38d40862c303dbb100dc0", + "local074_b.csv": "c0d530dead3d8128affa3642184e4402e11136c7e31cbca044cb58b4f3b5ddad", + "local072_a.csv": "ecc11366f1a4997612ef7479d4e9caafb76e7be0dfcfcab22031ad044da9306d", + "local072_c.csv": "89eaf8f0fd5d63f525f91be9e73172b413e38adf162414c10f23236601fca705", + "local072_b.csv": "c81babd9f76614a1be3de6c6f3ed4c8fef6372d5bb2dd1b7051d2a321ba2aa11", + "local072_d.csv": "5460e077fca890a7547af80ef5728caee0b1396a3c68aa35c1319707a7e7f260", + "local156_d.csv": "4907987cdbe5dc4deb8727acc62596d7becee9c4633db2e75620db08b8869a0a", + "local156_b.csv": "b544baaa749fbe2eac0ade87a28a07174f5c13a8d2b354500d82e63403723e9f", + "local156_c.csv": "c273fac8e8bf03dbce9fff237e60810a175baae2a9342050cfd3b1afc745b288", + "local156_a.csv": "359af22e361eb8386bb7c16d03f7d3a148db3addbbda677f3ccc6a93099040fe", + "local258_a.csv": "b943740b741d12a81ac9a1235478186c827f5068d8ba9042f2072ad479f2100f", + "local258_b.csv": "3b9f1f8a944934e57ec29c46c7e1b0de2c4d8fc6961c6275f1c76a4aa818ba50", + "local258_c.csv": "d6399f1bd4dbb5e4edd4ed0935825c3092f5cea42b0ba93bf140c5cfc97700bc", + "local258_d.csv": "28f311ccbdd218b3c521f66c49f51d6c53e2a31a6a448eaf24ecc58b36d3e991", + "local258_e.csv": "28a62aa7e0edf3af50776d3bbb88194078189716ea370567d883a79d34996322", + "local199_a.csv": "d5d43158a754df4985bc9101e86b2b48adfad69dbfe3a266fd7f8b804fbc26e9", + "local199_b.csv": "96914152da9b1d4229b1cb32cfc6ec24ee49187fe3036783a7a34512b44bb40c", + "local194_a.csv": "737c5c8fb48a3a09fd2c20589001498bb12e623c24789749a711f8f884d1b1bc", + "local194_c.csv": "d4ad490bd6915a0d099d1077e122048a32ee33378eb5bfd876e4e683fc0c612b", + "local194_b.csv": "a5f4718844ca84d9125365e1e6aee952d4c2e8eaf1ea99bb9c086cc29d5d3184", + "local273_a.csv": "35d1a1d986b6a2acbe0e6f29a6d9e2979cb21018e5ddf13c4367e881e4058d34", + "local078_a.csv": "22e33a0e482aa13b1e3d59b4363c04dc1d39eeb3d0b18fdb7fd7ea1077dd1b95", + "local330_a.csv": "156777b4eeec05777e4760c0a8cf5a90e7e9f5db5df87b6db215f36f6ca722b5", + "local330_c.csv": "9ebe76a500091818cf5ba1540ea8c7f7b01b95f01d6edc4dcfb7739130677571", + "local330_b.csv": "02dcc9b52e11b4a342941f97c775481b080e740222d797547408decb5ee9ae1f", + "local007_a.csv": "609e283f72faa732d8c9bb3041aa570361e8fc1e2949dad6d2624eee4fe1f582", + "local007_b.csv": "187376265d7f3ec19f2361f9aa4a29ebdfef55b93ce382d22da635cb84b2a5ac", + "local007_c.csv": "d30d2306cd25071c6435fc31baf736057c1339f2aa2927ba43eaf85894553a3e", + "local029_b.csv": "0645e08079eeed5278713e295ec54f92db2c4a5c080c2ca19fc0d300c85b8bdd", + "local029_a.csv": "13592cb212196327ddbf1e24612d8f5c9be767476537cac76098c8e6382a3d5a", + "local229_b.csv": "b63f34609d6f0d135301ac413518af035f8ef8d8b4af603ce956b573ecc8a8ca", + "local229_a.csv": "13b57a2a9cf1c3b16954439cff955c0483c902fd05e2cf8a8f6d707618b74edb", + "local085_a.csv": "53a8a772d4f1a25a2e35e0865d80126c51742dbef3183827cc27a9d6215b0401", + "local049_a.csv": "37a03e5c7d30c522122d3a7f27337a8dfc434dcff120081752b4c9d93b67589e", + "local049_b.csv": "cfa61613d11a7d440f235ed1d6eb889a2d1400f35814705c8c6cab12ee690fb8", + "local275_a.csv": "e0ee8bb50685e05fa0f47ed04203ae953fdfd055f5bd2892ea186504254f8c3a", + "local262_a.csv": "0b6ba8593e65101190910b92c997f428d2b21983812c653bd93523f744275518", + "local284_a.csv": "8061781ca5afac30250858521ec1bf3535936424d2ca8ac9214e2b1b003d3d8b", + "local284_b.csv": "d74c6fe8cba88dc43de32cab40d95d197cae6592df11284ebcb593caffe37aae", + "local010.csv": "109bc4ccdeaaccb405d52e5db6fbe1831b5cede629b5aafce07b1f5a4be8c623", + "local335_a.csv": "f5e97947e8060cf4719a2cd9d31f3b40b83d2e96608965de754360b6b415331d", + "local055_a.csv": "ba0ff1a7ced89ad53f8b9da3460f52d36dbb9bdad78c20fc495da0205dc3bfa8", + "local055_b.csv": "2f55f6f8f51a38d3b618ac0db7aa1a603bf42a524626ca48cc64a328aaf18555", + "local344_b.csv": "83604ca169c01568d0db1169d8ee1a54b495a9ed732929c857c7f87f738fc5ad", + "local344_a.csv": "ef99aaf28f3521bc0eb3feb7d5d57175fa83e43a3387391b0242e03154375ad9", + "local311_a.csv": "d7e3e901649bf918fddc98d854d91966fa309ee4b6cbd6b4b6db51a8643e422d", + "local311_b.csv": "8fbc16c5a9509bac26070ecd35b5fb0dfb0b40b153bbbb96d8381d5762c5f4b8", + "local114_a.csv": "c4eba509d8d4e214612b9aae8609c827bb9793033fd59476bb3bf9dd544292e6", + "local114_b.csv": "cdf83c7802e33dc16972004c48b85278cf9ce0982a6d8598128e7a26c3620f26", + "local114_c.csv": "ccca70934b3f6835751ed0fc72152b256b4a001fae72b7123ca9ec133dce5933", + "local114_d.csv": "fe4c1be98c7516d2acb92725459fea2db06b1ce92df4ecbef82e86aaaa2dadab", + "local114_e.csv": "4f2c92129c6e8a85e9887d70f62135ebda47aa7cf25314cfeb5a3b08973243ea", + "local025_a.csv": "6cf18f2a7388ff0181a5c6135af733c613df8bb6faa5fd7ab7d8d7a91e908ddd", + "local025_c.csv": "fc3c1b56cb3fca413c96075be8f2bc4b33e70b00db2da5b55ba1a3a512af930e", + "local025_b.csv": "42c381ef3631f35fd3c14c9d06007dfd793104348b0f0147fd24239f41ccb1d5", + "local025_e.csv": "b5af2f507944864ce133364b125d558ca728fb102edd9a3171fab324baef49af", + "local025_d.csv": "210c10f155318bb8420c16a3e4ff140514c6008de7100f228a239fc6de8c525b" + }, + "gold_config_sha256": "5113ddaea6107492c08a898241a9f69ec99b03bc60d014e9f0b12ec59fa28970", + "cases": [ + { + "instance_id": "local059", + "db": "education_business", + "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?", + "external_knowledge": null, + "document_sha256": null + } + ], + "suite": "spider2", + "development_ids": [ + "local059" + ], + "holdout_ids": [], + "split_seed": 20261126 +} diff --git a/bench/accuracy/experiments/spider-grain-review/protocol.json b/bench/accuracy/experiments/spider-grain-review/protocol.json new file mode 100644 index 00000000..c3c39224 --- /dev/null +++ b/bench/accuracy/experiments/spider-grain-review/protocol.json @@ -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" +} diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/analysis.json b/bench/accuracy/mcp-review-results/spider-grain-review/analysis.json new file mode 100644 index 00000000..fb709280 --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/analysis.json @@ -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" + ] +} diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/audit.json b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/audit.json new file mode 100644 index 00000000..412c5e10 --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/audit.json @@ -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" + ] + } + ] + } + ] +} diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/audit.py b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/audit.py new file mode 100644 index 00000000..94ff57a1 --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/audit.py @@ -0,0 +1,44 @@ +"""Offline counterfactuals only; never model predictions or inference input.""" +import ast, hashlib, json, math, sqlite3 +from pathlib import Path +import pandas as pd + +root=Path('/Users/seyoung/workspace/benchmarks') +run=root/'codex-mcp-astra-spider-backlog-20261127/spider-gpt-6.2-astra' +manifest=json.loads((run/'manifest.json').read_text());cases={c['instance_id']:c for c in manifest['cases']} +evaluator=root/'Spider2/spider2-lite/evaluation_suite/evaluate.py' +assert hashlib.sha256(evaluator.read_bytes()).hexdigest()==manifest['evaluator_sha256'] +node=next(n for n in ast.parse(evaluator.read_text()).body if isinstance(n,ast.FunctionDef) and n.name=='compare_pandas_table') +ns={'pd':pd,'math':math};exec(compile(ast.Module(body=[node],type_ignores=[]),str(evaluator),'exec'),ns) +gold=evaluator.parent/'gold';standards={r['instance_id']:r for r in map(json.loads,(gold/'spider2lite_eval.jsonl').read_text().splitlines())} +report=[] +for ident in ['local015','local059','local283']: + record=run/'codex-mcp/records'/f'{ident}.json';sql=json.loads(record.read_text())['sql'];changed=sql + if ident=='local015': + start=sql.index('SELECT\n 100.0') + changed=sql[:start]+"SELECT CASE WHEN g.helmet_used = 1 THEN 'helmet_used' ELSE 'helmet_not_used' END AS helmet_usage, 100.0 * SUM(c.motorcyclist_killed_count) / COUNT(*) AS fatality_percentage\nFROM main.collisions AS c JOIN collision_groups AS g ON g.case_id = c.case_id\nWHERE c.motorcycle_collision = 1 GROUP BY g.helmet_used ORDER BY g.helmet_used DESC" + elif ident=='local059': + changed=changed.replace('SELECT total_quantity,','SELECT division, total_quantity,').replace('SELECT AVG(total_quantity)','SELECT division, AVG(total_quantity)').replace('WHERE division_rank <= 3\nLIMIT 1','WHERE division_rank <= 3\nGROUP BY division\nORDER BY division') + else: + changed=changed.replace('PARTITION BY season ORDER BY total_points DESC','PARTITION BY season, league_id ORDER BY total_points DESC') + assert changed!=sql + db=root/'spider2-databases'/(cases[ident]['db']+'.sqlite');assert hashlib.sha256(db.read_bytes()).hexdigest()==manifest['db_sha256'][cases[ident]['db']] + with sqlite3.connect('file:'+str(db)+'?mode=ro',uri=True) as conn: + old=pd.read_sql_query(sql,conn);new=pd.read_sql_query(changed,conn) + refs=sorted((gold/'exec_result').glob(ident+'*.csv'));cond=standards[ident].get('condition_cols');ignore=standards[ident].get('ignore_order',False) + if cond in (None,[],[[]],[None]):conds=[[] for _ in refs] + elif len(refs)>1 and not all(isinstance(x,list) for x in cond):conds=[cond for _ in refs] + else:conds=cond if len(refs)>1 else [cond] + comparisons=[] + for p,cols in zip(refs,conds): + ref=pd.read_csv(p);required=cols or list(range(len(ref.columns))) + comparisons.append({'reference':p.name,'sha256':hashlib.sha256(p.read_bytes()).hexdigest(),'rows':len(ref),'counterfactual_matches':bool(ns['compare_pandas_table'](new,ref,cols,ignore)), 'unmatched_columns':[str(ref.columns[i]) for i in required if not ns['compare_pandas_table'](new,ref,[i],ignore)]}) + if ident=='local283': + reference=pd.read_csv(refs[0]) + paired=new.rename(columns={'team_name':'champion_team'}).merge(reference,on=['season','league','country','champion_team'],how='outer',suffixes=('_pred','_ref'),indicator=True) + diff=paired[(paired['_merge']!='both') | (paired.total_points_pred!=paired.total_points_ref)].copy() + diff.to_csv(Path(__file__).parent/'local283-team-differences.csv',index=False) + out=Path(__file__).parent;new.to_csv(out/(ident+'-counterfactual.csv'),index=False);(out/(ident+'-counterfactual.sql')).write_text(changed) + report.append({'id':ident,'question':cases[ident]['question'],'record_sha256':hashlib.sha256(record.read_bytes()).hexdigest(),'db_sha256':manifest['db_sha256'][cases[ident]['db']],'original_rows':len(old),'counterfactual_rows':len(new),'change':{'local015':'Unpivot the same numeric rates into helmet groups using descriptive labels derived from prior query, not reference strings','local059':'Carry division to final AVG and GROUP BY division','local283':'Partition season rank by both season and league_id'}[ident],'comparisons':comparisons}) +(Path(__file__).parent/'audit.json').write_text(json.dumps({'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':manifest['evaluator_sha256'],'cases':report},indent=2)+'\n') +print(json.dumps(report,indent=2)) diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local015-counterfactual.csv b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local015-counterfactual.csv new file mode 100644 index 00000000..91c88b81 --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local015-counterfactual.csv @@ -0,0 +1,3 @@ +helmet_usage,fatality_percentage +helmet_used,16.666666666666668 +helmet_not_used,0.0 diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local015-counterfactual.sql b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local015-counterfactual.sql new file mode 100644 index 00000000..0fdcf799 --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local015-counterfactual.sql @@ -0,0 +1,16 @@ +WITH helmet_codes(equipment, helmet_used) AS ( + VALUES + ('driver, motorcycle helmet used', 1), + ('passenger, motorcycle helmet used', 1), + ('driver, motorcycle helmet not used', 0), + ('passenger, motorcycle helmet not used', 0) +), +collision_groups AS ( + SELECT DISTINCT p.case_id, h.helmet_used + FROM main.parties AS p + JOIN helmet_codes AS h + ON h.equipment IN (p.party_safety_equipment_1, p.party_safety_equipment_2) +) +SELECT CASE WHEN g.helmet_used = 1 THEN 'helmet_used' ELSE 'helmet_not_used' END AS helmet_usage, 100.0 * SUM(c.motorcyclist_killed_count) / COUNT(*) AS fatality_percentage +FROM main.collisions AS c JOIN collision_groups AS g ON g.case_id = c.case_id +WHERE c.motorcycle_collision = 1 GROUP BY g.helmet_used ORDER BY g.helmet_used DESC \ No newline at end of file diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local059-counterfactual.csv b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local059-counterfactual.csv new file mode 100644 index 00000000..287aec1d --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local059-counterfactual.csv @@ -0,0 +1,4 @@ +division,overall_average_quantity_sold +N & S,397699.3333333333 +P & A,244691.0 +PC,10045.666666666666 diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local059-counterfactual.sql b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local059-counterfactual.sql new file mode 100644 index 00000000..118e9c5a --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local059-counterfactual.sql @@ -0,0 +1,20 @@ +WITH product_totals AS ( + SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity + FROM hardware_fact_sales_monthly AS s + JOIN hardware_dim_product AS p ON p.product_code = s.product_code + WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01' + GROUP BY p.division, p.product_code +), +ranked_products AS ( + SELECT division, total_quantity, + ROW_NUMBER() OVER ( + PARTITION BY division + ORDER BY total_quantity DESC, product_code + ) AS division_rank + FROM product_totals +) +SELECT division, AVG(total_quantity) AS overall_average_quantity_sold +FROM ranked_products +WHERE division_rank <= 3 +GROUP BY division +ORDER BY division \ No newline at end of file diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local283-counterfactual.csv b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local283-counterfactual.csv new file mode 100644 index 00000000..037cef5f --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local283-counterfactual.csv @@ -0,0 +1,91 @@ +season,team_name,league,country,total_points +2008/2009,AZ,Netherlands Eredivisie,Netherlands,80 +2008/2009,FC Barcelona,Spain LIGA BBVA,Spain,87 +2008/2009,FC Porto,Portugal Liga ZON Sagres,Portugal,70 +2008/2009,FC Zürich,Switzerland Super League,Switzerland,79 +2008/2009,Girondins de Bordeaux,France Ligue 1,France,80 +2008/2009,Inter,Italy Serie A,Italy,84 +2008/2009,Manchester United,England Premier League,England,90 +2008/2009,RSC Anderlecht,Belgium Jupiler League,Belgium,77 +2008/2009,Rangers,Scotland Premier League,Scotland,86 +2008/2009,Standard de Liège,Belgium Jupiler League,Belgium,77 +2008/2009,VfL Wolfsburg,Germany 1. Bundesliga,Germany,69 +2008/2009,Wisła Kraków,Poland Ekstraklasa,Poland,64 +2009/2010,Chelsea,England Premier League,England,86 +2009/2010,FC Barcelona,Spain LIGA BBVA,Spain,99 +2009/2010,FC Basel,Switzerland Super League,Switzerland,80 +2009/2010,FC Bayern Munich,Germany 1. Bundesliga,Germany,70 +2009/2010,FC Twente,Netherlands Eredivisie,Netherlands,86 +2009/2010,Inter,Italy Serie A,Italy,82 +2009/2010,Lech Poznań,Poland Ekstraklasa,Poland,65 +2009/2010,Olympique de Marseille,France Ligue 1,France,78 +2009/2010,RSC Anderlecht,Belgium Jupiler League,Belgium,69 +2009/2010,Rangers,Scotland Premier League,Scotland,87 +2009/2010,SL Benfica,Portugal Liga ZON Sagres,Portugal,76 +2010/2011,Ajax,Netherlands Eredivisie,Netherlands,73 +2010/2011,Borussia Dortmund,Germany 1. Bundesliga,Germany,75 +2010/2011,FC Barcelona,Spain LIGA BBVA,Spain,96 +2010/2011,FC Basel,Switzerland Super League,Switzerland,73 +2010/2011,FC Porto,Portugal Liga ZON Sagres,Portugal,84 +2010/2011,LOSC Lille,France Ligue 1,France,76 +2010/2011,Manchester United,England Premier League,England,80 +2010/2011,Milan,Italy Serie A,Italy,82 +2010/2011,RSC Anderlecht,Belgium Jupiler League,Belgium,65 +2010/2011,Rangers,Scotland Premier League,Scotland,93 +2010/2011,Wisła Kraków,Poland Ekstraklasa,Poland,56 +2011/2012,Ajax,Netherlands Eredivisie,Netherlands,76 +2011/2012,Borussia Dortmund,Germany 1. Bundesliga,Germany,81 +2011/2012,Celtic,Scotland Premier League,Scotland,93 +2011/2012,FC Basel,Switzerland Super League,Switzerland,74 +2011/2012,FC Porto,Portugal Liga ZON Sagres,Portugal,75 +2011/2012,Juventus,Italy Serie A,Italy,79 +2011/2012,Manchester City,England Premier League,England,89 +2011/2012,Manchester United,England Premier League,England,89 +2011/2012,Montpellier Hérault SC,France Ligue 1,France,82 +2011/2012,RSC Anderlecht,Belgium Jupiler League,Belgium,67 +2011/2012,Real Madrid CF,Spain LIGA BBVA,Spain,100 +2011/2012,Śląsk Wrocław,Poland Ekstraklasa,Poland,56 +2012/2013,Ajax,Netherlands Eredivisie,Netherlands,76 +2012/2013,Celtic,Scotland Premier League,Scotland,79 +2012/2013,FC Barcelona,Spain LIGA BBVA,Spain,100 +2012/2013,FC Basel,Switzerland Super League,Switzerland,72 +2012/2013,FC Bayern Munich,Germany 1. Bundesliga,Germany,91 +2012/2013,FC Porto,Portugal Liga ZON Sagres,Portugal,78 +2012/2013,Juventus,Italy Serie A,Italy,87 +2012/2013,Legia Warszawa,Poland Ekstraklasa,Poland,67 +2012/2013,Manchester United,England Premier League,England,89 +2012/2013,Paris Saint-Germain,France Ligue 1,France,83 +2012/2013,RSC Anderlecht,Belgium Jupiler League,Belgium,67 +2013/2014,Ajax,Netherlands Eredivisie,Netherlands,71 +2013/2014,Atlético Madrid,Spain LIGA BBVA,Spain,90 +2013/2014,Celtic,Scotland Premier League,Scotland,99 +2013/2014,FC Basel,Switzerland Super League,Switzerland,72 +2013/2014,FC Bayern Munich,Germany 1. Bundesliga,Germany,90 +2013/2014,Juventus,Italy Serie A,Italy,102 +2013/2014,KV Oostende,Belgium Jupiler League,Belgium,14 +2013/2014,Legia Warszawa,Poland Ekstraklasa,Poland,63 +2013/2014,Manchester City,England Premier League,England,86 +2013/2014,Paris Saint-Germain,France Ligue 1,France,89 +2013/2014,SL Benfica,Portugal Liga ZON Sagres,Portugal,74 +2014/2015,Celtic,Scotland Premier League,Scotland,92 +2014/2015,Chelsea,England Premier League,England,87 +2014/2015,Club Brugge KV,Belgium Jupiler League,Belgium,61 +2014/2015,FC Barcelona,Spain LIGA BBVA,Spain,94 +2014/2015,FC Basel,Switzerland Super League,Switzerland,78 +2014/2015,FC Bayern Munich,Germany 1. Bundesliga,Germany,79 +2014/2015,Juventus,Italy Serie A,Italy,87 +2014/2015,Legia Warszawa,Poland Ekstraklasa,Poland,56 +2014/2015,PSV,Netherlands Eredivisie,Netherlands,88 +2014/2015,Paris Saint-Germain,France Ligue 1,France,83 +2014/2015,SL Benfica,Portugal Liga ZON Sagres,Portugal,85 +2015/2016,Celtic,Scotland Premier League,Scotland,86 +2015/2016,Club Brugge KV,Belgium Jupiler League,Belgium,64 +2015/2016,FC Barcelona,Spain LIGA BBVA,Spain,91 +2015/2016,FC Basel,Switzerland Super League,Switzerland,83 +2015/2016,FC Bayern Munich,Germany 1. Bundesliga,Germany,88 +2015/2016,Juventus,Italy Serie A,Italy,91 +2015/2016,Legia Warszawa,Poland Ekstraklasa,Poland,60 +2015/2016,Leicester City,England Premier League,England,81 +2015/2016,PSV,Netherlands Eredivisie,Netherlands,84 +2015/2016,Paris Saint-Germain,France Ligue 1,France,96 +2015/2016,SL Benfica,Portugal Liga ZON Sagres,Portugal,88 diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local283-counterfactual.sql b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local283-counterfactual.sql new file mode 100644 index 00000000..77076856 --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local283-counterfactual.sql @@ -0,0 +1,33 @@ +WITH team_matches AS ( + SELECT season, league_id, home_team_api_id AS team_id, + home_team_goal AS goals_for, away_team_goal AS goals_against + FROM main."Match" + UNION ALL + SELECT season, league_id, away_team_api_id AS team_id, + away_team_goal AS goals_for, home_team_goal AS goals_against + FROM main."Match" +), +season_totals AS ( + SELECT season, league_id, team_id, + SUM(CASE + WHEN goals_for > goals_against THEN 3 + WHEN goals_for = goals_against THEN 1 + ELSE 0 + END) AS total_points + FROM team_matches + GROUP BY season, league_id, team_id +), +standings AS ( + SELECT season, league_id, team_id, total_points, + RANK() OVER (PARTITION BY season, league_id ORDER BY total_points DESC) AS season_rank + FROM season_totals +) +SELECT s.season, t.team_long_name AS team_name, l.name AS league, + c.name AS country, s.total_points +FROM standings AS s +JOIN main.Team AS t ON t.team_api_id = s.team_id +JOIN main.League AS l ON l.id = s.league_id +JOIN main.Country AS c ON c.id = l.country_id +WHERE s.season_rank = 1 +ORDER BY s.season, team_name +LIMIT 1000 \ No newline at end of file diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local283-team-differences.csv b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local283-team-differences.csv new file mode 100644 index 00000000..73bb9b06 --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/offline-diagnosis/local283-team-differences.csv @@ -0,0 +1,3 @@ +season,champion_team,league,country,total_points_pred,total_points_ref,_merge +2008/2009,Standard de Liège,Belgium Jupiler League,Belgium,77,,left_only +2011/2012,Manchester United,England Premier League,England,89,,left_only diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/sha256.json b/bench/accuracy/mcp-review-results/spider-grain-review/sha256.json new file mode 100644 index 00000000..3aa0a984 --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/sha256.json @@ -0,0 +1,27 @@ +{ + "analysis.json": "83361cdf5c81ad1920742c008785ddc63a49713ce3c83bef000de7e93a120b78", + "offline-diagnosis/audit.json": "dc71d30fd3dd37650af6404ebf9d7e04709a7b3da65d727e84435734c475c12e", + "offline-diagnosis/audit.py": "1f63a3b881ff27a72adae051d254378d2bb0a6bddb9ba0592487e02ae96422d9", + "offline-diagnosis/local015-counterfactual.csv": "f9beab1e78d1b510485a4c9e6149c4dfc7f176b75f6ee99c845c4dfaa2b16ec0", + "offline-diagnosis/local015-counterfactual.sql": "70883a9eecb894d47c2d15b47e573e6aa9f1578bc06f4baa6332bcfacd6528c5", + "offline-diagnosis/local059-counterfactual.csv": "bf91b1192d020751fe7779c96d042d0ec94c837eccbe81fcc4aaab1963ed7b6f", + "offline-diagnosis/local059-counterfactual.sql": "2a11c9960004d9c201f2017d162b3c51195a11c810ad8134fc825622985ae0df", + "offline-diagnosis/local283-counterfactual.csv": "bc0b2222157f8b20e8d42f75c033b713703bb8d7a93f094b7c13ca451294b0c7", + "offline-diagnosis/local283-counterfactual.sql": "d316b54c3563d330a05dd0bba01565ac188d36f95b1e3599a83d888420edb2ca", + "offline-diagnosis/local283-team-differences.csv": "ca1e549a65bee387bb34afc79c6947b0d8a32b13fe89b74c8d6f52da4ece306a", + "spider/codex-mcp/csv/local059.csv": "a59ccd2a829b49973762ebfb303a78137a9e53261b4a4d612fd6d18deff1226f", + "spider/codex-mcp/events/local059.answer.txt": "e0b3f531f3afd475c2c185c8450599761d2575706b4c2a099db6f94077ff74ce", + "spider/codex-mcp/events/local059.jsonl": "074de95df753807f4f43097644306332a34448cd726cf6e1cc0a4fe8e37a9f74", + "spider/codex-mcp/events/local059.prompt.txt": "19a8123d5429067d20e3c87b3569b4d83c8294ba94dd0baeb536ec029fe63d65", + "spider/codex-mcp/events/local059.stderr": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "spider/codex-mcp/records/local059.json": "4149d4a441784ec5c5d747eda0f153a87ba4d1fa34301b46e537bd5812cbf3d3", + "spider/codex-mcp/scores.json": "ba20ae38267684700e96088909826fdb7465cb48b2de5f2e1ede21d1d9c2be7a", + "spider/codex-mcp/sql/local059.sql": "a7042bf4407236141e36f37363ddf8556ebe47ee372e3487d5cea8b9960447be", + "spider/codex-mcp/status.json": "841d9f3106b2efa681fdb3969091766d13052b7f9663a48ef7d5715e4e301734", + "spider/log.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "spider/manifest.json": "8606de9af28c84d0a3b0c77933ea5dae108d4de1d614b48632f4af3ee2e353ff", + "spider/settings.json": "a46688a88817c77bf6ea08668c3bd87b90e79a0a9f21be5164d8deff9bcf8923", + "spider/summary.json": "9c47d8b726c279c168fbd0fb52b3ebbad2f2f6d9000c75cd407fa5300fbe2dfa", + "spider-comparison/comparison.json": "1e14bed4879fc440575cb89f665fac55000ff53625e0c2dbf4cb3af939c21fa5", + "spider-comparison/index.html": "c6530aad42c7b964ca17832cb69d242cc27db2273365a69f09540cfe0fd171a7" +} diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/spider-comparison/comparison.json b/bench/accuracy/mcp-review-results/spider-grain-review/spider-comparison/comparison.json new file mode 100644 index 00000000..e147f24d --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/spider-comparison/comparison.json @@ -0,0 +1,420 @@ +{ + "scope": "Recorded score transitions on matched selected cases only; not full accuracy or proof of causality. CSV previews are text, not native SQL types. No semantic failure cause is inferred automatically.", + "sources": [ + { + "path": "/Users/seyoung/workspace/benchmarks/codex-mcp-astra-spider-backlog-20261127/spider-gpt-6.2-astra", + "manifest_sha256": "42d0ea666016e56c84b2a280f7578a3ae88fc1a20d3b7333997de3d916114d49", + "scores_sha256": "0e4850bf9dd660ebf4d2ef9f31843f98c700a6ccd28aa98c19a35d344a16fa7a", + "settings": { + "profiles": [ + { + "name": "codex-mcp", + "model": "gpt-6.2-astra", + "reasoning_effort": "high" + } + ], + "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP", + "revision": "56ade0726fc7522f6d8609d5f256e6267f4ecb40", + "codex_version": "codex-cli 0.170.0", + "sources": { + "bench/accuracy/codex_mcp.py": "561eded13c1b46c3e942ea3a2904da46c65629b4201d28f4fb7e75d12ccf58c0", + "src/lang2sql/frontends/mcp/server.py": "0836ca4631f321c3f3a2c7524e71f6f31e60ac77286633833af6810d3443ddcb" + }, + "schema_document_sha256": "195a0e722bb4e670fda45308e583203fccd7a4979b412a05215ca525e7aec5bf", + "review_source": null, + "failure_selection": null, + "split": "development", + "concurrency": 2, + "case_timeout": 600.0, + "sql_timeout": 30, + "max_rows": 100000, + "api_calls": null, + "usage_unit": "one Codex CLI invocation per question; internal model-call count unavailable" + } + }, + { + "path": "/Users/seyoung/workspace/benchmarks/codex-mcp-spider-grain-review-20261127/spider-gpt-6.2-astra", + "manifest_sha256": "8606de9af28c84d0a3b0c77933ea5dae108d4de1d614b48632f4af3ee2e353ff", + "scores_sha256": "ba20ae38267684700e96088909826fdb7465cb48b2de5f2e1ede21d1d9c2be7a", + "settings": { + "profiles": [ + { + "name": "codex-mcp", + "model": "gpt-6.2-astra", + "reasoning_effort": "high" + } + ], + "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP", + "revision": "f0d5b8e3a9dee5ad950248cdb2cc6424872a65cb", + "codex_version": "codex-cli 0.170.0", + "sources": { + "bench/accuracy/codex_mcp.py": "561eded13c1b46c3e942ea3a2904da46c65629b4201d28f4fb7e75d12ccf58c0", + "src/lang2sql/frontends/mcp/server.py": "0836ca4631f321c3f3a2c7524e71f6f31e60ac77286633833af6810d3443ddcb" + }, + "schema_document_sha256": "195a0e722bb4e670fda45308e583203fccd7a4979b412a05215ca525e7aec5bf", + "review_source": "/Users/seyoung/workspace/benchmarks/codex-mcp-astra-spider-backlog-20261127/spider-gpt-6.2-astra", + "failure_selection": null, + "split": "development", + "concurrency": 1, + "case_timeout": 600.0, + "sql_timeout": 30, + "max_rows": 100000, + "api_calls": null, + "usage_unit": "one Codex CLI invocation per question; internal model-call count unavailable" + } + } + ], + "transitions": { + "0 -> 0": 1 + }, + "cases": [ + { + "input": { + "instance_id": "local059", + "db": "education_business", + "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?", + "external_knowledge": null, + "document_sha256": null + }, + "transition": "0 -> 0", + "sql_diff": "--- before.sql\n+++ after.sql\n@@ -1,15 +1,15 @@\n WITH product_totals AS (\n- SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity\n+ SELECT p.division, p.product, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n- GROUP BY p.division, p.product_code\n+ GROUP BY p.division, p.product\n ),\n ranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n- ORDER BY total_quantity DESC, product_code\n+ ORDER BY total_quantity DESC, product\n ) AS division_rank\n FROM product_totals\n )", + "before": { + "score": 0, + "record_sha256": "e15896e5ff434b51a544362308b83f4de98ce4e5e7205d2020a1979b98fc7a4b", + "record": { + "instance_id": "local059", + "profile": "codex-mcp", + "model": "gpt-6.2-astra", + "status": "predicted", + "calls": [], + "prompt_sha256": "657540a8467ac11aa427c64a778aeae02122debdd9bd09f0949cc2e75d84c1cc", + "events_sha256": "98eb55fb64e56f97fbc7f8e51baa96019a0177f13f998f8556f9d091b36a4ced", + "cli_exit_code": 0, + "cli_usage": [ + { + "input_tokens": 152160, + "cached_input_tokens": 139392, + "cache_write_input_tokens": 0, + "output_tokens": 828, + "reasoning_output_tokens": 28 + } + ], + "mcp_calls": [ + { + "id": "item_1", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "hardware_dim_product" + }, + "result": { + "content": [ + { + "type": "text", + "text": "hardware_dim_product (table)\n- product_code: TEXT\n- division: TEXT\n- segment: TEXT\n- category: TEXT\n- product: TEXT\n- variant: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_2", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"njmNVfleW3BVII_uu55harOY0Xd80ijd0gkLXVGW8tU\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_3", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "hardware_fact_sales_monthly" + }, + "result": { + "content": [ + { + "type": "text", + "text": "hardware_fact_sales_monthly (table)\n- date: TEXT\n- product_code: TEXT\n- customer_code: INTEGER\n- sold_quantity: INTEGER\n- fiscal_year: INTEGER" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_4", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "njmNVfleW3BVII_uu55harOY0Xd80ijd0gkLXVGW8tU", + "sql": "WITH sales AS (\n SELECT product_code, COUNT(*) AS sale_rows, MIN(date) AS first_date, MAX(date) AS last_date\n FROM hardware_fact_sales_monthly\n WHERE date >= '2021-01-01' AND date < '2022-01-01'\n GROUP BY product_code\n)\nSELECT SUM(s.sale_rows) AS joined_rows, (SELECT SUM(sale_rows) FROM sales) AS source_rows,\n COUNT(*) AS matched_codes, COUNT(DISTINCT p.product_code) AS distinct_codes,\n COUNT(DISTINCT p.product) AS product_names, MIN(s.first_date), MAX(s.last_date)\nFROM sales AS s JOIN hardware_dim_product AS p ON p.product_code = s.product_code" + }, + "result": { + "content": [ + { + "type": "text", + "text": "1 row(s):\nResult coverage: fetched_rows=1; displayed_rows=1; fetch_truncated=false; display_truncated=false; sql_rewritten=true; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): joined_rows=int; source_rows=int; matched_codes=int; distinct_codes=int; product_names=int; MIN(s.first_date)=str; MAX(s.last_date)=str\njoined_rows | source_rows | matched_codes | distinct_codes | product_names | MIN(s.first_date) | MAX(s.last_date)\n--- | --- | --- | --- | --- | --- | ---\n403453 | 403453 | 334 | 334 | 68 | 2021-01-01 | 2021-08-01\nSQL: WITH sales AS (\n SELECT product_code, COUNT(*) AS sale_rows, MIN(date) AS first_date, MAX(date) AS last_date\n FROM hardware_fact_sales_monthly\n WHERE date >= '2021-01-01' AND date < '2022-01-01'\n GROUP BY product_code\n)\nSELECT SUM(s.sale_rows) AS joined_rows, (SELECT SUM(sale_rows) FROM sales) AS source_rows,\n COUNT(*) AS matched_codes, COUNT(DISTINCT p.product_code) AS distinct_codes,\n COUNT(DISTINCT p.product) AS product_names, MIN(s.first_date), MAX(s.last_date)\nFROM sales AS s JOIN hardware_dim_product AS p ON p.product_code = s.product_code\nLIMIT 1000" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_5", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"Y_7PwYNdUxl-nxA3DgBph8z1QAgubTKOGA4womd6C7Q\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_6", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "Y_7PwYNdUxl-nxA3DgBph8z1QAgubTKOGA4womd6C7Q", + "expected_columns": [ + "overall_average_quantity_sold" + ], + "sql": "WITH product_totals AS (\n SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product_code\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product_code\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1" + }, + "result": { + "content": [ + { + "type": "text", + "text": "1 row(s):\nOutput columns validated (projection only).\nResult coverage: fetched_rows=1; displayed_rows=1; fetch_truncated=false; display_truncated=false; sql_rewritten=false; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): overall_average_quantity_sold=float\noverall_average_quantity_sold\n---\n217478.66666666666\nSQL: WITH product_totals AS (\n SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product_code\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product_code\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + } + ], + "answer": "```sql\nWITH product_totals AS (\n SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product_code\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product_code\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1\n```", + "event_parse_errors": [], + "rows": 1, + "sql": "WITH product_totals AS (\n SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product_code\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product_code\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1", + "seconds": 29.942429541959427 + }, + "result": { + "columns": [ + "overall_average_quantity_sold" + ], + "row_count": 1, + "preview": [ + [ + "217478.66666666666" + ] + ], + "preview_truncated": false, + "csv_sha256": "0f4dea29469666e7d668fd75eaf0efe4799265dd31821e5938d6e1dde720ad42" + } + }, + "after": { + "score": 0, + "record_sha256": "4149d4a441784ec5c5d747eda0f153a87ba4d1fa34301b46e537bd5812cbf3d3", + "record": { + "instance_id": "local059", + "profile": "codex-mcp", + "model": "gpt-6.2-astra", + "status": "predicted", + "calls": [], + "review_source_record_sha256": "e15896e5ff434b51a544362308b83f4de98ce4e5e7205d2020a1979b98fc7a4b", + "prompt_sha256": "19a8123d5429067d20e3c87b3569b4d83c8294ba94dd0baeb536ec029fe63d65", + "events_sha256": "074de95df753807f4f43097644306332a34448cd726cf6e1cc0a4fe8e37a9f74", + "cli_exit_code": 0, + "cli_usage": [ + { + "input_tokens": 173896, + "cached_input_tokens": 153216, + "cache_write_input_tokens": 0, + "output_tokens": 999, + "reasoning_output_tokens": 0 + } + ], + "mcp_calls": [ + { + "id": "item_1", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "hardware_dim_product" + }, + "result": { + "content": [ + { + "type": "text", + "text": "hardware_dim_product (table)\n- product_code: TEXT\n- division: TEXT\n- segment: TEXT\n- category: TEXT\n- product: TEXT\n- variant: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_2", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"iAt6g_sy6lmCn36AV7sF5DfhLIabvgIsSZLXJAH0jUw\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_3", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "hardware_fact_sales_monthly" + }, + "result": { + "content": [ + { + "type": "text", + "text": "hardware_fact_sales_monthly (table)\n- date: TEXT\n- product_code: TEXT\n- customer_code: INTEGER\n- sold_quantity: INTEGER\n- fiscal_year: INTEGER" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_4", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "iAt6g_sy6lmCn36AV7sF5DfhLIabvgIsSZLXJAH0jUw", + "sql": "WITH sales AS (\n SELECT product_code, COUNT(*) AS row_count, SUM(sold_quantity) AS units,\n MIN(date) AS first_month, MAX(date) AS last_month\n FROM hardware_fact_sales_monthly\n WHERE date >= '2021-01-01' AND date < '2022-01-01'\n GROUP BY product_code\n), products AS (\n SELECT p.division, p.product, COUNT(*) AS codes, COUNT(DISTINCT p.variant) AS variants,\n SUM(s.units) AS units, SUM(s.row_count) AS sale_rows\n FROM sales AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n GROUP BY p.division, p.product\n), ranked AS (\n SELECT *, ROW_NUMBER() OVER (PARTITION BY division ORDER BY units DESC, product) AS position,\n SUM(sale_rows) OVER () AS matched_rows\n FROM products\n)\nSELECT division, product, codes, variants, units, position, matched_rows,\n (SELECT SUM(row_count) FROM sales) AS source_rows,\n (SELECT MIN(first_month) FROM sales) AS first_month,\n (SELECT MAX(last_month) FROM sales) AS last_month,\n (SELECT COUNT(*) - COUNT(DISTINCT product_code) FROM hardware_dim_product) AS extra_code_rows\nFROM ranked\nWHERE position <= 4\nORDER BY division, position\nLIMIT 30" + }, + "result": { + "content": [ + { + "type": "text", + "text": "12 row(s):\nResult coverage: fetched_rows=12; displayed_rows=12; fetch_truncated=false; display_truncated=false; sql_rewritten=false; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): division=str; product=str; codes=int; variants=int; units=int; position=int; matched_rows=int; source_rows=int; first_month=str; last_month=str; extra_code_rows=int\ndivision | product | codes | variants | units | position | matched_rows | source_rows | first_month | last_month | extra_code_rows\n--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---\nN & S | AQ Pen Drive DRC | 3 | 3 | 1184498 | 1 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nN & S | AQ Clx1 | 3 | 3 | 723844 | 2 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nN & S | AQ Digit SSD | 3 | 3 | 723771 | 3 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nN & S | AQ Neuer SSD | 3 | 3 | 704142 | 4 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nP & A | AQ Maxima Ms | 6 | 6 | 1430834 | 1 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nP & A | AQ Lite Ms | 6 | 6 | 1430579 | 2 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nP & A | AQ Gamers Ms | 6 | 6 | 1425196 | 3 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nP & A | AQ Master wired x1 Ms | 6 | 6 | 1424162 | 4 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nPC | AQ Elite | 8 | 8 | 78639 | 1 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nPC | AQ Digit | 8 | 8 | 78229 | 2 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nPC | AQ Gen Y | 8 | 8 | 78194 | 3 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nPC | AQ Gen X | 8 | 8 | 77547 | 4 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nSQL: WITH sales AS (\n SELECT product_code, COUNT(*) AS row_count, SUM(sold_quantity) AS units,\n MIN(date) AS first_month, MAX(date) AS last_month\n FROM hardware_fact_sales_monthly\n WHERE date >= '2021-01-01' AND date < '2022-01-01'\n GROUP BY product_code\n), products AS (\n SELECT p.division, p.product, COUNT(*) AS codes, COUNT(DISTINCT p.variant) AS variants,\n SUM(s.units) AS units, SUM(s.row_count) AS sale_rows\n FROM sales AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n GROUP BY p.division, p.product\n), ranked AS (\n SELECT *, ROW_NUMBER() OVER (PARTITION BY division ORDER BY units DESC, product) AS position,\n SUM(sale_rows) OVER () AS matched_rows\n FROM products\n)\nSELECT division, product, codes, variants, units, position, matched_rows,\n (SELECT SUM(row_count) FROM sales) AS source_rows,\n (SELECT MIN(first_month) FROM sales) AS first_month,\n (SELECT MAX(last_month) FROM sales) AS last_month,\n (SELECT COUNT(*) - COUNT(DISTINCT product_code) FROM hardware_dim_product) AS extra_code_rows\nFROM ranked\nWHERE position <= 4\nORDER BY division, position\nLIMIT 30" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_6", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"i0iTRRGt8HDp_o96_f9hRhWX72etBuMXxC3VVAqDSdU\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_7", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "i0iTRRGt8HDp_o96_f9hRhWX72etBuMXxC3VVAqDSdU", + "expected_columns": [ + "overall_average_quantity_sold" + ], + "sql": "WITH product_totals AS (\n SELECT p.division, p.product, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1" + }, + "result": { + "content": [ + { + "type": "text", + "text": "1 row(s):\nOutput columns validated (projection only).\nResult coverage: fetched_rows=1; displayed_rows=1; fetch_truncated=false; display_truncated=false; sql_rewritten=false; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): overall_average_quantity_sold=float\noverall_average_quantity_sold\n---\n794864.8888888889\nSQL: WITH product_totals AS (\n SELECT p.division, p.product, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + } + ], + "answer": "```sql\nWITH product_totals AS (\n SELECT p.division, p.product, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1\n```", + "event_parse_errors": [], + "rows": 1, + "sql": "WITH product_totals AS (\n SELECT p.division, p.product, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1", + "seconds": 38.3834674579557 + }, + "result": { + "columns": [ + "overall_average_quantity_sold" + ], + "row_count": 1, + "preview": [ + [ + "794864.8888888889" + ] + ], + "preview_truncated": false, + "csv_sha256": "a59ccd2a829b49973762ebfb303a78137a9e53261b4a4d612fd6d18deff1226f" + } + } + } + ] +} diff --git a/bench/accuracy/mcp-review-results/spider-grain-review/spider-comparison/index.html b/bench/accuracy/mcp-review-results/spider-grain-review/spider-comparison/index.html new file mode 100644 index 00000000..c5f4f04d --- /dev/null +++ b/bench/accuracy/mcp-review-results/spider-grain-review/spider-comparison/index.html @@ -0,0 +1,414 @@ +
Recorded score transitions on matched selected cases only; not full accuracy or proof of causality. CSV previews are text, not native SQL types. No semantic failure cause is inferred automatically.
{
+ "0 -> 0": 1
+}[
+ {
+ "path": "/Users/seyoung/workspace/benchmarks/codex-mcp-astra-spider-backlog-20261127/spider-gpt-6.2-astra",
+ "manifest_sha256": "42d0ea666016e56c84b2a280f7578a3ae88fc1a20d3b7333997de3d916114d49",
+ "scores_sha256": "0e4850bf9dd660ebf4d2ef9f31843f98c700a6ccd28aa98c19a35d344a16fa7a",
+ "settings": {
+ "profiles": [
+ {
+ "name": "codex-mcp",
+ "model": "gpt-6.2-astra",
+ "reasoning_effort": "high"
+ }
+ ],
+ "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP",
+ "revision": "56ade0726fc7522f6d8609d5f256e6267f4ecb40",
+ "codex_version": "codex-cli 0.170.0",
+ "sources": {
+ "bench/accuracy/codex_mcp.py": "561eded13c1b46c3e942ea3a2904da46c65629b4201d28f4fb7e75d12ccf58c0",
+ "src/lang2sql/frontends/mcp/server.py": "0836ca4631f321c3f3a2c7524e71f6f31e60ac77286633833af6810d3443ddcb"
+ },
+ "schema_document_sha256": "195a0e722bb4e670fda45308e583203fccd7a4979b412a05215ca525e7aec5bf",
+ "review_source": null,
+ "failure_selection": null,
+ "split": "development",
+ "concurrency": 2,
+ "case_timeout": 600.0,
+ "sql_timeout": 30,
+ "max_rows": 100000,
+ "api_calls": null,
+ "usage_unit": "one Codex CLI invocation per question; internal model-call count unavailable"
+ }
+ },
+ {
+ "path": "/Users/seyoung/workspace/benchmarks/codex-mcp-spider-grain-review-20261127/spider-gpt-6.2-astra",
+ "manifest_sha256": "8606de9af28c84d0a3b0c77933ea5dae108d4de1d614b48632f4af3ee2e353ff",
+ "scores_sha256": "ba20ae38267684700e96088909826fdb7465cb48b2de5f2e1ede21d1d9c2be7a",
+ "settings": {
+ "profiles": [
+ {
+ "name": "codex-mcp",
+ "model": "gpt-6.2-astra",
+ "reasoning_effort": "high"
+ }
+ ],
+ "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP",
+ "revision": "f0d5b8e3a9dee5ad950248cdb2cc6424872a65cb",
+ "codex_version": "codex-cli 0.170.0",
+ "sources": {
+ "bench/accuracy/codex_mcp.py": "561eded13c1b46c3e942ea3a2904da46c65629b4201d28f4fb7e75d12ccf58c0",
+ "src/lang2sql/frontends/mcp/server.py": "0836ca4631f321c3f3a2c7524e71f6f31e60ac77286633833af6810d3443ddcb"
+ },
+ "schema_document_sha256": "195a0e722bb4e670fda45308e583203fccd7a4979b412a05215ca525e7aec5bf",
+ "review_source": "/Users/seyoung/workspace/benchmarks/codex-mcp-astra-spider-backlog-20261127/spider-gpt-6.2-astra",
+ "failure_selection": null,
+ "split": "development",
+ "concurrency": 1,
+ "case_timeout": 600.0,
+ "sql_timeout": 30,
+ "max_rows": 100000,
+ "api_calls": null,
+ "usage_unit": "one Codex CLI invocation per question; internal model-call count unavailable"
+ }
+ }
+]{
+ "instance_id": "local059",
+ "db": "education_business",
+ "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?",
+ "external_knowledge": null,
+ "document_sha256": null
+}--- before.sql ++++ after.sql +@@ -1,15 +1,15 @@ + WITH product_totals AS ( +- SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity ++ SELECT p.division, p.product, SUM(s.sold_quantity) AS total_quantity + FROM hardware_fact_sales_monthly AS s + JOIN hardware_dim_product AS p ON p.product_code = s.product_code + WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01' +- GROUP BY p.division, p.product_code ++ GROUP BY p.division, p.product + ), + ranked_products AS ( + SELECT total_quantity, + ROW_NUMBER() OVER ( + PARTITION BY division +- ORDER BY total_quantity DESC, product_code ++ ORDER BY total_quantity DESC, product + ) AS division_rank + FROM product_totals + )
{
+ "status": "predicted",
+ "error_type": null,
+ "error_message": null,
+ "seconds": 29.942429541959427
+}WITH product_totals AS ( + SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity + FROM hardware_fact_sales_monthly AS s + JOIN hardware_dim_product AS p ON p.product_code = s.product_code + WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01' + GROUP BY p.division, p.product_code +), +ranked_products AS ( + SELECT total_quantity, + ROW_NUMBER() OVER ( + PARTITION BY division + ORDER BY total_quantity DESC, product_code + ) AS division_rank + FROM product_totals +) +SELECT AVG(total_quantity) AS overall_average_quantity_sold +FROM ranked_products +WHERE division_rank <= 3 +LIMIT 1
{
+ "columns": [
+ "overall_average_quantity_sold"
+ ],
+ "row_count": 1,
+ "preview": [
+ [
+ "217478.66666666666"
+ ]
+ ],
+ "preview_truncated": false,
+ "csv_sha256": "0f4dea29469666e7d668fd75eaf0efe4799265dd31821e5938d6e1dde720ad42"
+}[
+ {
+ "id": "item_1",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "explore_schema",
+ "arguments": {
+ "table": "hardware_dim_product"
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "hardware_dim_product (table)\n- product_code: TEXT\n- division: TEXT\n- segment: TEXT\n- category: TEXT\n- product: TEXT\n- variant: TEXT"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_2",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "resolve_business_terms",
+ "arguments": {
+ "terms": []
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"definition_check_id\": \"njmNVfleW3BVII_uu55harOY0Xd80ijd0gkLXVGW8tU\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_3",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "explore_schema",
+ "arguments": {
+ "table": "hardware_fact_sales_monthly"
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "hardware_fact_sales_monthly (table)\n- date: TEXT\n- product_code: TEXT\n- customer_code: INTEGER\n- sold_quantity: INTEGER\n- fiscal_year: INTEGER"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_4",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "run_sql",
+ "arguments": {
+ "definition_check_id": "njmNVfleW3BVII_uu55harOY0Xd80ijd0gkLXVGW8tU",
+ "sql": "WITH sales AS (\n SELECT product_code, COUNT(*) AS sale_rows, MIN(date) AS first_date, MAX(date) AS last_date\n FROM hardware_fact_sales_monthly\n WHERE date >= '2021-01-01' AND date < '2022-01-01'\n GROUP BY product_code\n)\nSELECT SUM(s.sale_rows) AS joined_rows, (SELECT SUM(sale_rows) FROM sales) AS source_rows,\n COUNT(*) AS matched_codes, COUNT(DISTINCT p.product_code) AS distinct_codes,\n COUNT(DISTINCT p.product) AS product_names, MIN(s.first_date), MAX(s.last_date)\nFROM sales AS s JOIN hardware_dim_product AS p ON p.product_code = s.product_code"
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "1 row(s):\nResult coverage: fetched_rows=1; displayed_rows=1; fetch_truncated=false; display_truncated=false; sql_rewritten=true; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): joined_rows=int; source_rows=int; matched_codes=int; distinct_codes=int; product_names=int; MIN(s.first_date)=str; MAX(s.last_date)=str\njoined_rows | source_rows | matched_codes | distinct_codes | product_names | MIN(s.first_date) | MAX(s.last_date)\n--- | --- | --- | --- | --- | --- | ---\n403453 | 403453 | 334 | 334 | 68 | 2021-01-01 | 2021-08-01\nSQL: WITH sales AS (\n SELECT product_code, COUNT(*) AS sale_rows, MIN(date) AS first_date, MAX(date) AS last_date\n FROM hardware_fact_sales_monthly\n WHERE date >= '2021-01-01' AND date < '2022-01-01'\n GROUP BY product_code\n)\nSELECT SUM(s.sale_rows) AS joined_rows, (SELECT SUM(sale_rows) FROM sales) AS source_rows,\n COUNT(*) AS matched_codes, COUNT(DISTINCT p.product_code) AS distinct_codes,\n COUNT(DISTINCT p.product) AS product_names, MIN(s.first_date), MAX(s.last_date)\nFROM sales AS s JOIN hardware_dim_product AS p ON p.product_code = s.product_code\nLIMIT 1000"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_5",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "resolve_business_terms",
+ "arguments": {
+ "terms": []
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"definition_check_id\": \"Y_7PwYNdUxl-nxA3DgBph8z1QAgubTKOGA4womd6C7Q\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_6",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "run_sql",
+ "arguments": {
+ "definition_check_id": "Y_7PwYNdUxl-nxA3DgBph8z1QAgubTKOGA4womd6C7Q",
+ "expected_columns": [
+ "overall_average_quantity_sold"
+ ],
+ "sql": "WITH product_totals AS (\n SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product_code\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product_code\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1"
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "1 row(s):\nOutput columns validated (projection only).\nResult coverage: fetched_rows=1; displayed_rows=1; fetch_truncated=false; display_truncated=false; sql_rewritten=false; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): overall_average_quantity_sold=float\noverall_average_quantity_sold\n---\n217478.66666666666\nSQL: WITH product_totals AS (\n SELECT p.division, p.product_code, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product_code\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product_code\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ }
+]{
+ "status": "predicted",
+ "error_type": null,
+ "error_message": null,
+ "seconds": 38.3834674579557
+}WITH product_totals AS ( + SELECT p.division, p.product, SUM(s.sold_quantity) AS total_quantity + FROM hardware_fact_sales_monthly AS s + JOIN hardware_dim_product AS p ON p.product_code = s.product_code + WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01' + GROUP BY p.division, p.product +), +ranked_products AS ( + SELECT total_quantity, + ROW_NUMBER() OVER ( + PARTITION BY division + ORDER BY total_quantity DESC, product + ) AS division_rank + FROM product_totals +) +SELECT AVG(total_quantity) AS overall_average_quantity_sold +FROM ranked_products +WHERE division_rank <= 3 +LIMIT 1
{
+ "columns": [
+ "overall_average_quantity_sold"
+ ],
+ "row_count": 1,
+ "preview": [
+ [
+ "794864.8888888889"
+ ]
+ ],
+ "preview_truncated": false,
+ "csv_sha256": "a59ccd2a829b49973762ebfb303a78137a9e53261b4a4d612fd6d18deff1226f"
+}[
+ {
+ "id": "item_1",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "explore_schema",
+ "arguments": {
+ "table": "hardware_dim_product"
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "hardware_dim_product (table)\n- product_code: TEXT\n- division: TEXT\n- segment: TEXT\n- category: TEXT\n- product: TEXT\n- variant: TEXT"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_2",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "resolve_business_terms",
+ "arguments": {
+ "terms": []
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"definition_check_id\": \"iAt6g_sy6lmCn36AV7sF5DfhLIabvgIsSZLXJAH0jUw\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_3",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "explore_schema",
+ "arguments": {
+ "table": "hardware_fact_sales_monthly"
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "hardware_fact_sales_monthly (table)\n- date: TEXT\n- product_code: TEXT\n- customer_code: INTEGER\n- sold_quantity: INTEGER\n- fiscal_year: INTEGER"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_4",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "run_sql",
+ "arguments": {
+ "definition_check_id": "iAt6g_sy6lmCn36AV7sF5DfhLIabvgIsSZLXJAH0jUw",
+ "sql": "WITH sales AS (\n SELECT product_code, COUNT(*) AS row_count, SUM(sold_quantity) AS units,\n MIN(date) AS first_month, MAX(date) AS last_month\n FROM hardware_fact_sales_monthly\n WHERE date >= '2021-01-01' AND date < '2022-01-01'\n GROUP BY product_code\n), products AS (\n SELECT p.division, p.product, COUNT(*) AS codes, COUNT(DISTINCT p.variant) AS variants,\n SUM(s.units) AS units, SUM(s.row_count) AS sale_rows\n FROM sales AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n GROUP BY p.division, p.product\n), ranked AS (\n SELECT *, ROW_NUMBER() OVER (PARTITION BY division ORDER BY units DESC, product) AS position,\n SUM(sale_rows) OVER () AS matched_rows\n FROM products\n)\nSELECT division, product, codes, variants, units, position, matched_rows,\n (SELECT SUM(row_count) FROM sales) AS source_rows,\n (SELECT MIN(first_month) FROM sales) AS first_month,\n (SELECT MAX(last_month) FROM sales) AS last_month,\n (SELECT COUNT(*) - COUNT(DISTINCT product_code) FROM hardware_dim_product) AS extra_code_rows\nFROM ranked\nWHERE position <= 4\nORDER BY division, position\nLIMIT 30"
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "12 row(s):\nResult coverage: fetched_rows=12; displayed_rows=12; fetch_truncated=false; display_truncated=false; sql_rewritten=false; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): division=str; product=str; codes=int; variants=int; units=int; position=int; matched_rows=int; source_rows=int; first_month=str; last_month=str; extra_code_rows=int\ndivision | product | codes | variants | units | position | matched_rows | source_rows | first_month | last_month | extra_code_rows\n--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---\nN & S | AQ Pen Drive DRC | 3 | 3 | 1184498 | 1 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nN & S | AQ Clx1 | 3 | 3 | 723844 | 2 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nN & S | AQ Digit SSD | 3 | 3 | 723771 | 3 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nN & S | AQ Neuer SSD | 3 | 3 | 704142 | 4 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nP & A | AQ Maxima Ms | 6 | 6 | 1430834 | 1 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nP & A | AQ Lite Ms | 6 | 6 | 1430579 | 2 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nP & A | AQ Gamers Ms | 6 | 6 | 1425196 | 3 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nP & A | AQ Master wired x1 Ms | 6 | 6 | 1424162 | 4 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nPC | AQ Elite | 8 | 8 | 78639 | 1 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nPC | AQ Digit | 8 | 8 | 78229 | 2 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nPC | AQ Gen Y | 8 | 8 | 78194 | 3 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nPC | AQ Gen X | 8 | 8 | 77547 | 4 | 403453 | 403453 | 2021-01-01 | 2021-08-01 | 0\nSQL: WITH sales AS (\n SELECT product_code, COUNT(*) AS row_count, SUM(sold_quantity) AS units,\n MIN(date) AS first_month, MAX(date) AS last_month\n FROM hardware_fact_sales_monthly\n WHERE date >= '2021-01-01' AND date < '2022-01-01'\n GROUP BY product_code\n), products AS (\n SELECT p.division, p.product, COUNT(*) AS codes, COUNT(DISTINCT p.variant) AS variants,\n SUM(s.units) AS units, SUM(s.row_count) AS sale_rows\n FROM sales AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n GROUP BY p.division, p.product\n), ranked AS (\n SELECT *, ROW_NUMBER() OVER (PARTITION BY division ORDER BY units DESC, product) AS position,\n SUM(sale_rows) OVER () AS matched_rows\n FROM products\n)\nSELECT division, product, codes, variants, units, position, matched_rows,\n (SELECT SUM(row_count) FROM sales) AS source_rows,\n (SELECT MIN(first_month) FROM sales) AS first_month,\n (SELECT MAX(last_month) FROM sales) AS last_month,\n (SELECT COUNT(*) - COUNT(DISTINCT product_code) FROM hardware_dim_product) AS extra_code_rows\nFROM ranked\nWHERE position <= 4\nORDER BY division, position\nLIMIT 30"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_6",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "resolve_business_terms",
+ "arguments": {
+ "terms": []
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "{\"definition_check_id\": \"i0iTRRGt8HDp_o96_f9hRhWX72etBuMXxC3VVAqDSdU\", \"definitions\": [], \"instruction\": \"For oracle_view the operator has confirmed the contract: call run_sql with this definition_check_id, period_start and exclusive period_end, without sql. An explicit calendar year/month is sufficient to derive these dates. Ask only if the period or business meaning is actually unclear. For text definitions use SQL. Discover schema and use qualified table names before run_sql. A receipt is not proof of SQL semantic correctness.\"}"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ },
+ {
+ "id": "item_7",
+ "type": "mcp_tool_call",
+ "server": "lang2sql",
+ "tool": "run_sql",
+ "arguments": {
+ "definition_check_id": "i0iTRRGt8HDp_o96_f9hRhWX72etBuMXxC3VVAqDSdU",
+ "expected_columns": [
+ "overall_average_quantity_sold"
+ ],
+ "sql": "WITH product_totals AS (\n SELECT p.division, p.product, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1"
+ },
+ "result": {
+ "content": [
+ {
+ "type": "text",
+ "text": "1 row(s):\nOutput columns validated (projection only).\nResult coverage: fetched_rows=1; displayed_rows=1; fetch_truncated=false; display_truncated=false; sql_rewritten=false; query_timeout_enforced=true; query_timeout_scope=sqlite_vm. Counts refer to the executed SQL, not the source table size.\nObserved value types (displayed rows): overall_average_quantity_sold=float\noverall_average_quantity_sold\n---\n794864.8888888889\nSQL: WITH product_totals AS (\n SELECT p.division, p.product, SUM(s.sold_quantity) AS total_quantity\n FROM hardware_fact_sales_monthly AS s\n JOIN hardware_dim_product AS p ON p.product_code = s.product_code\n WHERE s.date >= '2021-01-01' AND s.date < '2022-01-01'\n GROUP BY p.division, p.product\n),\nranked_products AS (\n SELECT total_quantity,\n ROW_NUMBER() OVER (\n PARTITION BY division\n ORDER BY total_quantity DESC, product\n ) AS division_rank\n FROM product_totals\n)\nSELECT AVG(total_quantity) AS overall_average_quantity_sold\nFROM ranked_products\nWHERE division_rank <= 3\nLIMIT 1"
+ }
+ ],
+ "structured_content": null
+ },
+ "error": null,
+ "status": "completed"
+ }
+]