From 27b222f33f96aa5b01d6ffb25e5f70a603d8503a Mon Sep 17 00:00:00 2001 From: seyeong Date: Fri, 27 Nov 2026 06:04:00 +0900 Subject: [PATCH 1/4] Compile fixed-scale decimal aggregates with exact integer rounding --- bench/accuracy/README.md | 19 + .../experiments/fixed-decimal/manifest.json | 387 ++++++++++++++++++ .../experiments/fixed-decimal/protocol.json | 112 +++++ bench/oracle_view/codex_demo.py | 2 +- src/lang2sql/tenancy/tool_runtime.py | 2 + src/lang2sql/tools/__init__.py | 3 + src/lang2sql/tools/fixed_decimal_sql.py | 127 ++++++ tests/test_fixed_decimal_sql.py | 107 +++++ tests/test_integration.py | 3 +- tests/test_mcp.py | 23 ++ 10 files changed, 783 insertions(+), 2 deletions(-) create mode 100644 bench/accuracy/experiments/fixed-decimal/manifest.json create mode 100644 bench/accuracy/experiments/fixed-decimal/protocol.json create mode 100644 src/lang2sql/tools/fixed_decimal_sql.py create mode 100644 tests/test_fixed_decimal_sql.py diff --git a/bench/accuracy/README.md b/bench/accuracy/README.md index 4f7ae0ea..60d2a336 100644 --- a/bench/accuracy/README.md +++ b/bench/accuracy/README.md @@ -231,3 +231,22 @@ read-only guards. No SQLite extension/UDF is needed by exported SQL or grading. The `experiments/calendar-interval` protocol freezes a fresh Astra/high retry of one prior Spider failure. Neither diagnostic answers nor reference results are passed to inference. Its outcome is a repair rate on that case, not full accuracy. + +### Fixed decimal aggregation probe + +`fixed_decimal_sql(dialect="sqlite", input_scale=1, output_scale=2, +aggregate="avg")` emits CTEs consuming `decimal_input(group_id, scaled_value)`. +The caller must supply integers in declared units after checking source precision; +the tool does not round arbitrary source data or infer currency conversions. +`decimal_result` exposes `status`, `invalid_count`, `n`, exact `rounded_units`, and +`rounded_value`. AVG and SUM use integer quotient/remainder and round half away +from zero once after aggregation. Noninteger input or unsafe magnitude makes the +entire group invalid/overflow instead of silently computing a partial result. +NULL input follows normal aggregate exclusion; all-NULL groups return empty. +Scales 0–6 are supported; absolute sums and denominators are conservatively bounded +to the exact-integer range of binary64 for overflow checks. SQL is plain SQLite, +requires no UDF, and still executes through guarded `run_sql`. + +The `experiments/fixed-decimal` protocol freezes a fresh original-input retry of +one prior Spider rounding failure. It is a selected repair experiment, not a full +accuracy measurement. Existing calendar tooling is retained from the parent PR. diff --git a/bench/accuracy/experiments/fixed-decimal/manifest.json b/bench/accuracy/experiments/fixed-decimal/manifest.json new file mode 100644 index 00000000..54b4b07f --- /dev/null +++ b/bench/accuracy/experiments/fixed-decimal/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": "local152", + "db": "imdb_movies", + "question": "Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order.", + "external_knowledge": null, + "document_sha256": null + } + ], + "suite": "spider2", + "development_ids": [ + "local152" + ], + "holdout_ids": [], + "split_seed": 20261126 +} diff --git a/bench/accuracy/experiments/fixed-decimal/protocol.json b/bench/accuracy/experiments/fixed-decimal/protocol.json new file mode 100644 index 00000000..de51ab32 --- /dev/null +++ b/bench/accuracy/experiments/fixed-decimal/protocol.json @@ -0,0 +1,112 @@ +{ + "purpose": "Test deterministic fixed-scale decimal aggregation on one existing rounding failure", + "model": "gpt-6.2-astra", + "reasoning_effort": "high", + "selected_ids": [ + "local152" + ], + "baseline": "/Users/seyoung/workspace/benchmarks/codex-mcp-astra-spider-backlog-20261127/spider-gpt-6.2-astra", + "inference": "Fresh original question/schema/docs only; no diagnostic answers, reference values, previous model output or grading feedback", + "change": "Add fixed_decimal_sql to existing tool registry and read-only whitelist; no prompt or grader edits. Calendar tool from PR346 is also present, not isolated from old baseline.", + "metric": "Single selected failure repair, not full Spider accuracy", + "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": "1944edb838a2964c53cb7ae18f461cf715574b8aa5365b9d5a9bf191c865c0f6", + "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" + } +} diff --git a/bench/oracle_view/codex_demo.py b/bench/oracle_view/codex_demo.py index a4f2a650..c3f03965 100644 --- a/bench/oracle_view/codex_demo.py +++ b/bench/oracle_view/codex_demo.py @@ -9,7 +9,7 @@ import tempfile from pathlib import Path -READ_TOOLS = ["resolve_business_terms", "explore_schema", "run_sql", "calendar_interval_sql"] +READ_TOOLS = ["resolve_business_terms", "explore_schema", "run_sql", "calendar_interval_sql", "fixed_decimal_sql"] def mcp_settings(server_args, *, tools=READ_TOOLS, extra_env=()): diff --git a/src/lang2sql/tenancy/tool_runtime.py b/src/lang2sql/tenancy/tool_runtime.py index 100463f0..fa54d220 100644 --- a/src/lang2sql/tenancy/tool_runtime.py +++ b/src/lang2sql/tenancy/tool_runtime.py @@ -16,6 +16,7 @@ from ..tools.calendar_interval_sql import CalendarIntervalSQL from ..tools.context_candidates import ContextCandidates from ..tools.explore_schema import ExploreSchema +from ..tools.fixed_decimal_sql import FixedDecimalSQL from ..tools.recall_memory import RecallMemory from ..tools.remember import Remember from ..tools.run_sql import RunSQL @@ -55,6 +56,7 @@ def build_tool_context( [ RunSQL(), CalendarIntervalSQL(), + FixedDecimalSQL(), ContextCandidates(), ExploreSchema(), SemanticFederationTool(), diff --git a/src/lang2sql/tools/__init__.py b/src/lang2sql/tools/__init__.py index af7b0cb8..14734dec 100644 --- a/src/lang2sql/tools/__init__.py +++ b/src/lang2sql/tools/__init__.py @@ -17,6 +17,7 @@ from .confirm_ingest import ConfirmIngest from .enrich_schema import EnrichSchema from .explore_schema import ExploreSchema +from .fixed_decimal_sql import FixedDecimalSQL from .ingest_doc import IngestDoc from .org_setup import OrgSetupTool from .remember import Remember @@ -29,6 +30,7 @@ "ConfirmIngest", "EnrichSchema", "ExploreSchema", + "FixedDecimalSQL", "IngestDoc", "OrgSetupTool", "Remember", @@ -49,6 +51,7 @@ def build_default_tools( return [ RunSQL(), CalendarIntervalSQL(), + FixedDecimalSQL(), ExploreSchema(), EnrichSchema(), SemanticFederationTool(), diff --git a/src/lang2sql/tools/fixed_decimal_sql.py b/src/lang2sql/tools/fixed_decimal_sql.py new file mode 100644 index 00000000..d2ff9a0b --- /dev/null +++ b/src/lang2sql/tools/fixed_decimal_sql.py @@ -0,0 +1,127 @@ +"""Compile exact fixed-scale aggregation to ordinary SQLite integer arithmetic.""" + +from __future__ import annotations + +from ..core.types import ToolResult, ToolSpec + +# TOTAL is used only to bound absolute sums. Every integer up to this boundary +# is exactly representable, and the actual signed sum uses INTEGER arithmetic. +_MAX_EXACT_INTEGER = 2**53 - 1 +_MAX_SCALE = 6 + + +def fixed_decimal_ctes(input_scale: int, output_scale: int, aggregate: str) -> str: + """Consume decimal_input(group_id, scaled_value); do not infer input precision.""" + if any( + type(x) is not int or not 0 <= x <= _MAX_SCALE + for x in (input_scale, output_scale) + ): + raise ValueError( + f"input_scale/output_scale must be integers from 0 to {_MAX_SCALE}" + ) + if aggregate not in ("avg", "sum"): + raise ValueError("aggregate must be avg or sum") + factor = 10**output_scale + denominator = ( + f"n * {10**input_scale}" if aggregate == "avg" else str(10**input_scale) + ) + bound = _MAX_EXACT_INTEGER // factor + return f"""decimal_bounds AS ( + SELECT group_id, scaled_value, + COUNT(scaled_value) OVER g AS n, + SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count, + SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN {-bound} AND {bound} THEN 1 ELSE 0 END) OVER g AS oversized_count, + TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN {-bound} AND {bound} THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total + FROM decimal_input + WINDOW g AS (PARTITION BY group_id) +), decimal_totals AS ( + SELECT group_id, n, invalid_count, + CASE WHEN invalid_count > 0 THEN 'invalid_input' + WHEN n = 0 THEN 'empty' + WHEN oversized_count > 0 OR abs_total > {bound} + OR n > {_MAX_EXACT_INTEGER // 10**input_scale} THEN 'overflow' + ELSE 'ok' END AS status, + SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0 + AND abs_total <= {bound} AND n <= {_MAX_EXACT_INTEGER // 10**input_scale} + THEN scaled_value END) AS scaled_sum + FROM decimal_bounds + GROUP BY group_id +), decimal_fraction AS ( + SELECT group_id, n, invalid_count, status, + scaled_sum * {factor} AS numerator, {denominator} AS denominator + FROM decimal_totals +), decimal_rounded AS ( + SELECT group_id, n, invalid_count, status, + CASE WHEN status = 'ok' THEN numerator / denominator + + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2 + THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units + FROM decimal_fraction +), decimal_result AS ( + SELECT *, rounded_units * 1.0 / {factor} AS rounded_value + FROM decimal_rounded +)""" + + +class FixedDecimalSQL: + @property + def spec(self) -> ToolSpec: + return ToolSpec( + name="fixed_decimal_sql", + description=( + "Generate tested SQLite SQL for rounded decimal AVG/SUM using integer arithmetic, " + "avoiding binary floating-point midpoint errors in ROUND(AVG(...)). " + "Requires explicitly scaled integer inputs and known decimal precision. " + "Returns CTEs; execute through run_sql. Does not infer monetary units or round source data." + ), + parameters={ + "type": "object", + "properties": { + "dialect": {"type": "string", "enum": ["sqlite"]}, + "input_scale": { + "type": "integer", + "minimum": 0, + "maximum": _MAX_SCALE, + }, + "output_scale": { + "type": "integer", + "minimum": 0, + "maximum": _MAX_SCALE, + }, + "aggregate": {"type": "string", "enum": ["avg", "sum"]}, + }, + "required": ["dialect", "input_scale", "output_scale", "aggregate"], + }, + ) + + async def run(self, args, ctx) -> ToolResult: + if ( + set(args) != {"dialect", "input_scale", "output_scale", "aggregate"} + or args["dialect"] != "sqlite" + ): + raise ValueError( + "Require dialect=sqlite, input_scale, output_scale and aggregate" + ) + ctes = fixed_decimal_ctes( + args["input_scale"], args["output_scale"], args["aggregate"] + ) + return ToolResult( + call_id="", + content=( + "SQLite only. Supply WITH decimal_input AS (your SELECT exposing group_id, " + "scaled_value), append these CTEs, then SELECT from decimal_result. Reserve " + "decimal_* CTE names. NULL inputs are excluded like AVG/SUM.\n" + "scaled_value MUST be an INTEGER representing value * 10^input_scale. " + "Confirm source precision before conversion: for known fixed-scale numeric data, " + "CAST(ROUND(value * 10^input_scale) AS INTEGER) removes representation noise. " + "Do not choose a scale that rounds away meaningful source digits. No precision " + "or currency conversion is inferred by this tool.\n" + "Inspect status and invalid_count: noninteger non-NULL input makes the entire " + "group invalid_input; unsafe magnitude makes it overflow; all NULL makes it empty. " + "Those groups retain their row with NULL results. No partial aggregates.\n" + "Rounding is half away from zero, performed once after aggregation using exact " + "integer quotient/remainder. rounded_units is the exact integer at output_scale; " + "rounded_value is its REAL representation for normal SQL display. " + "This changes neither the source values nor the DB connection; run_sql remains required.\n\n" + + ctes + ), + ) diff --git a/tests/test_fixed_decimal_sql.py b/tests/test_fixed_decimal_sql.py new file mode 100644 index 00000000..8dcff9cf --- /dev/null +++ b/tests/test_fixed_decimal_sql.py @@ -0,0 +1,107 @@ +"""Check compiled SQL against Decimal, without model calls or custom SQLite UDFs.""" + +import random +import sqlite3 +from decimal import ROUND_HALF_UP, Decimal + +import pytest + +from lang2sql.tools.fixed_decimal_sql import FixedDecimalSQL, fixed_decimal_ctes + + +def execute(rows, input_scale=1, output_scale=1, aggregate="avg"): + with sqlite3.connect(":memory:") as conn: + conn.execute("CREATE TABLE decimal_input(group_id, scaled_value)") + conn.executemany("INSERT INTO decimal_input VALUES (?, ?)", rows) + return conn.execute( + "WITH " + + fixed_decimal_ctes(input_scale, output_scale, aggregate) + + " SELECT group_id, n, invalid_count, status, rounded_units, rounded_value FROM decimal_result ORDER BY group_id" + ).fetchall() + + +@pytest.mark.parametrize( + ("values", "units"), + [ + ([11, 12], 12), + ([-11, -12], -12), + ([11, -12], -1), + ([10, 12], 11), + ([None, 12], 12), + ], +) +def test_midpoints_nulls_and_signs(values, units): + assert execute([(1, v) for v in values]) == [ + (1, len([v for v in values if v is not None]), 0, "ok", units, units / 10) + ] + + +def test_invalid_input_and_overflow_never_partially_aggregate(): + result = execute( + [ + (1, None), + (2, "12"), + (2, 10), + (3, 2**63 - 1), + (4, -(2**63)), + (5, 2**52), + (5, 2**52), + (6, 12.5), + (7, 10), + ] + ) + assert [r[3] for r in result] == [ + "empty", + "invalid_input", + "overflow", + "overflow", + "overflow", + "invalid_input", + "ok", + ] + assert all(r[4:] == (None, None) for r in result[:-1]) + assert result[-1][4:] == (10, 1.0) + + +@pytest.mark.parametrize("aggregate", ["avg", "sum"]) +@pytest.mark.parametrize( + ("input_scale", "output_scale"), [(0, 0), (0, 6), (1, 2), (2, 0), (6, 6)] +) +def test_seeded_grouped_values_against_decimal(aggregate, input_scale, output_scale): + rng = random.Random(51) + rows = [] + expectations = {} + for group in range(100): + vals = [rng.randrange(-100000, 100000) for _ in range(rng.randrange(1, 30))] + rows.extend((group, v) for v in vals) + value = Decimal(sum(vals)) / 10**input_scale + if aggregate == "avg": + value /= len(vals) + rounded = value.quantize( + Decimal(1).scaleb(-output_scale), rounding=ROUND_HALF_UP + ) + expectations[group] = int(rounded * 10**output_scale) + result = execute(rows, input_scale, output_scale, aggregate) + assert all(r[3] == "ok" and r[4] == expectations[r[0]] for r in result) + + +@pytest.mark.parametrize( + "args", [(-1, 2, "avg"), (1, 7, "avg"), (True, 2, "avg"), (1, 2, "median")] +) +def test_invalid_compiler_settings(args): + with pytest.raises(ValueError): + fixed_decimal_ctes(*args) + + +@pytest.mark.asyncio +async def test_tool_uses_compiler_without_io(): + args = { + "dialect": "sqlite", + "input_scale": 1, + "output_scale": 2, + "aggregate": "avg", + } + result = await FixedDecimalSQL().run(args, None) + assert fixed_decimal_ctes(1, 2, "avg") in result.content + with pytest.raises(ValueError): + await FixedDecimalSQL().run({**args, "dialect": "oracle"}, None) diff --git a/tests/test_integration.py b/tests/test_integration.py index 7065a204..963a4288 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -28,7 +28,8 @@ def test_v1_tools_registered(): names = {s.name for s in ctx.tools.specs()} assert names == { "calendar_interval_sql", - "run_sql", + "fixed_decimal_sql", + "run_sql", "explore_schema", "enrich_schema", "term_custom", diff --git a/tests/test_mcp.py b/tests/test_mcp.py index 54c157b5..448f25d1 100644 --- a/tests/test_mcp.py +++ b/tests/test_mcp.py @@ -72,6 +72,7 @@ async def test_stdio_schema_sql_memory_and_errors(tmp_path): assert {t.name for t in tools} == { "context_candidates", "calendar_interval_sql", + "fixed_decimal_sql", "run_sql", "explore_schema", "term_custom", @@ -463,3 +464,25 @@ async def test_calendar_compiler_through_stdio_and_sql_guard(tmp_path): assert "1 | 0 | 0" in result.content[0].text denied = await client.call_tool("run_sql", {"sql": sql}) assert denied.isError + + +@pytest.mark.asyncio +async def test_fixed_decimal_compiler_stdio_execution(tmp_path): + from lang2sql.tools.fixed_decimal_sql import fixed_decimal_ctes + + async with connected(fixture_db(tmp_path), tmp_path / "meta.db") as client: + compiled = await client.call_tool("fixed_decimal_sql", { + "dialect": "sqlite", "input_scale": 1, "output_scale": 1, "aggregate": "avg" + }) + assert not compiled.isError + ctes = fixed_decimal_ctes(1, 1, "avg") + assert ctes in compiled.content[0].text + check = await client.call_tool("resolve_business_terms", {"terms": []}) + token = json.loads(check.content[0].text)["definition_check_id"] + sql = ( + "WITH decimal_input(group_id, scaled_value) AS (VALUES ('a', 11), ('a', 12)), " + + ctes + " SELECT status, rounded_value FROM decimal_result" + ) + result = await client.call_tool("run_sql", {"sql": sql, "definition_check_id": token}) + assert not result.isError + assert "ok | 1.2" in result.content[0].text From 273ca440de124fb9695babce0641bff06ed8d7d1 Mon Sep 17 00:00:00 2001 From: seyeong Date: Fri, 27 Nov 2026 06:05:39 +0900 Subject: [PATCH 2/4] Preserve unsuccessful decimal compiler adoption attempt and rounding diagnosis --- .../fixed-decimal/analysis.json | 26 + .../fixed-decimal/rounding-diagnosis.json | 127 +++ .../fixed-decimal/rounding-diagnosis.py | 29 + .../fixed-decimal/sha256.json | 20 + .../spider-comparison/comparison.json | 701 +++++++++++++++++ .../spider-comparison/index.html | 726 ++++++++++++++++++ .../spider/codex-mcp/csv/local152.csv | 10 + .../codex-mcp/events/local152.answer.txt | 30 + .../spider/codex-mcp/events/local152.jsonl | 21 + .../codex-mcp/events/local152.prompt.txt | 6 + .../spider/codex-mcp/events/local152.stderr | 0 .../spider/codex-mcp/records/local152.json | 188 +++++ .../spider/codex-mcp/scores.json | 8 + .../spider/codex-mcp/sql/local152.sql | 28 + .../spider/codex-mcp/status.json | 4 + .../fixed-decimal/spider/log.txt | 0 .../fixed-decimal/spider/manifest.json | 387 ++++++++++ .../fixed-decimal/spider/settings.json | 26 + .../fixed-decimal/spider/summary.json | 18 + 19 files changed, 2355 insertions(+) create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/analysis.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/rounding-diagnosis.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/rounding-diagnosis.py create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/sha256.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider-comparison/comparison.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider-comparison/index.html create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/csv/local152.csv create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.answer.txt create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.jsonl create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.prompt.txt create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.stderr create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/records/local152.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/scores.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/sql/local152.sql create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/status.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/log.txt create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/manifest.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/settings.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal/spider/summary.json diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/analysis.json b/bench/accuracy/mcp-review-results/fixed-decimal/analysis.json new file mode 100644 index 00000000..44c10015 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/analysis.json @@ -0,0 +1,26 @@ +{ + "revision": "27b222f33f96aa5b01d6ffb25e5f70a603d8503a", + "model": "gpt-6.2-astra/high", + "repair_count": 0, + "selected_prior_failures": 1, + "case": "local152", + "before": 0, + "after": 0, + "called_tools": [ + "explore_schema", + "explore_schema", + "resolve_business_terms", + "explore_schema", + "explore_schema", + "run_sql", + "resolve_business_terms", + "run_sql" + ], + "metric": "One selected prior failure, not full Spider135 accuracy", + "limits": [ + "One model attempt; no repeated reliability claim", + "Original question/schema/docs unchanged; no diagnostic answers/gold provided", + "Official grader unchanged; no passing case rerun", + "CLI usage preserved; unavailable API counter placeholders changed to null only in archived summary" + ] +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/rounding-diagnosis.json b/bench/accuracy/mcp-review-results/fixed-decimal/rounding-diagnosis.json new file mode 100644 index 00000000..251cf6c1 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/rounding-diagnosis.json @@ -0,0 +1,127 @@ +{ + "status": "offline only; not a model prediction or official score", + "db_sha256": "175c1da2deb00fe28d70608f7839aea5abc214dca15bb3e8622c9b7258c25b9e", + "max_source_scale_residual": 0.0, + "query": "WITH decimal_input AS (SELECT d.name_id AS group_id, CAST(ROUND(r.avg_rating * 10) AS INTEGER) AS scaled_value FROM director_mapping d JOIN ratings r ON r.movie_id = d.movie_id), decimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n) SELECT group_id, status, rounded_value FROM decimal_result", + "rows": [ + { + "director_id": "nm1777967", + "values": [ + 5.5, + 5.7, + 6.9, + 3.7, + 5.3 + ], + "decimal_average": "5.42", + "decimal_rounded": "5.42", + "prior_sql_average": "5.42", + "compiler_sql_average": 5.42 + }, + { + "director_id": "nm2096009", + "values": [ + 3.0, + 3.2, + 2.7, + 3.2, + 3.0 + ], + "decimal_average": "3.02", + "decimal_rounded": "3.02", + "prior_sql_average": "3.02", + "compiler_sql_average": 3.02 + }, + { + "director_id": "nm0814469", + "values": [ + 6.4, + 5.4, + 6.4, + 5.9 + ], + "decimal_average": "6.025", + "decimal_rounded": "6.03", + "prior_sql_average": "6.03", + "compiler_sql_average": 6.03 + }, + { + "director_id": "nm0001752", + "values": [ + 7.0, + 6.3, + 6.4, + 6.2 + ], + "decimal_average": "6.475", + "decimal_rounded": "6.48", + "prior_sql_average": "6.47", + "compiler_sql_average": 6.48 + }, + { + "director_id": "nm0425364", + "values": [ + 4.2, + 4.9, + 6.2, + 6.5 + ], + "decimal_average": "5.45", + "decimal_rounded": "5.45", + "prior_sql_average": "5.45", + "compiler_sql_average": 5.45 + }, + { + "director_id": "nm6356309", + "values": [ + 4.9, + 3.1, + 3.8, + 3.2 + ], + "decimal_average": "3.75", + "decimal_rounded": "3.75", + "prior_sql_average": "3.75", + "compiler_sql_average": 3.75 + }, + { + "director_id": "nm0831321", + "values": [ + 4.2, + 4.5, + 4.6, + 4.0 + ], + "decimal_average": "4.325", + "decimal_rounded": "4.33", + "prior_sql_average": "4.33", + "compiler_sql_average": 4.33 + }, + { + "director_id": "nm2691863", + "values": [ + 4.6, + 3.0, + 5.8, + 4.6 + ], + "decimal_average": "4.5", + "decimal_rounded": "4.50", + "prior_sql_average": "4.5", + "compiler_sql_average": 4.5 + }, + { + "director_id": "nm0515005", + "values": [ + 5.9, + 6.7, + 6.5, + 5.8 + ], + "decimal_average": "6.225", + "decimal_rounded": "6.23", + "prior_sql_average": "6.22", + "compiler_sql_average": 6.23 + } + ] +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/rounding-diagnosis.py b/bench/accuracy/mcp-review-results/fixed-decimal/rounding-diagnosis.py new file mode 100644 index 00000000..ed265b21 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/rounding-diagnosis.py @@ -0,0 +1,29 @@ +"""Offline diagnosis of a prior failure; never passed to inference.""" +import csv +import hashlib +import json +import sqlite3 +from decimal import Decimal, ROUND_HALF_UP +from pathlib import Path + +from lang2sql.tools.fixed_decimal_sql import fixed_decimal_ctes + +root = Path('/Users/seyoung/workspace/benchmarks') +db = root / 'spider2-databases/imdb_movies.sqlite' +prior = root / 'codex-mcp-astra-spider-backlog-20261127/spider-gpt-6.2-astra' +rows = list(csv.DictReader((prior / 'codex-mcp/csv/local152.csv').open())) +with sqlite3.connect('file:' + str(db) + '?mode=ro', uri=True) as conn: + precision = conn.execute('SELECT MAX(ABS(avg_rating * 10 - ROUND(avg_rating * 10))) FROM ratings').fetchone()[0] + query = ('WITH decimal_input AS (SELECT d.name_id AS group_id, ' + 'CAST(ROUND(r.avg_rating * 10) AS INTEGER) AS scaled_value ' + 'FROM director_mapping d JOIN ratings r ON r.movie_id = d.movie_id), ' + + fixed_decimal_ctes(1, 2, 'avg') + ' SELECT group_id, status, rounded_value FROM decimal_result') + exact = {r[0]: r[1:] for r in conn.execute(query)} + diagnostic = [] + for row in rows: + values = [x[0] for x in conn.execute('SELECT r.avg_rating FROM director_mapping d JOIN ratings r ON r.movie_id = d.movie_id WHERE d.name_id = ?', (row['director_id'],)) if x[0] is not None] + dec = sum(Decimal(str(v)) for v in values) / len(values) + rounded = dec.quantize(Decimal('.01'), rounding=ROUND_HALF_UP) + assert exact[row['director_id']] == ('ok', float(rounded)) + diagnostic.append({'director_id': row['director_id'], 'values': values, 'decimal_average': str(dec), 'decimal_rounded': str(rounded), 'prior_sql_average': row['avg_rating'], 'compiler_sql_average': exact[row['director_id']][1]}) +print(json.dumps({'status':'offline only; not a model prediction or official score', 'db_sha256':hashlib.sha256(db.read_bytes()).hexdigest(), 'max_source_scale_residual': precision, 'query':query, 'rows':diagnostic}, indent=2)) diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/sha256.json b/bench/accuracy/mcp-review-results/fixed-decimal/sha256.json new file mode 100644 index 00000000..4378d9c8 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/sha256.json @@ -0,0 +1,20 @@ +{ + "analysis.json": "44da4092ac28de19bba4e03043b729753c9e3582baccc94f5425399814d4e162", + "rounding-diagnosis.json": "419039dd6c244e701b0f705d31007dd799179970ba7563fe25599244b43ce9c3", + "rounding-diagnosis.py": "06b87b27f824e60a160082b66593fb5dfd6d7ca3afe39357a6194e12287e0d8b", + "spider/codex-mcp/csv/local152.csv": "3a2b001d0cd045bbf1279636b88ab754bedc90b8ac2850a2109e8f71aec2dda6", + "spider/codex-mcp/events/local152.answer.txt": "33eac23ac2a2770860c04ee7d4ae130acd0341f5bb845a153d4498b9170e72fd", + "spider/codex-mcp/events/local152.jsonl": "8b34206cd4ad46bdd59e1ae4a251527d408d15e0de841062918fa1e32fa0f7c6", + "spider/codex-mcp/events/local152.prompt.txt": "ed45cf60901dfe9a2f665510bb2ea3e98f53949a456668d6257a1eaeff99fa83", + "spider/codex-mcp/events/local152.stderr": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "spider/codex-mcp/records/local152.json": "33b86b77f3e059922c3c0408aa9ac3d97b200cb06e380baaa283cbe89e113024", + "spider/codex-mcp/scores.json": "f84c74b5d15781a7c5a1196dd5fc3bff215377a489eca510b7b93cfb581972f6", + "spider/codex-mcp/sql/local152.sql": "d2e53083acdc00112604eb85706798f537482f24971866b63207fda13c396153", + "spider/codex-mcp/status.json": "a6b1b20b2c64fd2b409182ff2e416aba70d813b966b94392262a84347236de27", + "spider/log.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "spider/manifest.json": "023c35cd0d8818fdf1ac33190addbcc2f3b1879385ac2144a98867a1870d97e0", + "spider/settings.json": "09b2410b120f993872429b2c388cee69e51103aaebe499e4f92a0925f7ec030e", + "spider/summary.json": "39ca5a62af070d444814651eaed9d6b9e27c4153c90bfb6d37fd744f6b17132c", + "spider-comparison/comparison.json": "640a9fd93f1adeba5a4d33dc16d0148b9eab9f9f19474ced0f806dfe6f4540e8", + "spider-comparison/index.html": "296dfec3683b96df1ea32302a135bae0604d1f6a409f10e48d58313c9acb20d3" +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider-comparison/comparison.json b/bench/accuracy/mcp-review-results/fixed-decimal/spider-comparison/comparison.json new file mode 100644 index 00000000..a14745b1 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider-comparison/comparison.json @@ -0,0 +1,701 @@ +{ + "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-fixed-decimal-20261127/spider-gpt-6.2-astra", + "manifest_sha256": "023c35cd0d8818fdf1ac33190addbcc2f3b1879385ac2144a98867a1870d97e0", + "scores_sha256": "f84c74b5d15781a7c5a1196dd5fc3bff215377a489eca510b7b93cfb581972f6", + "settings": { + "profiles": [ + { + "name": "codex-mcp", + "model": "gpt-6.2-astra", + "reasoning_effort": "high" + } + ], + "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP", + "revision": "27b222f33f96aa5b01d6ffb25e5f70a603d8503a", + "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": 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": "local152", + "db": "imdb_movies", + "question": "Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order.", + "external_knowledge": null, + "document_sha256": null + }, + "transition": "0 -> 0", + "sql_diff": "--- before.sql\n+++ after.sql\n@@ -1,14 +1,14 @@\n WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n- m.id AS movie_id,\n+ d.movie_id,\n m.duration,\n- julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n+ JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n- ORDER BY m.date_published, m.id\n+ ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n- FROM director_mapping AS d\n- JOIN movies AS m ON m.id = d.movie_id\n+ FROM main.director_mapping AS d\n+ JOIN main.movies AS m ON m.id = d.movie_id\n )\n SELECT\n dm.director_id,\n@@ -21,8 +21,8 @@\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\n FROM director_movies AS dm\n-JOIN names AS n ON n.id = dm.director_id\n-LEFT JOIN ratings AS r ON r.movie_id = dm.movie_id\n+JOIN main.names AS n ON n.id = dm.director_id\n+LEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\n GROUP BY dm.director_id, n.name\n ORDER BY movie_count DESC, total_movie_duration DESC\n LIMIT 9", + "before": { + "score": 0, + "record_sha256": "5080f96c24ba26161cc8f48be4f9a40decaa5f8016f4c94cd7744b9378c8e28b", + "record": { + "instance_id": "local152", + "profile": "codex-mcp", + "model": "gpt-6.2-astra", + "status": "predicted", + "calls": [], + "prompt_sha256": "ed45cf60901dfe9a2f665510bb2ea3e98f53949a456668d6257a1eaeff99fa83", + "events_sha256": "5f34b4b3fa8884082c5f4c89d5a6d6e0816cc31882bf33118276326fd5905983", + "cli_exit_code": 0, + "cli_usage": [ + { + "input_tokens": 137249, + "cached_input_tokens": 126464, + "cache_write_input_tokens": 0, + "output_tokens": 1070, + "reasoning_output_tokens": 111 + } + ], + "mcp_calls": [ + { + "id": "item_1", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "director_mapping" + }, + "result": { + "content": [ + { + "type": "text", + "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: 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\": \"_MDVz3WF1WrDatfFZEmG12B8lcx-Pgk38CkcFcWtge8\", \"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": "names" + }, + "result": { + "content": [ + { + "type": "text", + "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_4", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "ratings" + }, + "result": { + "content": [ + { + "type": "text", + "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_5", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "movies" + }, + "result": { + "content": [ + { + "type": "text", + "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_6", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "_MDVz3WF1WrDatfFZEmG12B8lcx-Pgk38CkcFcWtge8", + "sql": "SELECT\n (SELECT COUNT(*) FROM director_mapping) AS credit_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM director_mapping)) AS distinct_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS usable_dates,\n MIN(m.date_published) AS earliest_date,\n MAX(m.date_published) AS latest_date\nFROM director_mapping AS d\nLEFT JOIN movies AS m ON m.id = d.movie_id\nLEFT JOIN names AS n ON n.id = d.name_id\nLEFT JOIN ratings AS r ON r.movie_id = m.id" + }, + "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): credit_rows=int; distinct_credits=int; joined_rows=int; matched_movies=int; matched_names=int; matched_ratings=int; usable_dates=int; earliest_date=str; latest_date=str\ncredit_rows | distinct_credits | joined_rows | matched_movies | matched_names | matched_ratings | usable_dates | earliest_date | latest_date\n--- | --- | --- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 2017-01-01 00:00:00 | 2019-12-27 00:00:00\nSQL: SELECT\n (SELECT COUNT(*) FROM director_mapping) AS credit_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM director_mapping)) AS distinct_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS usable_dates,\n MIN(m.date_published) AS earliest_date,\n MAX(m.date_published) AS latest_date\nFROM director_mapping AS d\nLEFT JOIN movies AS m ON m.id = d.movie_id\nLEFT JOIN names AS n ON n.id = d.name_id\nLEFT JOIN ratings AS r ON r.movie_id = m.id\nLIMIT 1000" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_7", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"uwsoDSg3AbyXSB8fTe9R-CKE9xVs7ctQbtooP6P1prY\", \"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_8", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "uwsoDSg3AbyXSB8fTe9R-CKE9xVs7ctQbtooP6P1prY", + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.id AS movie_id,\n m.duration,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM director_mapping AS d\n JOIN movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN names AS n ON n.id = dm.director_id\nLEFT JOIN ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9" + }, + "result": { + "content": [ + { + "type": "text", + "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.47 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.22 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.id AS movie_id,\n m.duration,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM director_mapping AS d\n JOIN movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN names AS n ON n.id = dm.director_id\nLEFT JOIN ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + } + ], + "answer": "```sql\nWITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.id AS movie_id,\n m.duration,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM director_mapping AS d\n JOIN movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN names AS n ON n.id = dm.director_id\nLEFT JOIN ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9\n```", + "event_parse_errors": [], + "rows": 9, + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.id AS movie_id,\n m.duration,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM director_mapping AS d\n JOIN movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN names AS n ON n.id = dm.director_id\nLEFT JOIN ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9", + "seconds": 38.499129875097424 + }, + "result": { + "columns": [ + "director_id", + "director_name", + "movie_count", + "avg_inter_movie_days", + "avg_rating", + "total_votes", + "min_rating", + "max_rating", + "total_movie_duration" + ], + "row_count": 9, + "preview": [ + [ + "nm1777967", + "A.L. Vijay", + "5", + "177", + "5.42", + "1754", + "3.7", + "6.9", + "613" + ], + [ + "nm2096009", + "Andrew Jones", + "5", + "191", + "3.02", + "1989", + "2.7", + "3.2", + "432" + ], + [ + "nm0814469", + "Sion Sono", + "4", + "331", + "6.03", + "2972", + "5.4", + "6.4", + "502" + ], + [ + "nm0001752", + "Steven Soderbergh", + "4", + "254", + "6.47", + "171684", + "6.2", + "7.0", + "401" + ], + [ + "nm0425364", + "Jesse V. Johnson", + "4", + "299", + "5.45", + "14778", + "4.2", + "6.5", + "383" + ], + [ + "nm6356309", + "Özgür Bakar", + "4", + "112", + "3.75", + "1092", + "3.1", + "4.9", + "374" + ], + [ + "nm0831321", + "Chris Stokes", + "4", + "198", + "4.33", + "3664", + "4.0", + "4.6", + "352" + ], + [ + "nm2691863", + "Justin Price", + "4", + "315", + "4.5", + "5343", + "3.0", + "5.8", + "346" + ], + [ + "nm0515005", + "Sam Liu", + "4", + "260", + "6.22", + "28557", + "5.8", + "6.7", + "312" + ] + ], + "preview_truncated": false, + "csv_sha256": "3a2b001d0cd045bbf1279636b88ab754bedc90b8ac2850a2109e8f71aec2dda6" + } + }, + "after": { + "score": 0, + "record_sha256": "33b86b77f3e059922c3c0408aa9ac3d97b200cb06e380baaa283cbe89e113024", + "record": { + "instance_id": "local152", + "profile": "codex-mcp", + "model": "gpt-6.2-astra", + "status": "predicted", + "calls": [], + "prompt_sha256": "ed45cf60901dfe9a2f665510bb2ea3e98f53949a456668d6257a1eaeff99fa83", + "events_sha256": "8b34206cd4ad46bdd59e1ae4a251527d408d15e0de841062918fa1e32fa0f7c6", + "cli_exit_code": 0, + "cli_usage": [ + { + "input_tokens": 169536, + "cached_input_tokens": 153344, + "cache_write_input_tokens": 0, + "output_tokens": 1079, + "reasoning_output_tokens": 76 + } + ], + "mcp_calls": [ + { + "id": "item_1", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "director_mapping" + }, + "result": { + "content": [ + { + "type": "text", + "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_2", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "ratings" + }, + "result": { + "content": [ + { + "type": "text", + "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_3", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo\", \"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_4", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "movies" + }, + "result": { + "content": [ + { + "type": "text", + "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_5", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "names" + }, + "result": { + "content": [ + { + "type": "text", + "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_6", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo", + "sql": "SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id" + }, + "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): mapping_rows=int; unique_credits=int; joined_rows=int; matched_movies=int; matched_names=int; matched_ratings=int; valid_dates=int\nmapping_rows | unique_credits | joined_rows | matched_movies | matched_names | matched_ratings | valid_dates\n--- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 3867\nSQL: SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id\nLIMIT 1000" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_7", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg\", \"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_8", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg", + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9" + }, + "result": { + "content": [ + { + "type": "text", + "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.47 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.22 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + } + ], + "answer": "```sql\nWITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9\n```", + "event_parse_errors": [], + "rows": 9, + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9", + "seconds": 36.88873441691976 + }, + "result": { + "columns": [ + "director_id", + "director_name", + "movie_count", + "avg_inter_movie_days", + "avg_rating", + "total_votes", + "min_rating", + "max_rating", + "total_movie_duration" + ], + "row_count": 9, + "preview": [ + [ + "nm1777967", + "A.L. Vijay", + "5", + "177", + "5.42", + "1754", + "3.7", + "6.9", + "613" + ], + [ + "nm2096009", + "Andrew Jones", + "5", + "191", + "3.02", + "1989", + "2.7", + "3.2", + "432" + ], + [ + "nm0814469", + "Sion Sono", + "4", + "331", + "6.03", + "2972", + "5.4", + "6.4", + "502" + ], + [ + "nm0001752", + "Steven Soderbergh", + "4", + "254", + "6.47", + "171684", + "6.2", + "7.0", + "401" + ], + [ + "nm0425364", + "Jesse V. Johnson", + "4", + "299", + "5.45", + "14778", + "4.2", + "6.5", + "383" + ], + [ + "nm6356309", + "Özgür Bakar", + "4", + "112", + "3.75", + "1092", + "3.1", + "4.9", + "374" + ], + [ + "nm0831321", + "Chris Stokes", + "4", + "198", + "4.33", + "3664", + "4.0", + "4.6", + "352" + ], + [ + "nm2691863", + "Justin Price", + "4", + "315", + "4.5", + "5343", + "3.0", + "5.8", + "346" + ], + [ + "nm0515005", + "Sam Liu", + "4", + "260", + "6.22", + "28557", + "5.8", + "6.7", + "312" + ] + ], + "preview_truncated": false, + "csv_sha256": "3a2b001d0cd045bbf1279636b88ab754bedc90b8ac2850a2109e8f71aec2dda6" + } + } + } + ] +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider-comparison/index.html b/bench/accuracy/mcp-review-results/fixed-decimal/spider-comparison/index.html new file mode 100644 index 00000000..a04a4672 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider-comparison/index.html @@ -0,0 +1,726 @@ +Lang2SQL trace comparison

Lang2SQL trace comparison

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
+}
Provenance and settings
[
+  {
+    "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-fixed-decimal-20261127/spider-gpt-6.2-astra",
+    "manifest_sha256": "023c35cd0d8818fdf1ac33190addbcc2f3b1879385ac2144a98867a1870d97e0",
+    "scores_sha256": "f84c74b5d15781a7c5a1196dd5fc3bff215377a489eca510b7b93cfb581972f6",
+    "settings": {
+      "profiles": [
+        {
+          "name": "codex-mcp",
+          "model": "gpt-6.2-astra",
+          "reasoning_effort": "high"
+        }
+      ],
+      "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP",
+      "revision": "27b222f33f96aa5b01d6ffb25e5f70a603d8503a",
+      "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": 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"
+    }
+  }
+]
local152: 0 -> 0
{
+  "instance_id": "local152",
+  "db": "imdb_movies",
+  "question": "Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order.",
+  "external_knowledge": null,
+  "document_sha256": null
+}

SQL diff

--- before.sql
++++ after.sql
+@@ -1,14 +1,14 @@
+ WITH director_movies AS (
+     SELECT
+         d.name_id AS director_id,
+-        m.id AS movie_id,
++        d.movie_id,
+         m.duration,
+-        julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (
++        JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (
+             PARTITION BY d.name_id
+-            ORDER BY m.date_published, m.id
++            ORDER BY m.date_published, d.movie_id
+         ) AS gap_days
+-    FROM director_mapping AS d
+-    JOIN movies AS m ON m.id = d.movie_id
++    FROM main.director_mapping AS d
++    JOIN main.movies AS m ON m.id = d.movie_id
+ )
+ SELECT
+     dm.director_id,
+@@ -21,8 +21,8 @@
+     MAX(r.avg_rating) AS max_rating,
+     SUM(dm.duration) AS total_movie_duration
+ FROM director_movies AS dm
+-JOIN names AS n ON n.id = dm.director_id
+-LEFT JOIN ratings AS r ON r.movie_id = dm.movie_id
++JOIN main.names AS n ON n.id = dm.director_id
++LEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id
+ GROUP BY dm.director_id, n.name
+ ORDER BY movie_count DESC, total_movie_duration DESC
+ LIMIT 9

before: score 0

{
+  "status": "predicted",
+  "error_type": null,
+  "error_message": null,
+  "seconds": 38.499129875097424
+}

Final SQL / answer

WITH director_movies AS (
+    SELECT
+        d.name_id AS director_id,
+        m.id AS movie_id,
+        m.duration,
+        julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (
+            PARTITION BY d.name_id
+            ORDER BY m.date_published, m.id
+        ) AS gap_days
+    FROM director_mapping AS d
+    JOIN movies AS m ON m.id = d.movie_id
+)
+SELECT
+    dm.director_id,
+    n.name AS director_name,
+    COUNT(*) AS movie_count,
+    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,
+    ROUND(AVG(r.avg_rating), 2) AS avg_rating,
+    SUM(r.total_votes) AS total_votes,
+    MIN(r.avg_rating) AS min_rating,
+    MAX(r.avg_rating) AS max_rating,
+    SUM(dm.duration) AS total_movie_duration
+FROM director_movies AS dm
+JOIN names AS n ON n.id = dm.director_id
+LEFT JOIN ratings AS r ON r.movie_id = dm.movie_id
+GROUP BY dm.director_id, n.name
+ORDER BY movie_count DESC, total_movie_duration DESC
+LIMIT 9

Result preview (up to 20 rows; full row count below)

{
+  "columns": [
+    "director_id",
+    "director_name",
+    "movie_count",
+    "avg_inter_movie_days",
+    "avg_rating",
+    "total_votes",
+    "min_rating",
+    "max_rating",
+    "total_movie_duration"
+  ],
+  "row_count": 9,
+  "preview": [
+    [
+      "nm1777967",
+      "A.L. Vijay",
+      "5",
+      "177",
+      "5.42",
+      "1754",
+      "3.7",
+      "6.9",
+      "613"
+    ],
+    [
+      "nm2096009",
+      "Andrew Jones",
+      "5",
+      "191",
+      "3.02",
+      "1989",
+      "2.7",
+      "3.2",
+      "432"
+    ],
+    [
+      "nm0814469",
+      "Sion Sono",
+      "4",
+      "331",
+      "6.03",
+      "2972",
+      "5.4",
+      "6.4",
+      "502"
+    ],
+    [
+      "nm0001752",
+      "Steven Soderbergh",
+      "4",
+      "254",
+      "6.47",
+      "171684",
+      "6.2",
+      "7.0",
+      "401"
+    ],
+    [
+      "nm0425364",
+      "Jesse V. Johnson",
+      "4",
+      "299",
+      "5.45",
+      "14778",
+      "4.2",
+      "6.5",
+      "383"
+    ],
+    [
+      "nm6356309",
+      "Özgür Bakar",
+      "4",
+      "112",
+      "3.75",
+      "1092",
+      "3.1",
+      "4.9",
+      "374"
+    ],
+    [
+      "nm0831321",
+      "Chris Stokes",
+      "4",
+      "198",
+      "4.33",
+      "3664",
+      "4.0",
+      "4.6",
+      "352"
+    ],
+    [
+      "nm2691863",
+      "Justin Price",
+      "4",
+      "315",
+      "4.5",
+      "5343",
+      "3.0",
+      "5.8",
+      "346"
+    ],
+    [
+      "nm0515005",
+      "Sam Liu",
+      "4",
+      "260",
+      "6.22",
+      "28557",
+      "5.8",
+      "6.7",
+      "312"
+    ]
+  ],
+  "preview_truncated": false,
+  "csv_sha256": "3a2b001d0cd045bbf1279636b88ab754bedc90b8ac2850a2109e8f71aec2dda6"
+}
Every MCP call: arguments and results
[
+  {
+    "id": "item_1",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "director_mapping"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: 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\": \"_MDVz3WF1WrDatfFZEmG12B8lcx-Pgk38CkcFcWtge8\", \"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": "names"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_4",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "ratings"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_5",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "movies"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_6",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "run_sql",
+    "arguments": {
+      "definition_check_id": "_MDVz3WF1WrDatfFZEmG12B8lcx-Pgk38CkcFcWtge8",
+      "sql": "SELECT\n    (SELECT COUNT(*) FROM director_mapping) AS credit_rows,\n    (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM director_mapping)) AS distinct_credits,\n    COUNT(*) AS joined_rows,\n    COUNT(m.id) AS matched_movies,\n    COUNT(n.id) AS matched_names,\n    COUNT(r.movie_id) AS matched_ratings,\n    COUNT(julianday(m.date_published)) AS usable_dates,\n    MIN(m.date_published) AS earliest_date,\n    MAX(m.date_published) AS latest_date\nFROM director_mapping AS d\nLEFT JOIN movies AS m ON m.id = d.movie_id\nLEFT JOIN names AS n ON n.id = d.name_id\nLEFT JOIN ratings AS r ON r.movie_id = m.id"
+    },
+    "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): credit_rows=int; distinct_credits=int; joined_rows=int; matched_movies=int; matched_names=int; matched_ratings=int; usable_dates=int; earliest_date=str; latest_date=str\ncredit_rows | distinct_credits | joined_rows | matched_movies | matched_names | matched_ratings | usable_dates | earliest_date | latest_date\n--- | --- | --- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 2017-01-01 00:00:00 | 2019-12-27 00:00:00\nSQL: SELECT\n    (SELECT COUNT(*) FROM director_mapping) AS credit_rows,\n    (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM director_mapping)) AS distinct_credits,\n    COUNT(*) AS joined_rows,\n    COUNT(m.id) AS matched_movies,\n    COUNT(n.id) AS matched_names,\n    COUNT(r.movie_id) AS matched_ratings,\n    COUNT(julianday(m.date_published)) AS usable_dates,\n    MIN(m.date_published) AS earliest_date,\n    MAX(m.date_published) AS latest_date\nFROM director_mapping AS d\nLEFT JOIN movies AS m ON m.id = d.movie_id\nLEFT JOIN names AS n ON n.id = d.name_id\nLEFT JOIN ratings AS r ON r.movie_id = m.id\nLIMIT 1000"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_7",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "resolve_business_terms",
+    "arguments": {
+      "terms": []
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "{\"definition_check_id\": \"uwsoDSg3AbyXSB8fTe9R-CKE9xVs7ctQbtooP6P1prY\", \"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_8",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "run_sql",
+    "arguments": {
+      "definition_check_id": "uwsoDSg3AbyXSB8fTe9R-CKE9xVs7ctQbtooP6P1prY",
+      "sql": "WITH director_movies AS (\n    SELECT\n        d.name_id AS director_id,\n        m.id AS movie_id,\n        m.duration,\n        julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n            PARTITION BY d.name_id\n            ORDER BY m.date_published, m.id\n        ) AS gap_days\n    FROM director_mapping AS d\n    JOIN movies AS m ON m.id = d.movie_id\n)\nSELECT\n    dm.director_id,\n    n.name AS director_name,\n    COUNT(*) AS movie_count,\n    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n    ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n    SUM(r.total_votes) AS total_votes,\n    MIN(r.avg_rating) AS min_rating,\n    MAX(r.avg_rating) AS max_rating,\n    SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN names AS n ON n.id = dm.director_id\nLEFT JOIN ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.47 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.22 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n    SELECT\n        d.name_id AS director_id,\n        m.id AS movie_id,\n        m.duration,\n        julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n            PARTITION BY d.name_id\n            ORDER BY m.date_published, m.id\n        ) AS gap_days\n    FROM director_mapping AS d\n    JOIN movies AS m ON m.id = d.movie_id\n)\nSELECT\n    dm.director_id,\n    n.name AS director_name,\n    COUNT(*) AS movie_count,\n    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n    ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n    SUM(r.total_votes) AS total_votes,\n    MIN(r.avg_rating) AS min_rating,\n    MAX(r.avg_rating) AS max_rating,\n    SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN names AS n ON n.id = dm.director_id\nLEFT JOIN ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  }
+]

after: score 0

{
+  "status": "predicted",
+  "error_type": null,
+  "error_message": null,
+  "seconds": 36.88873441691976
+}

Final SQL / answer

WITH director_movies AS (
+    SELECT
+        d.name_id AS director_id,
+        d.movie_id,
+        m.duration,
+        JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (
+            PARTITION BY d.name_id
+            ORDER BY m.date_published, d.movie_id
+        ) AS gap_days
+    FROM main.director_mapping AS d
+    JOIN main.movies AS m ON m.id = d.movie_id
+)
+SELECT
+    dm.director_id,
+    n.name AS director_name,
+    COUNT(*) AS movie_count,
+    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,
+    ROUND(AVG(r.avg_rating), 2) AS avg_rating,
+    SUM(r.total_votes) AS total_votes,
+    MIN(r.avg_rating) AS min_rating,
+    MAX(r.avg_rating) AS max_rating,
+    SUM(dm.duration) AS total_movie_duration
+FROM director_movies AS dm
+JOIN main.names AS n ON n.id = dm.director_id
+LEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id
+GROUP BY dm.director_id, n.name
+ORDER BY movie_count DESC, total_movie_duration DESC
+LIMIT 9

Result preview (up to 20 rows; full row count below)

{
+  "columns": [
+    "director_id",
+    "director_name",
+    "movie_count",
+    "avg_inter_movie_days",
+    "avg_rating",
+    "total_votes",
+    "min_rating",
+    "max_rating",
+    "total_movie_duration"
+  ],
+  "row_count": 9,
+  "preview": [
+    [
+      "nm1777967",
+      "A.L. Vijay",
+      "5",
+      "177",
+      "5.42",
+      "1754",
+      "3.7",
+      "6.9",
+      "613"
+    ],
+    [
+      "nm2096009",
+      "Andrew Jones",
+      "5",
+      "191",
+      "3.02",
+      "1989",
+      "2.7",
+      "3.2",
+      "432"
+    ],
+    [
+      "nm0814469",
+      "Sion Sono",
+      "4",
+      "331",
+      "6.03",
+      "2972",
+      "5.4",
+      "6.4",
+      "502"
+    ],
+    [
+      "nm0001752",
+      "Steven Soderbergh",
+      "4",
+      "254",
+      "6.47",
+      "171684",
+      "6.2",
+      "7.0",
+      "401"
+    ],
+    [
+      "nm0425364",
+      "Jesse V. Johnson",
+      "4",
+      "299",
+      "5.45",
+      "14778",
+      "4.2",
+      "6.5",
+      "383"
+    ],
+    [
+      "nm6356309",
+      "Özgür Bakar",
+      "4",
+      "112",
+      "3.75",
+      "1092",
+      "3.1",
+      "4.9",
+      "374"
+    ],
+    [
+      "nm0831321",
+      "Chris Stokes",
+      "4",
+      "198",
+      "4.33",
+      "3664",
+      "4.0",
+      "4.6",
+      "352"
+    ],
+    [
+      "nm2691863",
+      "Justin Price",
+      "4",
+      "315",
+      "4.5",
+      "5343",
+      "3.0",
+      "5.8",
+      "346"
+    ],
+    [
+      "nm0515005",
+      "Sam Liu",
+      "4",
+      "260",
+      "6.22",
+      "28557",
+      "5.8",
+      "6.7",
+      "312"
+    ]
+  ],
+  "preview_truncated": false,
+  "csv_sha256": "3a2b001d0cd045bbf1279636b88ab754bedc90b8ac2850a2109e8f71aec2dda6"
+}
Every MCP call: arguments and results
[
+  {
+    "id": "item_1",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "director_mapping"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_2",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "ratings"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_3",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "resolve_business_terms",
+    "arguments": {
+      "terms": []
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "{\"definition_check_id\": \"3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo\", \"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_4",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "movies"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_5",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "names"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_6",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "run_sql",
+    "arguments": {
+      "definition_check_id": "3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo",
+      "sql": "SELECT\n    (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n    (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n    COUNT(*) AS joined_rows,\n    COUNT(m.id) AS matched_movies,\n    COUNT(n.id) AS matched_names,\n    COUNT(r.movie_id) AS matched_ratings,\n    COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id"
+    },
+    "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): mapping_rows=int; unique_credits=int; joined_rows=int; matched_movies=int; matched_names=int; matched_ratings=int; valid_dates=int\nmapping_rows | unique_credits | joined_rows | matched_movies | matched_names | matched_ratings | valid_dates\n--- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 3867\nSQL: SELECT\n    (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n    (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n    COUNT(*) AS joined_rows,\n    COUNT(m.id) AS matched_movies,\n    COUNT(n.id) AS matched_names,\n    COUNT(r.movie_id) AS matched_ratings,\n    COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id\nLIMIT 1000"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_7",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "resolve_business_terms",
+    "arguments": {
+      "terms": []
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "{\"definition_check_id\": \"mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg\", \"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_8",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "run_sql",
+    "arguments": {
+      "definition_check_id": "mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg",
+      "sql": "WITH director_movies AS (\n    SELECT\n        d.name_id AS director_id,\n        d.movie_id,\n        m.duration,\n        JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n            PARTITION BY d.name_id\n            ORDER BY m.date_published, d.movie_id\n        ) AS gap_days\n    FROM main.director_mapping AS d\n    JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n    dm.director_id,\n    n.name AS director_name,\n    COUNT(*) AS movie_count,\n    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n    ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n    SUM(r.total_votes) AS total_votes,\n    MIN(r.avg_rating) AS min_rating,\n    MAX(r.avg_rating) AS max_rating,\n    SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.47 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.22 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n    SELECT\n        d.name_id AS director_id,\n        d.movie_id,\n        m.duration,\n        JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n            PARTITION BY d.name_id\n            ORDER BY m.date_published, d.movie_id\n        ) AS gap_days\n    FROM main.director_mapping AS d\n    JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n    dm.director_id,\n    n.name AS director_name,\n    COUNT(*) AS movie_count,\n    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n    ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n    SUM(r.total_votes) AS total_votes,\n    MIN(r.avg_rating) AS min_rating,\n    MAX(r.avg_rating) AS max_rating,\n    SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  }
+]
\ No newline at end of file diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/csv/local152.csv b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/csv/local152.csv new file mode 100644 index 00000000..65b76c22 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/csv/local152.csv @@ -0,0 +1,10 @@ +director_id,director_name,movie_count,avg_inter_movie_days,avg_rating,total_votes,min_rating,max_rating,total_movie_duration +nm1777967,A.L. Vijay,5,177,5.42,1754,3.7,6.9,613 +nm2096009,Andrew Jones,5,191,3.02,1989,2.7,3.2,432 +nm0814469,Sion Sono,4,331,6.03,2972,5.4,6.4,502 +nm0001752,Steven Soderbergh,4,254,6.47,171684,6.2,7.0,401 +nm0425364,Jesse V. Johnson,4,299,5.45,14778,4.2,6.5,383 +nm6356309,Özgür Bakar,4,112,3.75,1092,3.1,4.9,374 +nm0831321,Chris Stokes,4,198,4.33,3664,4.0,4.6,352 +nm2691863,Justin Price,4,315,4.5,5343,3.0,5.8,346 +nm0515005,Sam Liu,4,260,6.22,28557,5.8,6.7,312 diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.answer.txt b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.answer.txt new file mode 100644 index 00000000..7fc5f78d --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.answer.txt @@ -0,0 +1,30 @@ +```sql +WITH director_movies AS ( + SELECT + d.name_id AS director_id, + d.movie_id, + m.duration, + JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER ( + PARTITION BY d.name_id + ORDER BY m.date_published, d.movie_id + ) AS gap_days + FROM main.director_mapping AS d + JOIN main.movies AS m ON m.id = d.movie_id +) +SELECT + dm.director_id, + n.name AS director_name, + COUNT(*) AS movie_count, + CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days, + ROUND(AVG(r.avg_rating), 2) AS avg_rating, + SUM(r.total_votes) AS total_votes, + MIN(r.avg_rating) AS min_rating, + MAX(r.avg_rating) AS max_rating, + SUM(dm.duration) AS total_movie_duration +FROM director_movies AS dm +JOIN main.names AS n ON n.id = dm.director_id +LEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id +GROUP BY dm.director_id, n.name +ORDER BY movie_count DESC, total_movie_duration DESC +LIMIT 9 +``` \ No newline at end of file diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.jsonl b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.jsonl new file mode 100644 index 00000000..73439eaa --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.jsonl @@ -0,0 +1,21 @@ +{"type":"thread.started","thread_id":"01a219ac-52b9-7242-b69c-efb7a67778b1"} +{"type":"turn.started"} +{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"I’ll check the schema and metric definitions in Lang2SQL, then run the ranking query and verify the nine returned rows."}} +{"type":"item.started","item":{"id":"item_1","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"director_mapping"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_1","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"director_mapping"},"result":{"content":[{"type":"text","text":"director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_2","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"ratings"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_2","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"ratings"},"result":{"content":[{"type":"text","text":"ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_3","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_3","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":{"content":[{"type":"text","text":"{\"definition_check_id\": \"3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo\", \"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"}} +{"type":"item.started","item":{"id":"item_4","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"movies"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_4","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"movies"},"result":{"content":[{"type":"text","text":"movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_5","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"names"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_5","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"names"},"result":{"content":[{"type":"text","text":"names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_6","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo","sql":"SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_6","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo","sql":"SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id"},"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): mapping_rows=int; unique_credits=int; joined_rows=int; matched_movies=int; matched_names=int; matched_ratings=int; valid_dates=int\nmapping_rows | unique_credits | joined_rows | matched_movies | matched_names | matched_ratings | valid_dates\n--- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 3867\nSQL: SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id\nLIMIT 1000"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_7","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_7","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":{"content":[{"type":"text","text":"{\"definition_check_id\": \"mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg\", \"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"}} +{"type":"item.started","item":{"id":"item_8","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg","sql":"WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_8","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg","sql":"WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9"},"result":{"content":[{"type":"text","text":"9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.47 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.22 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.completed","item":{"id":"item_9","type":"agent_message","text":"```sql\nWITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9\n```"}} +{"type":"turn.completed","usage":{"input_tokens":169536,"cached_input_tokens":153344,"cache_write_input_tokens":0,"output_tokens":1079,"reasoning_output_tokens":76}} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.prompt.txt b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.prompt.txt new file mode 100644 index 00000000..3376d0a7 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.prompt.txt @@ -0,0 +1,6 @@ +You must use lang2sql MCP to inspect the schema and execute your final answer query, not merely write SQL. Call resolve_business_terms before run_sql; use terms=[] only for literal diagnostics or fully specified request criteria. Inspect the returned result and return the exact successfully executed final SQL in one fenced sql block. A result table alone or SQL that you have not executed does not complete this task. Do not use shell, files, web, or other servers. Do not invent missing business definitions; if essential meaning remains unresolved, ask for clarification instead of inventing SQL or placeholders. +Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order. +Official schema metadata (examples are not exhaustive): +Official schema and example rows (examples are not exhaustive): +[{"table_name":"ERD","column_names":["table","column","Unnamed: 2","Unnamed: 3","Unnamed: 4","Unnamed: 5","Unnamed: 6","Unnamed: 7","Unnamed: 8","Unnamed: 9","Unnamed: 10","Unnamed: 11","Unnamed: 12"],"column_types":["TEXT","TEXT","REAL","REAL","REAL","REAL","TEXT","REAL","REAL","TEXT","REAL","REAL","TEXT"],"description":["","","","","","","","","","","","",""],"sample_rows":[{"table":"director_mapping","column":"name_id","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":"role_mapping","Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":"duration","Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":"director_mapping"},{"table":"movie","column":"languages","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":null,"Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":"movie","Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":null},{"table":"names","column":"known_for_movies","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":null,"Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":"name","Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":null},{"table":"genre","column":"genre","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":null,"Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":"year","Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":null},{"table":"movie","column":"worlwide_gross_income","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":null,"Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":null,"Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":null}]},{"table_name":"director_mapping","column_names":["movie_id","name_id"],"column_types":["TEXT","TEXT"],"description":["",""],"sample_rows":[{"movie_id":"tt6892250","name_id":"nm8994803"},{"movie_id":"tt8396120","name_id":"nm9412189"},{"movie_id":"tt6138688","name_id":"nm1618536"},{"movie_id":"tt7382828","name_id":"nm1671980"},{"movie_id":"tt4161376","name_id":"nm10150409"}]},{"table_name":"genre","column_names":["movie_id","genre"],"column_types":["TEXT","TEXT"],"description":["",""],"sample_rows":[{"movie_id":"tt6359956","genre":"Comedy"},{"movie_id":"tt7986672","genre":"Thriller"},{"movie_id":"tt8016666","genre":"Comedy"},{"movie_id":"tt5911032","genre":"Drama"},{"movie_id":"tt8653824","genre":"Fantasy"}]},{"table_name":"movies","column_names":["id","title","year","date_published","duration","country","worlwide_gross_income","languages","production_company"],"column_types":["TEXT","TEXT","INTEGER","TIMESTAMP","INTEGER","TEXT","TEXT","TEXT","TEXT"],"description":["","","","","","","","",""],"sample_rows":[{"id":"tt7477068","title":"Der Trafikant","year":2018,"date_published":"2018-11-01 00:00:00","duration":117,"country":"Austria, Germany","worlwide_gross_income":"$ 360996","languages":"German, Czech","production_company":"Epo-Film Produktionsgesellschaft"},{"id":"tt7222598","title":"Raju Kannada Medium","year":2018,"date_published":"2018-01-19 00:00:00","duration":159,"country":"India","worlwide_gross_income":null,"languages":"Kannada","production_company":"Suresh Arts"},{"id":"tt5885106","title":"Vengeance","year":2018,"date_published":"2018-09-28 00:00:00","duration":92,"country":"UK","worlwide_gross_income":null,"languages":"English","production_company":"Evolutionary Films"},{"id":"tt8054150","title":"O chyom govoryat muzhchiny. Prodolzhenie","year":2018,"date_published":"2018-02-22 00:00:00","duration":99,"country":"Russia","worlwide_gross_income":"$ 7035897","languages":"Russian","production_company":null},{"id":"tt5887650","title":"Living Space","year":2018,"date_published":"2018-03-10 00:00:00","duration":80,"country":"Australia","worlwide_gross_income":null,"languages":"English","production_company":"Tru Dot Films"}]},{"table_name":"names","column_names":["id","name","height","date_of_birth","known_for_movies"],"column_types":["TEXT","TEXT","REAL","TEXT","TEXT"],"description":["","","","",""],"sample_rows":[{"id":"nm0005405","name":"Seann William Scott","height":180.0,"date_of_birth":"1976-10-03","known_for_movies":null},{"id":"nm5125871","name":"DeRon Horton","height":200.0,"date_of_birth":null,"known_for_movies":"tt5826432"},{"id":"nm5587544","name":"Shane Wheeler","height":NaN,"date_of_birth":null,"known_for_movies":null},{"id":"nm6680947","name":"Nhung Trang","height":NaN,"date_of_birth":null,"known_for_movies":null},{"id":"nm7779129","name":"Nikita Dyuvbanov","height":NaN,"date_of_birth":null,"known_for_movies":"tt7025388,tt5629524,tt5242684"}]},{"table_name":"ratings","column_names":["movie_id","avg_rating","total_votes","median_rating"],"column_types":["TEXT","REAL","INTEGER","REAL"],"description":["","","",""],"sample_rows":[{"movie_id":"tt3923004","avg_rating":3.7,"total_votes":1719,"median_rating":6.0},{"movie_id":"tt6424724","avg_rating":6.7,"total_votes":128,"median_rating":7.0},{"movie_id":"tt8304386","avg_rating":4.0,"total_votes":688,"median_rating":3.0},{"movie_id":"tt6619250","avg_rating":3.1,"total_votes":137,"median_rating":4.0},{"movie_id":"tt7999950","avg_rating":7.2,"total_votes":282,"median_rating":7.0}]},{"table_name":"role_mapping","column_names":["movie_id","name_id","category"],"column_types":["TEXT","TEXT","TEXT"],"description":["","",""],"sample_rows":[{"movie_id":"tt7219324","name_id":"nm0038449","category":"actress"},{"movie_id":"tt2898904","name_id":"nm4666860","category":"actor"},{"movie_id":"tt3809960","name_id":"nm0957257","category":"actor"},{"movie_id":"tt8665794","name_id":"nm3354073","category":"actor"},{"movie_id":"tt5897636","name_id":"nm4264236","category":"actress"}]}] +Return your final answer as exactly one fenced ```sql block containing the single read-only SQLite SELECT/WITH query that answers the question. Do not include exploratory SQL in the final answer. Use the supplied documentation; no user simulator is available. \ No newline at end of file diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.stderr b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/events/local152.stderr new file mode 100644 index 00000000..e69de29b diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/records/local152.json b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/records/local152.json new file mode 100644 index 00000000..b101fd8a --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/records/local152.json @@ -0,0 +1,188 @@ +{ + "instance_id": "local152", + "profile": "codex-mcp", + "model": "gpt-6.2-astra", + "status": "predicted", + "calls": [], + "prompt_sha256": "ed45cf60901dfe9a2f665510bb2ea3e98f53949a456668d6257a1eaeff99fa83", + "events_sha256": "8b34206cd4ad46bdd59e1ae4a251527d408d15e0de841062918fa1e32fa0f7c6", + "cli_exit_code": 0, + "cli_usage": [ + { + "input_tokens": 169536, + "cached_input_tokens": 153344, + "cache_write_input_tokens": 0, + "output_tokens": 1079, + "reasoning_output_tokens": 76 + } + ], + "mcp_calls": [ + { + "id": "item_1", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "director_mapping" + }, + "result": { + "content": [ + { + "type": "text", + "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_2", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "ratings" + }, + "result": { + "content": [ + { + "type": "text", + "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_3", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo\", \"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_4", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "movies" + }, + "result": { + "content": [ + { + "type": "text", + "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_5", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "names" + }, + "result": { + "content": [ + { + "type": "text", + "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_6", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo", + "sql": "SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id" + }, + "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): mapping_rows=int; unique_credits=int; joined_rows=int; matched_movies=int; matched_names=int; matched_ratings=int; valid_dates=int\nmapping_rows | unique_credits | joined_rows | matched_movies | matched_names | matched_ratings | valid_dates\n--- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 3867\nSQL: SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id\nLIMIT 1000" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_7", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg\", \"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_8", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg", + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9" + }, + "result": { + "content": [ + { + "type": "text", + "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.47 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.22 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + } + ], + "answer": "```sql\nWITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9\n```", + "event_parse_errors": [], + "rows": 9, + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9", + "seconds": 36.88873441691976 +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/scores.json b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/scores.json new file mode 100644 index 00000000..17459366 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/scores.json @@ -0,0 +1,8 @@ +[ + { + "instance_id": "local152", + "score": 0, + "pred_sql": null, + "error_info": "Result Error" + } +] diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/sql/local152.sql b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/sql/local152.sql new file mode 100644 index 00000000..6a1b88ce --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/sql/local152.sql @@ -0,0 +1,28 @@ +WITH director_movies AS ( + SELECT + d.name_id AS director_id, + d.movie_id, + m.duration, + JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER ( + PARTITION BY d.name_id + ORDER BY m.date_published, d.movie_id + ) AS gap_days + FROM main.director_mapping AS d + JOIN main.movies AS m ON m.id = d.movie_id +) +SELECT + dm.director_id, + n.name AS director_name, + COUNT(*) AS movie_count, + CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days, + ROUND(AVG(r.avg_rating), 2) AS avg_rating, + SUM(r.total_votes) AS total_votes, + MIN(r.avg_rating) AS min_rating, + MAX(r.avg_rating) AS max_rating, + SUM(dm.duration) AS total_movie_duration +FROM director_movies AS dm +JOIN main.names AS n ON n.id = dm.director_id +LEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id +GROUP BY dm.director_id, n.name +ORDER BY movie_count DESC, total_movie_duration DESC +LIMIT 9 diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/status.json b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/status.json new file mode 100644 index 00000000..21cf0f6d --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/codex-mcp/status.json @@ -0,0 +1,4 @@ +{ + "status": "completed", + "wall_seconds": 36.88982575002592 +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/log.txt b/bench/accuracy/mcp-review-results/fixed-decimal/spider/log.txt new file mode 100644 index 00000000..e69de29b diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/manifest.json b/bench/accuracy/mcp-review-results/fixed-decimal/spider/manifest.json new file mode 100644 index 00000000..54b4b07f --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/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": "local152", + "db": "imdb_movies", + "question": "Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order.", + "external_knowledge": null, + "document_sha256": null + } + ], + "suite": "spider2", + "development_ids": [ + "local152" + ], + "holdout_ids": [], + "split_seed": 20261126 +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/settings.json b/bench/accuracy/mcp-review-results/fixed-decimal/spider/settings.json new file mode 100644 index 00000000..f7f1f7a4 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/settings.json @@ -0,0 +1,26 @@ +{ + "profiles": [ + { + "name": "codex-mcp", + "model": "gpt-6.2-astra", + "reasoning_effort": "high" + } + ], + "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP", + "revision": "27b222f33f96aa5b01d6ffb25e5f70a603d8503a", + "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": 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" +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal/spider/summary.json b/bench/accuracy/mcp-review-results/fixed-decimal/spider/summary.json new file mode 100644 index 00000000..c6467d06 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal/spider/summary.json @@ -0,0 +1,18 @@ +[ + { + "profile": "codex-mcp", + "status": "completed", + "correct": 0, + "total": 1, + "accuracy": 0.0, + "failed_predictions": 0, + "failure_types": {}, + "api_calls": null, + "seconds": 36.88873441691976, + "wall_seconds": 36.88982575002592, + "prompt_tokens": null, + "completion_tokens": null, + "usage_missing_calls": null, + "cost_usd": null + } +] From f805510a660992b1fcdc075bb08c625efd1e81fc Mon Sep 17 00:00:00 2001 From: seyeong Date: Fri, 27 Nov 2026 06:05:59 +0900 Subject: [PATCH 3/4] Route rounded fixed-decimal aggregates to verified compiler after precision checks --- .../fixed-decimal-guidance/manifest.json | 387 ++++++++++++++++++ .../fixed-decimal-guidance/protocol.json | 112 +++++ src/lang2sql/harness/system_prompt.py | 2 +- 3 files changed, 500 insertions(+), 1 deletion(-) create mode 100644 bench/accuracy/experiments/fixed-decimal-guidance/manifest.json create mode 100644 bench/accuracy/experiments/fixed-decimal-guidance/protocol.json diff --git a/bench/accuracy/experiments/fixed-decimal-guidance/manifest.json b/bench/accuracy/experiments/fixed-decimal-guidance/manifest.json new file mode 100644 index 00000000..54b4b07f --- /dev/null +++ b/bench/accuracy/experiments/fixed-decimal-guidance/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": "local152", + "db": "imdb_movies", + "question": "Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order.", + "external_knowledge": null, + "document_sha256": null + } + ], + "suite": "spider2", + "development_ids": [ + "local152" + ], + "holdout_ids": [], + "split_seed": 20261126 +} diff --git a/bench/accuracy/experiments/fixed-decimal-guidance/protocol.json b/bench/accuracy/experiments/fixed-decimal-guidance/protocol.json new file mode 100644 index 00000000..5fb7d9af --- /dev/null +++ b/bench/accuracy/experiments/fixed-decimal-guidance/protocol.json @@ -0,0 +1,112 @@ +{ + "purpose": "Evaluate compiler-use guidance after verified tool availability alone did not cause adoption", + "model": "gpt-6.2-astra", + "reasoning_effort": "high", + "selected_ids": [ + "local152" + ], + "baseline": "/Users/seyoung/workspace/benchmarks/codex-mcp-fixed-decimal-20261127/spider-gpt-6.2-astra", + "inference": "Fresh original question/schema/docs only; no diagnostic answers, reference values, previous model output or grading feedback", + "change": "Only the numeric-result guidance bullet changed since failed tool-only attempt; compiler and execution/scoring unchanged", + "metric": "Single selected failure repair, not full Spider accuracy", + "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" + } +} diff --git a/src/lang2sql/harness/system_prompt.py b/src/lang2sql/harness/system_prompt.py index 0afcca95..ecde3668 100644 --- a/src/lang2sql/harness/system_prompt.py +++ b/src/lang2sql/harness/system_prompt.py @@ -26,7 +26,7 @@ - Before constructing SQL, identify the requested output columns, row grain, population, time boundaries, and aggregation. Return only requested columns, not diagnostic identifiers or intermediate statistics. When the requested output is only a measure for qualifying entities, do not add entity names or identifiers merely for readability; selecting entities is not itself a request to project their labels. Retain identifying fields when the user asks for the entities themselves or a detailed list. - Inspect all relevant tables and join keys. Check relationship direction and join multiplicity; do not replace a declared business identifier with a database's implicit row identifier. - Do not add unstated filters, exclude zero-valued records, or fill missing values unless the question or supplied definitions require it. Check whether ties and empty groups must be retained. -- Preserve result types: a request for decimal places means numeric ROUND, not printf/text formatting. Inspect observed result value types before finalizing; round numeric results numerically; format numbers as text only when explicitly requested. Before returning, check that the executed result matches the requested output contract. +- Preserve result types: a request for decimal places means numeric rounding, not printf/text formatting. For SQLite rounded AVG/SUM of known fixed-scale decimals, when fixed_decimal_sql is available, verify source precision and use its integer-based compiler; inspect the returned statuses before answering. Do not invent missing input precision. Inspect observed result value types before finalizing; round numeric results numerically; format numbers as text only when explicitly requested. Before returning, check that the executed result matches the requested output contract. - Preserve the database's declared/default text collation unless the question or supplied definition explicitly requires a different one. Do not add COLLATE NOCASE, LOWER/UPPER sort keys, or other normalization merely to make ordering seem natural. For concatenated lists, order the aggregate inputs explicitly; sorting the final result rows does not order elements inside each string. Data verification: From 4db0754017eebcd6bb3c013fa03e8ad09a9f9218 Mon Sep 17 00:00:00 2001 From: seyeong Date: Fri, 27 Nov 2026 06:07:29 +0900 Subject: [PATCH 4/4] Record successful decimal compiler-guided MCP retry and official comparison --- .../fixed-decimal-guidance/analysis.json | 30 + .../fixed-decimal-guidance/sha256.json | 18 + .../spider-comparison/comparison.json | 788 ++++++++++++++++ .../spider-comparison/index.html | 861 ++++++++++++++++++ .../spider/codex-mcp/csv/local152.csv | 10 + .../codex-mcp/events/local152.answer.txt | 43 + .../spider/codex-mcp/events/local152.jsonl | 29 + .../codex-mcp/events/local152.prompt.txt | 6 + .../spider/codex-mcp/events/local152.stderr | 0 .../spider/codex-mcp/records/local152.json | 275 ++++++ .../spider/codex-mcp/scores.json | 8 + .../spider/codex-mcp/sql/local152.sql | 41 + .../spider/codex-mcp/status.json | 4 + .../fixed-decimal-guidance/spider/log.txt | 0 .../spider/manifest.json | 387 ++++++++ .../spider/settings.json | 26 + .../spider/summary.json | 18 + 17 files changed, 2544 insertions(+) create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/analysis.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/sha256.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider-comparison/comparison.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider-comparison/index.html create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/csv/local152.csv create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.answer.txt create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.jsonl create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.prompt.txt create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.stderr create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/records/local152.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/scores.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/sql/local152.sql create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/status.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/log.txt create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/manifest.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/settings.json create mode 100644 bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/summary.json diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/analysis.json b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/analysis.json new file mode 100644 index 00000000..0ce868f0 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/analysis.json @@ -0,0 +1,30 @@ +{ + "revision": "f805510a660992b1fcdc075bb08c625efd1e81fc", + "model": "gpt-6.2-astra/high", + "repair_count": 1, + "selected_prior_failures": 1, + "case": "local152", + "before": 0, + "after": 1, + "called_tools": [ + "explore_schema", + "explore_schema", + "explore_schema", + "explore_schema", + "resolve_business_terms", + "run_sql", + "fixed_decimal_sql", + "resolve_business_terms", + "fixed_decimal_sql", + "run_sql", + "resolve_business_terms", + "run_sql" + ], + "metric": "One selected prior failure, not full Spider135 accuracy", + "limits": [ + "One model attempt; no repeated reliability claim", + "Original question/schema/docs unchanged; no diagnostic answers/gold provided", + "Official grader unchanged; no passing case rerun", + "CLI usage preserved; unavailable API counter placeholders changed to null only in archived summary" + ] +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/sha256.json b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/sha256.json new file mode 100644 index 00000000..ca87d60f --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/sha256.json @@ -0,0 +1,18 @@ +{ + "analysis.json": "15a6006dc02e41a75ba088ed24977fa70e69a9dcb979e73202f2baab0c1c38f3", + "spider/codex-mcp/csv/local152.csv": "4ba4eba3e3d0fa27b927b414a0cf45e8403c5a214663dc0d8b088859d26bff33", + "spider/codex-mcp/events/local152.answer.txt": "7d097572a981a83a091274c078d279811c7135e5f0535bf618304906d7a4daee", + "spider/codex-mcp/events/local152.jsonl": "d7a187ade25a35b141152438e3642b7df31b1ce3e7747fa2fc242e7088e8a3a4", + "spider/codex-mcp/events/local152.prompt.txt": "ed45cf60901dfe9a2f665510bb2ea3e98f53949a456668d6257a1eaeff99fa83", + "spider/codex-mcp/events/local152.stderr": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "spider/codex-mcp/records/local152.json": "e83f476d8059f32c302e2fb81c9840b53d38b815c9e3ebf58b97ab5971d5f50c", + "spider/codex-mcp/scores.json": "0883e2eae68eb0e834cd3d925c4d6f23280398403781ef55fb3218013754bbe3", + "spider/codex-mcp/sql/local152.sql": "aebd9e495dcf3274453ce24e5d4f0ce3d4eca6411b5802cb7ca7e2f6a6eaf257", + "spider/codex-mcp/status.json": "564a4296c6044d07f3b62e2ed4f9ec689c7faac8deaffa534902585ed6e49253", + "spider/log.txt": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "spider/manifest.json": "023c35cd0d8818fdf1ac33190addbcc2f3b1879385ac2144a98867a1870d97e0", + "spider/settings.json": "dccf15299682815ed3fe3155d257ef32a9f715c924c901b1ce435da1e7e44e78", + "spider/summary.json": "7212bd81d430748742d3d7f44cbb674927afeac61554fdfc32796d7b04c46b21", + "spider-comparison/comparison.json": "7d0c1c2281dabfd43aa4d9076065f2e0d3d286955e97e1680b12c28e5b4aff35", + "spider-comparison/index.html": "8af0d3f0e169743e4117c896b3f2a8d9595ead0a86c25f6c678137fa98496837" +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider-comparison/comparison.json b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider-comparison/comparison.json new file mode 100644 index 00000000..983d5ee6 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider-comparison/comparison.json @@ -0,0 +1,788 @@ +{ + "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-fixed-decimal-20261127/spider-gpt-6.2-astra", + "manifest_sha256": "023c35cd0d8818fdf1ac33190addbcc2f3b1879385ac2144a98867a1870d97e0", + "scores_sha256": "f84c74b5d15781a7c5a1196dd5fc3bff215377a489eca510b7b93cfb581972f6", + "settings": { + "profiles": [ + { + "name": "codex-mcp", + "model": "gpt-6.2-astra", + "reasoning_effort": "high" + } + ], + "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP", + "revision": "27b222f33f96aa5b01d6ffb25e5f70a603d8503a", + "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": 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" + } + }, + { + "path": "/Users/seyoung/workspace/benchmarks/codex-mcp-fixed-decimal-guidance-20261127/spider-gpt-6.2-astra", + "manifest_sha256": "023c35cd0d8818fdf1ac33190addbcc2f3b1879385ac2144a98867a1870d97e0", + "scores_sha256": "0883e2eae68eb0e834cd3d925c4d6f23280398403781ef55fb3218013754bbe3", + "settings": { + "profiles": [ + { + "name": "codex-mcp", + "model": "gpt-6.2-astra", + "reasoning_effort": "high" + } + ], + "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP", + "revision": "f805510a660992b1fcdc075bb08c625efd1e81fc", + "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": 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 -> 1": 1 + }, + "cases": [ + { + "input": { + "instance_id": "local152", + "db": "imdb_movies", + "question": "Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order.", + "external_knowledge": null, + "document_sha256": null + }, + "transition": "0 -> 1", + "sql_diff": "--- before.sql\n+++ after.sql\n@@ -1,28 +1,41 @@\n WITH director_movies AS (\n- SELECT\n- d.name_id AS director_id,\n- d.movie_id,\n- m.duration,\n- JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n- PARTITION BY d.name_id\n- ORDER BY m.date_published, d.movie_id\n- ) AS gap_days\n- FROM main.director_mapping AS d\n- JOIN main.movies AS m ON m.id = d.movie_id\n+ SELECT\n+ d.name_id AS director_id,\n+ m.duration,\n+ r.avg_rating,\n+ r.total_votes,\n+ julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n+ PARTITION BY d.name_id ORDER BY m.date_published, m.id\n+ ) AS gap_days\n+ FROM main.director_mapping AS d\n+ JOIN main.movies AS m ON m.id = d.movie_id\n+ LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n+),\n+director_stats AS (\n+ SELECT\n+ director_id,\n+ COUNT(*) AS movie_count,\n+ CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n+ SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n+ COUNT(avg_rating) AS rated_movies,\n+ SUM(total_votes) AS total_votes,\n+ MIN(avg_rating) AS min_rating,\n+ MAX(avg_rating) AS max_rating,\n+ SUM(duration) AS total_movie_duration\n+ FROM director_movies\n+ GROUP BY director_id\n )\n SELECT\n- dm.director_id,\n- n.name AS director_name,\n- COUNT(*) AS movie_count,\n- CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n- ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n- SUM(r.total_votes) AS total_votes,\n- MIN(r.avg_rating) AS min_rating,\n- MAX(r.avg_rating) AS max_rating,\n- SUM(dm.duration) AS total_movie_duration\n-FROM director_movies AS dm\n-JOIN main.names AS n ON n.id = dm.director_id\n-LEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\n-GROUP BY dm.director_id, n.name\n-ORDER BY movie_count DESC, total_movie_duration DESC\n+ s.director_id,\n+ n.name AS director_name,\n+ s.movie_count,\n+ s.avg_inter_movie_days,\n+ ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n+ s.total_votes,\n+ s.min_rating,\n+ s.max_rating,\n+ s.total_movie_duration\n+FROM director_stats AS s\n+JOIN main.names AS n ON n.id = s.director_id\n+ORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\n LIMIT 9", + "before": { + "score": 0, + "record_sha256": "33b86b77f3e059922c3c0408aa9ac3d97b200cb06e380baaa283cbe89e113024", + "record": { + "instance_id": "local152", + "profile": "codex-mcp", + "model": "gpt-6.2-astra", + "status": "predicted", + "calls": [], + "prompt_sha256": "ed45cf60901dfe9a2f665510bb2ea3e98f53949a456668d6257a1eaeff99fa83", + "events_sha256": "8b34206cd4ad46bdd59e1ae4a251527d408d15e0de841062918fa1e32fa0f7c6", + "cli_exit_code": 0, + "cli_usage": [ + { + "input_tokens": 169536, + "cached_input_tokens": 153344, + "cache_write_input_tokens": 0, + "output_tokens": 1079, + "reasoning_output_tokens": 76 + } + ], + "mcp_calls": [ + { + "id": "item_1", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "director_mapping" + }, + "result": { + "content": [ + { + "type": "text", + "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_2", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "ratings" + }, + "result": { + "content": [ + { + "type": "text", + "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_3", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo\", \"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_4", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "movies" + }, + "result": { + "content": [ + { + "type": "text", + "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_5", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "names" + }, + "result": { + "content": [ + { + "type": "text", + "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_6", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo", + "sql": "SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id" + }, + "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): mapping_rows=int; unique_credits=int; joined_rows=int; matched_movies=int; matched_names=int; matched_ratings=int; valid_dates=int\nmapping_rows | unique_credits | joined_rows | matched_movies | matched_names | matched_ratings | valid_dates\n--- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 3867\nSQL: SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n COUNT(*) AS joined_rows,\n COUNT(m.id) AS matched_movies,\n COUNT(n.id) AS matched_names,\n COUNT(r.movie_id) AS matched_ratings,\n COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id\nLIMIT 1000" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_7", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg\", \"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_8", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg", + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9" + }, + "result": { + "content": [ + { + "type": "text", + "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.47 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.22 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + } + ], + "answer": "```sql\nWITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9\n```", + "event_parse_errors": [], + "rows": 9, + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n d.movie_id,\n m.duration,\n JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n PARTITION BY d.name_id\n ORDER BY m.date_published, d.movie_id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n dm.director_id,\n n.name AS director_name,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n SUM(r.total_votes) AS total_votes,\n MIN(r.avg_rating) AS min_rating,\n MAX(r.avg_rating) AS max_rating,\n SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9", + "seconds": 36.88873441691976 + }, + "result": { + "columns": [ + "director_id", + "director_name", + "movie_count", + "avg_inter_movie_days", + "avg_rating", + "total_votes", + "min_rating", + "max_rating", + "total_movie_duration" + ], + "row_count": 9, + "preview": [ + [ + "nm1777967", + "A.L. Vijay", + "5", + "177", + "5.42", + "1754", + "3.7", + "6.9", + "613" + ], + [ + "nm2096009", + "Andrew Jones", + "5", + "191", + "3.02", + "1989", + "2.7", + "3.2", + "432" + ], + [ + "nm0814469", + "Sion Sono", + "4", + "331", + "6.03", + "2972", + "5.4", + "6.4", + "502" + ], + [ + "nm0001752", + "Steven Soderbergh", + "4", + "254", + "6.47", + "171684", + "6.2", + "7.0", + "401" + ], + [ + "nm0425364", + "Jesse V. Johnson", + "4", + "299", + "5.45", + "14778", + "4.2", + "6.5", + "383" + ], + [ + "nm6356309", + "Özgür Bakar", + "4", + "112", + "3.75", + "1092", + "3.1", + "4.9", + "374" + ], + [ + "nm0831321", + "Chris Stokes", + "4", + "198", + "4.33", + "3664", + "4.0", + "4.6", + "352" + ], + [ + "nm2691863", + "Justin Price", + "4", + "315", + "4.5", + "5343", + "3.0", + "5.8", + "346" + ], + [ + "nm0515005", + "Sam Liu", + "4", + "260", + "6.22", + "28557", + "5.8", + "6.7", + "312" + ] + ], + "preview_truncated": false, + "csv_sha256": "3a2b001d0cd045bbf1279636b88ab754bedc90b8ac2850a2109e8f71aec2dda6" + } + }, + "after": { + "score": 1, + "record_sha256": "e83f476d8059f32c302e2fb81c9840b53d38b815c9e3ebf58b97ab5971d5f50c", + "record": { + "instance_id": "local152", + "profile": "codex-mcp", + "model": "gpt-6.2-astra", + "status": "predicted", + "calls": [], + "prompt_sha256": "ed45cf60901dfe9a2f665510bb2ea3e98f53949a456668d6257a1eaeff99fa83", + "events_sha256": "d7a187ade25a35b141152438e3642b7df31b1ce3e7747fa2fc242e7088e8a3a4", + "cli_exit_code": 0, + "cli_usage": [ + { + "input_tokens": 229772, + "cached_input_tokens": 215424, + "cache_write_input_tokens": 0, + "output_tokens": 1763, + "reasoning_output_tokens": 66 + } + ], + "mcp_calls": [ + { + "id": "item_1", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "director_mapping" + }, + "result": { + "content": [ + { + "type": "text", + "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_2", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "names" + }, + "result": { + "content": [ + { + "type": "text", + "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_3", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "movies" + }, + "result": { + "content": [ + { + "type": "text", + "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_4", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "ratings" + }, + "result": { + "content": [ + { + "type": "text", + "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL" + } + ], + "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\": \"DSbZOSUuWwEt5DLGlsqpvwFUKGjc53u6CTn9KE9boQ8\", \"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": "DSbZOSUuWwEt5DLGlsqpvwFUKGjc53u6CTn9KE9boQ8", + "sql": "SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS credits,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS distinct_credits,\n (SELECT COUNT(*) FROM main.director_mapping d JOIN main.movies m ON m.id = d.movie_id JOIN main.names n ON n.id = d.name_id JOIN main.ratings r ON r.movie_id = d.movie_id) AS joined_credits,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.movies) AS excess_movie_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.names) AS excess_name_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT movie_id) FROM main.ratings) AS excess_rating_ids,\n (SELECT COUNT(*) FROM main.movies WHERE julianday(date_published) IS NULL OR time(date_published) <> '00:00:00') AS non_midnight_or_invalid,\n (SELECT COUNT(*) FROM main.ratings WHERE avg_rating <> ROUND(avg_rating, 1)) AS beyond_tenths,\n (SELECT MIN(avg_rating) FROM main.ratings) AS min_rating,\n (SELECT MAX(avg_rating) FROM main.ratings) AS max_rating" + }, + "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): credits=int; distinct_credits=int; joined_credits=int; excess_movie_ids=int; excess_name_ids=int; excess_rating_ids=int; non_midnight_or_invalid=int; beyond_tenths=int; min_rating=float; max_rating=float\ncredits | distinct_credits | joined_credits | excess_movie_ids | excess_name_ids | excess_rating_ids | non_midnight_or_invalid | beyond_tenths | min_rating | max_rating\n--- | --- | --- | --- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 0 | 0 | 0 | 0 | 0 | 1.0 | 10.0\nSQL: SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS credits,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS distinct_credits,\n (SELECT COUNT(*) FROM main.director_mapping d JOIN main.movies m ON m.id = d.movie_id JOIN main.names n ON n.id = d.name_id JOIN main.ratings r ON r.movie_id = d.movie_id) AS joined_credits,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.movies) AS excess_movie_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.names) AS excess_name_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT movie_id) FROM main.ratings) AS excess_rating_ids,\n (SELECT COUNT(*) FROM main.movies WHERE julianday(date_published) IS NULL OR time(date_published) <> '00:00:00') AS non_midnight_or_invalid,\n (SELECT COUNT(*) FROM main.ratings WHERE avg_rating <> ROUND(avg_rating, 1)) AS beyond_tenths,\n (SELECT MIN(avg_rating) FROM main.ratings) AS min_rating,\n (SELECT MAX(avg_rating) FROM main.ratings) AS max_rating\nLIMIT 1000" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_7", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "fixed_decimal_sql", + "arguments": { + "aggregate": "avg", + "dialect": "sqlite", + "input_scale": 1, + "output_scale": 2 + }, + "result": { + "content": [ + { + "type": "text", + "text": "SQLite only. Supply WITH decimal_input AS (your SELECT exposing group_id, scaled_value), append these CTEs, then SELECT from decimal_result. Reserve decimal_* CTE names. NULL inputs are excluded like AVG/SUM.\nscaled_value MUST be an INTEGER representing value * 10^input_scale. Confirm source precision before conversion: for known fixed-scale numeric data, CAST(ROUND(value * 10^input_scale) AS INTEGER) removes representation noise. Do not choose a scale that rounds away meaningful source digits. No precision or currency conversion is inferred by this tool.\nInspect status and invalid_count: noninteger non-NULL input makes the entire group invalid_input; unsafe magnitude makes it overflow; all NULL makes it empty. Those groups retain their row with NULL results. No partial aggregates.\nRounding is half away from zero, performed once after aggregation using exact integer quotient/remainder. rounded_units is the exact integer at output_scale; rounded_value is its REAL representation for normal SQL display. This changes neither the source values nor the DB connection; run_sql remains required.\n\ndecimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_8", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"f2SobJ61dywxxRJloVzZYzbes7wUZWnVi6F_3Efu35I\", \"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_9", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "fixed_decimal_sql", + "arguments": { + "aggregate": "avg", + "dialect": "sqlite", + "input_scale": 1, + "output_scale": 2 + }, + "result": { + "content": [ + { + "type": "text", + "text": "SQLite only. Supply WITH decimal_input AS (your SELECT exposing group_id, scaled_value), append these CTEs, then SELECT from decimal_result. Reserve decimal_* CTE names. NULL inputs are excluded like AVG/SUM.\nscaled_value MUST be an INTEGER representing value * 10^input_scale. Confirm source precision before conversion: for known fixed-scale numeric data, CAST(ROUND(value * 10^input_scale) AS INTEGER) removes representation noise. Do not choose a scale that rounds away meaningful source digits. No precision or currency conversion is inferred by this tool.\nInspect status and invalid_count: noninteger non-NULL input makes the entire group invalid_input; unsafe magnitude makes it overflow; all NULL makes it empty. Those groups retain their row with NULL results. No partial aggregates.\nRounding is half away from zero, performed once after aggregation using exact integer quotient/remainder. rounded_units is the exact integer at output_scale; rounded_value is its REAL representation for normal SQL display. This changes neither the source values nor the DB connection; run_sql remains required.\n\ndecimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_10", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "f2SobJ61dywxxRJloVzZYzbes7wUZWnVi6F_3Efu35I", + "sql": "WITH director_movies AS (\n SELECT d.name_id AS director_id, m.duration, r.avg_rating, r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n), decimal_input AS (\n SELECT director_id AS group_id, CAST(ROUND(avg_rating * 10) AS INTEGER) AS scaled_value\n FROM director_movies\n), decimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)\nSELECT status, SUM(invalid_count) AS invalid_inputs, COUNT(*) AS directors FROM decimal_result GROUP BY status" + }, + "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): status=str; invalid_inputs=int; directors=int\nstatus | invalid_inputs | directors\n--- | --- | ---\nok | 0 | 3603\nSQL: WITH director_movies AS (\n SELECT d.name_id AS director_id, m.duration, r.avg_rating, r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n), decimal_input AS (\n SELECT director_id AS group_id, CAST(ROUND(avg_rating * 10) AS INTEGER) AS scaled_value\n FROM director_movies\n), decimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)\nSELECT status, SUM(invalid_count) AS invalid_inputs, COUNT(*) AS directors FROM decimal_result GROUP BY status\nLIMIT 1000" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_11", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"AQeGUWxGzLhOjQxsMB3_uHSoHXULf0aBgn65SdRVyyQ\", \"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_12", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "AQeGUWxGzLhOjQxsMB3_uHSoHXULf0aBgn65SdRVyyQ", + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9" + }, + "result": { + "content": [ + { + "type": "text", + "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.48 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.23 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + } + ], + "answer": "```sql\nWITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9\n```", + "event_parse_errors": [], + "rows": 9, + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9", + "seconds": 53.021380249992944 + }, + "result": { + "columns": [ + "director_id", + "director_name", + "movie_count", + "avg_inter_movie_days", + "avg_rating", + "total_votes", + "min_rating", + "max_rating", + "total_movie_duration" + ], + "row_count": 9, + "preview": [ + [ + "nm1777967", + "A.L. Vijay", + "5", + "177", + "5.42", + "1754", + "3.7", + "6.9", + "613" + ], + [ + "nm2096009", + "Andrew Jones", + "5", + "191", + "3.02", + "1989", + "2.7", + "3.2", + "432" + ], + [ + "nm0814469", + "Sion Sono", + "4", + "331", + "6.03", + "2972", + "5.4", + "6.4", + "502" + ], + [ + "nm0001752", + "Steven Soderbergh", + "4", + "254", + "6.48", + "171684", + "6.2", + "7.0", + "401" + ], + [ + "nm0425364", + "Jesse V. Johnson", + "4", + "299", + "5.45", + "14778", + "4.2", + "6.5", + "383" + ], + [ + "nm6356309", + "Özgür Bakar", + "4", + "112", + "3.75", + "1092", + "3.1", + "4.9", + "374" + ], + [ + "nm0831321", + "Chris Stokes", + "4", + "198", + "4.33", + "3664", + "4.0", + "4.6", + "352" + ], + [ + "nm2691863", + "Justin Price", + "4", + "315", + "4.5", + "5343", + "3.0", + "5.8", + "346" + ], + [ + "nm0515005", + "Sam Liu", + "4", + "260", + "6.23", + "28557", + "5.8", + "6.7", + "312" + ] + ], + "preview_truncated": false, + "csv_sha256": "4ba4eba3e3d0fa27b927b414a0cf45e8403c5a214663dc0d8b088859d26bff33" + } + } + } + ] +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider-comparison/index.html b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider-comparison/index.html new file mode 100644 index 00000000..35f2dab4 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider-comparison/index.html @@ -0,0 +1,861 @@ +Lang2SQL trace comparison

Lang2SQL trace comparison

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 -> 1": 1
+}
Provenance and settings
[
+  {
+    "path": "/Users/seyoung/workspace/benchmarks/codex-mcp-fixed-decimal-20261127/spider-gpt-6.2-astra",
+    "manifest_sha256": "023c35cd0d8818fdf1ac33190addbcc2f3b1879385ac2144a98867a1870d97e0",
+    "scores_sha256": "f84c74b5d15781a7c5a1196dd5fc3bff215377a489eca510b7b93cfb581972f6",
+    "settings": {
+      "profiles": [
+        {
+          "name": "codex-mcp",
+          "model": "gpt-6.2-astra",
+          "reasoning_effort": "high"
+        }
+      ],
+      "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP",
+      "revision": "27b222f33f96aa5b01d6ffb25e5f70a603d8503a",
+      "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": 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"
+    }
+  },
+  {
+    "path": "/Users/seyoung/workspace/benchmarks/codex-mcp-fixed-decimal-guidance-20261127/spider-gpt-6.2-astra",
+    "manifest_sha256": "023c35cd0d8818fdf1ac33190addbcc2f3b1879385ac2144a98867a1870d97e0",
+    "scores_sha256": "0883e2eae68eb0e834cd3d925c4d6f23280398403781ef55fb3218013754bbe3",
+    "settings": {
+      "profiles": [
+        {
+          "name": "codex-mcp",
+          "model": "gpt-6.2-astra",
+          "reasoning_effort": "high"
+        }
+      ],
+      "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP",
+      "revision": "f805510a660992b1fcdc075bb08c625efd1e81fc",
+      "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": 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"
+    }
+  }
+]
local152: 0 -> 1
{
+  "instance_id": "local152",
+  "db": "imdb_movies",
+  "question": "Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order.",
+  "external_knowledge": null,
+  "document_sha256": null
+}

SQL diff

--- before.sql
++++ after.sql
+@@ -1,28 +1,41 @@
+ WITH director_movies AS (
+-    SELECT
+-        d.name_id AS director_id,
+-        d.movie_id,
+-        m.duration,
+-        JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (
+-            PARTITION BY d.name_id
+-            ORDER BY m.date_published, d.movie_id
+-        ) AS gap_days
+-    FROM main.director_mapping AS d
+-    JOIN main.movies AS m ON m.id = d.movie_id
++  SELECT
++    d.name_id AS director_id,
++    m.duration,
++    r.avg_rating,
++    r.total_votes,
++    julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (
++      PARTITION BY d.name_id ORDER BY m.date_published, m.id
++    ) AS gap_days
++  FROM main.director_mapping AS d
++  JOIN main.movies AS m ON m.id = d.movie_id
++  LEFT JOIN main.ratings AS r ON r.movie_id = m.id
++),
++director_stats AS (
++  SELECT
++    director_id,
++    COUNT(*) AS movie_count,
++    CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,
++    SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,
++    COUNT(avg_rating) AS rated_movies,
++    SUM(total_votes) AS total_votes,
++    MIN(avg_rating) AS min_rating,
++    MAX(avg_rating) AS max_rating,
++    SUM(duration) AS total_movie_duration
++  FROM director_movies
++  GROUP BY director_id
+ )
+ SELECT
+-    dm.director_id,
+-    n.name AS director_name,
+-    COUNT(*) AS movie_count,
+-    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,
+-    ROUND(AVG(r.avg_rating), 2) AS avg_rating,
+-    SUM(r.total_votes) AS total_votes,
+-    MIN(r.avg_rating) AS min_rating,
+-    MAX(r.avg_rating) AS max_rating,
+-    SUM(dm.duration) AS total_movie_duration
+-FROM director_movies AS dm
+-JOIN main.names AS n ON n.id = dm.director_id
+-LEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id
+-GROUP BY dm.director_id, n.name
+-ORDER BY movie_count DESC, total_movie_duration DESC
++  s.director_id,
++  n.name AS director_name,
++  s.movie_count,
++  s.avg_inter_movie_days,
++  ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,
++  s.total_votes,
++  s.min_rating,
++  s.max_rating,
++  s.total_movie_duration
++FROM director_stats AS s
++JOIN main.names AS n ON n.id = s.director_id
++ORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id
+ LIMIT 9

before: score 0

{
+  "status": "predicted",
+  "error_type": null,
+  "error_message": null,
+  "seconds": 36.88873441691976
+}

Final SQL / answer

WITH director_movies AS (
+    SELECT
+        d.name_id AS director_id,
+        d.movie_id,
+        m.duration,
+        JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (
+            PARTITION BY d.name_id
+            ORDER BY m.date_published, d.movie_id
+        ) AS gap_days
+    FROM main.director_mapping AS d
+    JOIN main.movies AS m ON m.id = d.movie_id
+)
+SELECT
+    dm.director_id,
+    n.name AS director_name,
+    COUNT(*) AS movie_count,
+    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,
+    ROUND(AVG(r.avg_rating), 2) AS avg_rating,
+    SUM(r.total_votes) AS total_votes,
+    MIN(r.avg_rating) AS min_rating,
+    MAX(r.avg_rating) AS max_rating,
+    SUM(dm.duration) AS total_movie_duration
+FROM director_movies AS dm
+JOIN main.names AS n ON n.id = dm.director_id
+LEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id
+GROUP BY dm.director_id, n.name
+ORDER BY movie_count DESC, total_movie_duration DESC
+LIMIT 9

Result preview (up to 20 rows; full row count below)

{
+  "columns": [
+    "director_id",
+    "director_name",
+    "movie_count",
+    "avg_inter_movie_days",
+    "avg_rating",
+    "total_votes",
+    "min_rating",
+    "max_rating",
+    "total_movie_duration"
+  ],
+  "row_count": 9,
+  "preview": [
+    [
+      "nm1777967",
+      "A.L. Vijay",
+      "5",
+      "177",
+      "5.42",
+      "1754",
+      "3.7",
+      "6.9",
+      "613"
+    ],
+    [
+      "nm2096009",
+      "Andrew Jones",
+      "5",
+      "191",
+      "3.02",
+      "1989",
+      "2.7",
+      "3.2",
+      "432"
+    ],
+    [
+      "nm0814469",
+      "Sion Sono",
+      "4",
+      "331",
+      "6.03",
+      "2972",
+      "5.4",
+      "6.4",
+      "502"
+    ],
+    [
+      "nm0001752",
+      "Steven Soderbergh",
+      "4",
+      "254",
+      "6.47",
+      "171684",
+      "6.2",
+      "7.0",
+      "401"
+    ],
+    [
+      "nm0425364",
+      "Jesse V. Johnson",
+      "4",
+      "299",
+      "5.45",
+      "14778",
+      "4.2",
+      "6.5",
+      "383"
+    ],
+    [
+      "nm6356309",
+      "Özgür Bakar",
+      "4",
+      "112",
+      "3.75",
+      "1092",
+      "3.1",
+      "4.9",
+      "374"
+    ],
+    [
+      "nm0831321",
+      "Chris Stokes",
+      "4",
+      "198",
+      "4.33",
+      "3664",
+      "4.0",
+      "4.6",
+      "352"
+    ],
+    [
+      "nm2691863",
+      "Justin Price",
+      "4",
+      "315",
+      "4.5",
+      "5343",
+      "3.0",
+      "5.8",
+      "346"
+    ],
+    [
+      "nm0515005",
+      "Sam Liu",
+      "4",
+      "260",
+      "6.22",
+      "28557",
+      "5.8",
+      "6.7",
+      "312"
+    ]
+  ],
+  "preview_truncated": false,
+  "csv_sha256": "3a2b001d0cd045bbf1279636b88ab754bedc90b8ac2850a2109e8f71aec2dda6"
+}
Every MCP call: arguments and results
[
+  {
+    "id": "item_1",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "director_mapping"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_2",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "ratings"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_3",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "resolve_business_terms",
+    "arguments": {
+      "terms": []
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "{\"definition_check_id\": \"3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo\", \"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_4",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "movies"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_5",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "names"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_6",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "run_sql",
+    "arguments": {
+      "definition_check_id": "3lhGxsaR8tJkOF3pvRachgVUWylm2r2k8Cj3ttMMzBo",
+      "sql": "SELECT\n    (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n    (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n    COUNT(*) AS joined_rows,\n    COUNT(m.id) AS matched_movies,\n    COUNT(n.id) AS matched_names,\n    COUNT(r.movie_id) AS matched_ratings,\n    COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id"
+    },
+    "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): mapping_rows=int; unique_credits=int; joined_rows=int; matched_movies=int; matched_names=int; matched_ratings=int; valid_dates=int\nmapping_rows | unique_credits | joined_rows | matched_movies | matched_names | matched_ratings | valid_dates\n--- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 3867 | 3867 | 3867 | 3867\nSQL: SELECT\n    (SELECT COUNT(*) FROM main.director_mapping) AS mapping_rows,\n    (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS unique_credits,\n    COUNT(*) AS joined_rows,\n    COUNT(m.id) AS matched_movies,\n    COUNT(n.id) AS matched_names,\n    COUNT(r.movie_id) AS matched_ratings,\n    COUNT(julianday(m.date_published)) AS valid_dates\nFROM main.director_mapping AS d\nLEFT JOIN main.movies AS m ON m.id = d.movie_id\nLEFT JOIN main.names AS n ON n.id = d.name_id\nLEFT JOIN main.ratings AS r ON r.movie_id = d.movie_id\nLIMIT 1000"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_7",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "resolve_business_terms",
+    "arguments": {
+      "terms": []
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "{\"definition_check_id\": \"mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg\", \"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_8",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "run_sql",
+    "arguments": {
+      "definition_check_id": "mhEDzmISuYGD1L6Y59fMhjCoXvw29Z_2HeBUauhWUtg",
+      "sql": "WITH director_movies AS (\n    SELECT\n        d.name_id AS director_id,\n        d.movie_id,\n        m.duration,\n        JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n            PARTITION BY d.name_id\n            ORDER BY m.date_published, d.movie_id\n        ) AS gap_days\n    FROM main.director_mapping AS d\n    JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n    dm.director_id,\n    n.name AS director_name,\n    COUNT(*) AS movie_count,\n    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n    ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n    SUM(r.total_votes) AS total_votes,\n    MIN(r.avg_rating) AS min_rating,\n    MAX(r.avg_rating) AS max_rating,\n    SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.47 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.22 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n    SELECT\n        d.name_id AS director_id,\n        d.movie_id,\n        m.duration,\n        JULIANDAY(m.date_published) - LAG(JULIANDAY(m.date_published)) OVER (\n            PARTITION BY d.name_id\n            ORDER BY m.date_published, d.movie_id\n        ) AS gap_days\n    FROM main.director_mapping AS d\n    JOIN main.movies AS m ON m.id = d.movie_id\n)\nSELECT\n    dm.director_id,\n    n.name AS director_name,\n    COUNT(*) AS movie_count,\n    CAST(ROUND(AVG(dm.gap_days)) AS INTEGER) AS avg_inter_movie_days,\n    ROUND(AVG(r.avg_rating), 2) AS avg_rating,\n    SUM(r.total_votes) AS total_votes,\n    MIN(r.avg_rating) AS min_rating,\n    MAX(r.avg_rating) AS max_rating,\n    SUM(dm.duration) AS total_movie_duration\nFROM director_movies AS dm\nJOIN main.names AS n ON n.id = dm.director_id\nLEFT JOIN main.ratings AS r ON r.movie_id = dm.movie_id\nGROUP BY dm.director_id, n.name\nORDER BY movie_count DESC, total_movie_duration DESC\nLIMIT 9"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  }
+]

after: score 1

{
+  "status": "predicted",
+  "error_type": null,
+  "error_message": null,
+  "seconds": 53.021380249992944
+}

Final SQL / answer

WITH director_movies AS (
+  SELECT
+    d.name_id AS director_id,
+    m.duration,
+    r.avg_rating,
+    r.total_votes,
+    julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (
+      PARTITION BY d.name_id ORDER BY m.date_published, m.id
+    ) AS gap_days
+  FROM main.director_mapping AS d
+  JOIN main.movies AS m ON m.id = d.movie_id
+  LEFT JOIN main.ratings AS r ON r.movie_id = m.id
+),
+director_stats AS (
+  SELECT
+    director_id,
+    COUNT(*) AS movie_count,
+    CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,
+    SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,
+    COUNT(avg_rating) AS rated_movies,
+    SUM(total_votes) AS total_votes,
+    MIN(avg_rating) AS min_rating,
+    MAX(avg_rating) AS max_rating,
+    SUM(duration) AS total_movie_duration
+  FROM director_movies
+  GROUP BY director_id
+)
+SELECT
+  s.director_id,
+  n.name AS director_name,
+  s.movie_count,
+  s.avg_inter_movie_days,
+  ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,
+  s.total_votes,
+  s.min_rating,
+  s.max_rating,
+  s.total_movie_duration
+FROM director_stats AS s
+JOIN main.names AS n ON n.id = s.director_id
+ORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id
+LIMIT 9

Result preview (up to 20 rows; full row count below)

{
+  "columns": [
+    "director_id",
+    "director_name",
+    "movie_count",
+    "avg_inter_movie_days",
+    "avg_rating",
+    "total_votes",
+    "min_rating",
+    "max_rating",
+    "total_movie_duration"
+  ],
+  "row_count": 9,
+  "preview": [
+    [
+      "nm1777967",
+      "A.L. Vijay",
+      "5",
+      "177",
+      "5.42",
+      "1754",
+      "3.7",
+      "6.9",
+      "613"
+    ],
+    [
+      "nm2096009",
+      "Andrew Jones",
+      "5",
+      "191",
+      "3.02",
+      "1989",
+      "2.7",
+      "3.2",
+      "432"
+    ],
+    [
+      "nm0814469",
+      "Sion Sono",
+      "4",
+      "331",
+      "6.03",
+      "2972",
+      "5.4",
+      "6.4",
+      "502"
+    ],
+    [
+      "nm0001752",
+      "Steven Soderbergh",
+      "4",
+      "254",
+      "6.48",
+      "171684",
+      "6.2",
+      "7.0",
+      "401"
+    ],
+    [
+      "nm0425364",
+      "Jesse V. Johnson",
+      "4",
+      "299",
+      "5.45",
+      "14778",
+      "4.2",
+      "6.5",
+      "383"
+    ],
+    [
+      "nm6356309",
+      "Özgür Bakar",
+      "4",
+      "112",
+      "3.75",
+      "1092",
+      "3.1",
+      "4.9",
+      "374"
+    ],
+    [
+      "nm0831321",
+      "Chris Stokes",
+      "4",
+      "198",
+      "4.33",
+      "3664",
+      "4.0",
+      "4.6",
+      "352"
+    ],
+    [
+      "nm2691863",
+      "Justin Price",
+      "4",
+      "315",
+      "4.5",
+      "5343",
+      "3.0",
+      "5.8",
+      "346"
+    ],
+    [
+      "nm0515005",
+      "Sam Liu",
+      "4",
+      "260",
+      "6.23",
+      "28557",
+      "5.8",
+      "6.7",
+      "312"
+    ]
+  ],
+  "preview_truncated": false,
+  "csv_sha256": "4ba4eba3e3d0fa27b927b414a0cf45e8403c5a214663dc0d8b088859d26bff33"
+}
Every MCP call: arguments and results
[
+  {
+    "id": "item_1",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "director_mapping"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_2",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "names"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_3",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "movies"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_4",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "explore_schema",
+    "arguments": {
+      "table": "ratings"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL"
+        }
+      ],
+      "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\": \"DSbZOSUuWwEt5DLGlsqpvwFUKGjc53u6CTn9KE9boQ8\", \"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": "DSbZOSUuWwEt5DLGlsqpvwFUKGjc53u6CTn9KE9boQ8",
+      "sql": "SELECT\n    (SELECT COUNT(*) FROM main.director_mapping) AS credits,\n    (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS distinct_credits,\n    (SELECT COUNT(*) FROM main.director_mapping d JOIN main.movies m ON m.id = d.movie_id JOIN main.names n ON n.id = d.name_id JOIN main.ratings r ON r.movie_id = d.movie_id) AS joined_credits,\n    (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.movies) AS excess_movie_ids,\n    (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.names) AS excess_name_ids,\n    (SELECT COUNT(*) - COUNT(DISTINCT movie_id) FROM main.ratings) AS excess_rating_ids,\n    (SELECT COUNT(*) FROM main.movies WHERE julianday(date_published) IS NULL OR time(date_published) <> '00:00:00') AS non_midnight_or_invalid,\n    (SELECT COUNT(*) FROM main.ratings WHERE avg_rating <> ROUND(avg_rating, 1)) AS beyond_tenths,\n    (SELECT MIN(avg_rating) FROM main.ratings) AS min_rating,\n    (SELECT MAX(avg_rating) FROM main.ratings) AS max_rating"
+    },
+    "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): credits=int; distinct_credits=int; joined_credits=int; excess_movie_ids=int; excess_name_ids=int; excess_rating_ids=int; non_midnight_or_invalid=int; beyond_tenths=int; min_rating=float; max_rating=float\ncredits | distinct_credits | joined_credits | excess_movie_ids | excess_name_ids | excess_rating_ids | non_midnight_or_invalid | beyond_tenths | min_rating | max_rating\n--- | --- | --- | --- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 0 | 0 | 0 | 0 | 0 | 1.0 | 10.0\nSQL: SELECT\n    (SELECT COUNT(*) FROM main.director_mapping) AS credits,\n    (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS distinct_credits,\n    (SELECT COUNT(*) FROM main.director_mapping d JOIN main.movies m ON m.id = d.movie_id JOIN main.names n ON n.id = d.name_id JOIN main.ratings r ON r.movie_id = d.movie_id) AS joined_credits,\n    (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.movies) AS excess_movie_ids,\n    (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.names) AS excess_name_ids,\n    (SELECT COUNT(*) - COUNT(DISTINCT movie_id) FROM main.ratings) AS excess_rating_ids,\n    (SELECT COUNT(*) FROM main.movies WHERE julianday(date_published) IS NULL OR time(date_published) <> '00:00:00') AS non_midnight_or_invalid,\n    (SELECT COUNT(*) FROM main.ratings WHERE avg_rating <> ROUND(avg_rating, 1)) AS beyond_tenths,\n    (SELECT MIN(avg_rating) FROM main.ratings) AS min_rating,\n    (SELECT MAX(avg_rating) FROM main.ratings) AS max_rating\nLIMIT 1000"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_7",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "fixed_decimal_sql",
+    "arguments": {
+      "aggregate": "avg",
+      "dialect": "sqlite",
+      "input_scale": 1,
+      "output_scale": 2
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "SQLite only. Supply WITH decimal_input AS (your SELECT exposing group_id, scaled_value), append these CTEs, then SELECT from decimal_result. Reserve decimal_* CTE names. NULL inputs are excluded like AVG/SUM.\nscaled_value MUST be an INTEGER representing value * 10^input_scale. Confirm source precision before conversion: for known fixed-scale numeric data, CAST(ROUND(value * 10^input_scale) AS INTEGER) removes representation noise. Do not choose a scale that rounds away meaningful source digits. No precision or currency conversion is inferred by this tool.\nInspect status and invalid_count: noninteger non-NULL input makes the entire group invalid_input; unsafe magnitude makes it overflow; all NULL makes it empty. Those groups retain their row with NULL results. No partial aggregates.\nRounding is half away from zero, performed once after aggregation using exact integer quotient/remainder. rounded_units is the exact integer at output_scale; rounded_value is its REAL representation for normal SQL display. This changes neither the source values nor the DB connection; run_sql remains required.\n\ndecimal_bounds AS (\n  SELECT group_id, scaled_value,\n    COUNT(scaled_value) OVER g AS n,\n    SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n    SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n    TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n  FROM decimal_input\n  WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n  SELECT group_id, n, invalid_count,\n    CASE WHEN invalid_count > 0 THEN 'invalid_input'\n      WHEN n = 0 THEN 'empty'\n      WHEN oversized_count > 0 OR abs_total > 90071992547409\n        OR n > 900719925474099 THEN 'overflow'\n      ELSE 'ok' END AS status,\n    SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n      AND abs_total <= 90071992547409 AND n <= 900719925474099\n      THEN scaled_value END) AS scaled_sum\n  FROM decimal_bounds\n  GROUP BY group_id\n), decimal_fraction AS (\n  SELECT group_id, n, invalid_count, status,\n    scaled_sum * 100 AS numerator, n * 10 AS denominator\n  FROM decimal_totals\n), decimal_rounded AS (\n  SELECT group_id, n, invalid_count, status,\n    CASE WHEN status = 'ok' THEN numerator / denominator\n      + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n        THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n  FROM decimal_fraction\n), decimal_result AS (\n  SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n  FROM decimal_rounded\n)"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_8",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "resolve_business_terms",
+    "arguments": {
+      "terms": []
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "{\"definition_check_id\": \"f2SobJ61dywxxRJloVzZYzbes7wUZWnVi6F_3Efu35I\", \"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_9",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "fixed_decimal_sql",
+    "arguments": {
+      "aggregate": "avg",
+      "dialect": "sqlite",
+      "input_scale": 1,
+      "output_scale": 2
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "SQLite only. Supply WITH decimal_input AS (your SELECT exposing group_id, scaled_value), append these CTEs, then SELECT from decimal_result. Reserve decimal_* CTE names. NULL inputs are excluded like AVG/SUM.\nscaled_value MUST be an INTEGER representing value * 10^input_scale. Confirm source precision before conversion: for known fixed-scale numeric data, CAST(ROUND(value * 10^input_scale) AS INTEGER) removes representation noise. Do not choose a scale that rounds away meaningful source digits. No precision or currency conversion is inferred by this tool.\nInspect status and invalid_count: noninteger non-NULL input makes the entire group invalid_input; unsafe magnitude makes it overflow; all NULL makes it empty. Those groups retain their row with NULL results. No partial aggregates.\nRounding is half away from zero, performed once after aggregation using exact integer quotient/remainder. rounded_units is the exact integer at output_scale; rounded_value is its REAL representation for normal SQL display. This changes neither the source values nor the DB connection; run_sql remains required.\n\ndecimal_bounds AS (\n  SELECT group_id, scaled_value,\n    COUNT(scaled_value) OVER g AS n,\n    SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n    SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n    TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n  FROM decimal_input\n  WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n  SELECT group_id, n, invalid_count,\n    CASE WHEN invalid_count > 0 THEN 'invalid_input'\n      WHEN n = 0 THEN 'empty'\n      WHEN oversized_count > 0 OR abs_total > 90071992547409\n        OR n > 900719925474099 THEN 'overflow'\n      ELSE 'ok' END AS status,\n    SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n      AND abs_total <= 90071992547409 AND n <= 900719925474099\n      THEN scaled_value END) AS scaled_sum\n  FROM decimal_bounds\n  GROUP BY group_id\n), decimal_fraction AS (\n  SELECT group_id, n, invalid_count, status,\n    scaled_sum * 100 AS numerator, n * 10 AS denominator\n  FROM decimal_totals\n), decimal_rounded AS (\n  SELECT group_id, n, invalid_count, status,\n    CASE WHEN status = 'ok' THEN numerator / denominator\n      + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n        THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n  FROM decimal_fraction\n), decimal_result AS (\n  SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n  FROM decimal_rounded\n)"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_10",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "run_sql",
+    "arguments": {
+      "definition_check_id": "f2SobJ61dywxxRJloVzZYzbes7wUZWnVi6F_3Efu35I",
+      "sql": "WITH director_movies AS (\n  SELECT d.name_id AS director_id, m.duration, r.avg_rating, r.total_votes,\n    julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n      PARTITION BY d.name_id ORDER BY m.date_published, m.id\n    ) AS gap_days\n  FROM main.director_mapping AS d\n  JOIN main.movies AS m ON m.id = d.movie_id\n  LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n), decimal_input AS (\n  SELECT director_id AS group_id, CAST(ROUND(avg_rating * 10) AS INTEGER) AS scaled_value\n  FROM director_movies\n), decimal_bounds AS (\n  SELECT group_id, scaled_value,\n    COUNT(scaled_value) OVER g AS n,\n    SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n    SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n    TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n  FROM decimal_input\n  WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n  SELECT group_id, n, invalid_count,\n    CASE WHEN invalid_count > 0 THEN 'invalid_input'\n      WHEN n = 0 THEN 'empty'\n      WHEN oversized_count > 0 OR abs_total > 90071992547409\n        OR n > 900719925474099 THEN 'overflow'\n      ELSE 'ok' END AS status,\n    SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n      AND abs_total <= 90071992547409 AND n <= 900719925474099\n      THEN scaled_value END) AS scaled_sum\n  FROM decimal_bounds\n  GROUP BY group_id\n), decimal_fraction AS (\n  SELECT group_id, n, invalid_count, status,\n    scaled_sum * 100 AS numerator, n * 10 AS denominator\n  FROM decimal_totals\n), decimal_rounded AS (\n  SELECT group_id, n, invalid_count, status,\n    CASE WHEN status = 'ok' THEN numerator / denominator\n      + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n        THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n  FROM decimal_fraction\n), decimal_result AS (\n  SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n  FROM decimal_rounded\n)\nSELECT status, SUM(invalid_count) AS invalid_inputs, COUNT(*) AS directors FROM decimal_result GROUP BY status"
+    },
+    "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): status=str; invalid_inputs=int; directors=int\nstatus | invalid_inputs | directors\n--- | --- | ---\nok | 0 | 3603\nSQL: WITH director_movies AS (\n  SELECT d.name_id AS director_id, m.duration, r.avg_rating, r.total_votes,\n    julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n      PARTITION BY d.name_id ORDER BY m.date_published, m.id\n    ) AS gap_days\n  FROM main.director_mapping AS d\n  JOIN main.movies AS m ON m.id = d.movie_id\n  LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n), decimal_input AS (\n  SELECT director_id AS group_id, CAST(ROUND(avg_rating * 10) AS INTEGER) AS scaled_value\n  FROM director_movies\n), decimal_bounds AS (\n  SELECT group_id, scaled_value,\n    COUNT(scaled_value) OVER g AS n,\n    SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n    SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n    TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n  FROM decimal_input\n  WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n  SELECT group_id, n, invalid_count,\n    CASE WHEN invalid_count > 0 THEN 'invalid_input'\n      WHEN n = 0 THEN 'empty'\n      WHEN oversized_count > 0 OR abs_total > 90071992547409\n        OR n > 900719925474099 THEN 'overflow'\n      ELSE 'ok' END AS status,\n    SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n      AND abs_total <= 90071992547409 AND n <= 900719925474099\n      THEN scaled_value END) AS scaled_sum\n  FROM decimal_bounds\n  GROUP BY group_id\n), decimal_fraction AS (\n  SELECT group_id, n, invalid_count, status,\n    scaled_sum * 100 AS numerator, n * 10 AS denominator\n  FROM decimal_totals\n), decimal_rounded AS (\n  SELECT group_id, n, invalid_count, status,\n    CASE WHEN status = 'ok' THEN numerator / denominator\n      + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n        THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n  FROM decimal_fraction\n), decimal_result AS (\n  SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n  FROM decimal_rounded\n)\nSELECT status, SUM(invalid_count) AS invalid_inputs, COUNT(*) AS directors FROM decimal_result GROUP BY status\nLIMIT 1000"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  },
+  {
+    "id": "item_11",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "resolve_business_terms",
+    "arguments": {
+      "terms": []
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "{\"definition_check_id\": \"AQeGUWxGzLhOjQxsMB3_uHSoHXULf0aBgn65SdRVyyQ\", \"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_12",
+    "type": "mcp_tool_call",
+    "server": "lang2sql",
+    "tool": "run_sql",
+    "arguments": {
+      "definition_check_id": "AQeGUWxGzLhOjQxsMB3_uHSoHXULf0aBgn65SdRVyyQ",
+      "sql": "WITH director_movies AS (\n  SELECT\n    d.name_id AS director_id,\n    m.duration,\n    r.avg_rating,\n    r.total_votes,\n    julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n      PARTITION BY d.name_id ORDER BY m.date_published, m.id\n    ) AS gap_days\n  FROM main.director_mapping AS d\n  JOIN main.movies AS m ON m.id = d.movie_id\n  LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n  SELECT\n    director_id,\n    COUNT(*) AS movie_count,\n    CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n    SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n    COUNT(avg_rating) AS rated_movies,\n    SUM(total_votes) AS total_votes,\n    MIN(avg_rating) AS min_rating,\n    MAX(avg_rating) AS max_rating,\n    SUM(duration) AS total_movie_duration\n  FROM director_movies\n  GROUP BY director_id\n)\nSELECT\n  s.director_id,\n  n.name AS director_name,\n  s.movie_count,\n  s.avg_inter_movie_days,\n  ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n  s.total_votes,\n  s.min_rating,\n  s.max_rating,\n  s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9"
+    },
+    "result": {
+      "content": [
+        {
+          "type": "text",
+          "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.48 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.23 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n  SELECT\n    d.name_id AS director_id,\n    m.duration,\n    r.avg_rating,\n    r.total_votes,\n    julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n      PARTITION BY d.name_id ORDER BY m.date_published, m.id\n    ) AS gap_days\n  FROM main.director_mapping AS d\n  JOIN main.movies AS m ON m.id = d.movie_id\n  LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n  SELECT\n    director_id,\n    COUNT(*) AS movie_count,\n    CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n    SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n    COUNT(avg_rating) AS rated_movies,\n    SUM(total_votes) AS total_votes,\n    MIN(avg_rating) AS min_rating,\n    MAX(avg_rating) AS max_rating,\n    SUM(duration) AS total_movie_duration\n  FROM director_movies\n  GROUP BY director_id\n)\nSELECT\n  s.director_id,\n  n.name AS director_name,\n  s.movie_count,\n  s.avg_inter_movie_days,\n  ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n  s.total_votes,\n  s.min_rating,\n  s.max_rating,\n  s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9"
+        }
+      ],
+      "structured_content": null
+    },
+    "error": null,
+    "status": "completed"
+  }
+]
\ No newline at end of file diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/csv/local152.csv b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/csv/local152.csv new file mode 100644 index 00000000..dc76987d --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/csv/local152.csv @@ -0,0 +1,10 @@ +director_id,director_name,movie_count,avg_inter_movie_days,avg_rating,total_votes,min_rating,max_rating,total_movie_duration +nm1777967,A.L. Vijay,5,177,5.42,1754,3.7,6.9,613 +nm2096009,Andrew Jones,5,191,3.02,1989,2.7,3.2,432 +nm0814469,Sion Sono,4,331,6.03,2972,5.4,6.4,502 +nm0001752,Steven Soderbergh,4,254,6.48,171684,6.2,7.0,401 +nm0425364,Jesse V. Johnson,4,299,5.45,14778,4.2,6.5,383 +nm6356309,Özgür Bakar,4,112,3.75,1092,3.1,4.9,374 +nm0831321,Chris Stokes,4,198,4.33,3664,4.0,4.6,352 +nm2691863,Justin Price,4,315,4.5,5343,3.0,5.8,346 +nm0515005,Sam Liu,4,260,6.23,28557,5.8,6.7,312 diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.answer.txt b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.answer.txt new file mode 100644 index 00000000..ecd264d1 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.answer.txt @@ -0,0 +1,43 @@ +```sql +WITH director_movies AS ( + SELECT + d.name_id AS director_id, + m.duration, + r.avg_rating, + r.total_votes, + julianday(m.date_published) - LAG(julianday(m.date_published)) OVER ( + PARTITION BY d.name_id ORDER BY m.date_published, m.id + ) AS gap_days + FROM main.director_mapping AS d + JOIN main.movies AS m ON m.id = d.movie_id + LEFT JOIN main.ratings AS r ON r.movie_id = m.id +), +director_stats AS ( + SELECT + director_id, + COUNT(*) AS movie_count, + CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days, + SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths, + COUNT(avg_rating) AS rated_movies, + SUM(total_votes) AS total_votes, + MIN(avg_rating) AS min_rating, + MAX(avg_rating) AS max_rating, + SUM(duration) AS total_movie_duration + FROM director_movies + GROUP BY director_id +) +SELECT + s.director_id, + n.name AS director_name, + s.movie_count, + s.avg_inter_movie_days, + ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating, + s.total_votes, + s.min_rating, + s.max_rating, + s.total_movie_duration +FROM director_stats AS s +JOIN main.names AS n ON n.id = s.director_id +ORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id +LIMIT 9 +``` \ No newline at end of file diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.jsonl b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.jsonl new file mode 100644 index 00000000..f08c940a --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.jsonl @@ -0,0 +1,29 @@ +{"type":"thread.started","thread_id":"01a219ae-16e4-7ab0-a5df-3ccf4dd61ab3"} +{"type":"turn.started"} +{"type":"item.completed","item":{"id":"item_0","type":"agent_message","text":"I’ll check the schema and metric definitions in Lang2SQL, then execute the ranking query and verify the nine returned rows."}} +{"type":"item.started","item":{"id":"item_1","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"director_mapping"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_1","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"director_mapping"},"result":{"content":[{"type":"text","text":"director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_2","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"names"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_2","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"names"},"result":{"content":[{"type":"text","text":"names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_3","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"movies"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_3","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"movies"},"result":{"content":[{"type":"text","text":"movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_4","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"ratings"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_4","type":"mcp_tool_call","server":"lang2sql","tool":"explore_schema","arguments":{"table":"ratings"},"result":{"content":[{"type":"text","text":"ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_5","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_5","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":{"content":[{"type":"text","text":"{\"definition_check_id\": \"DSbZOSUuWwEt5DLGlsqpvwFUKGjc53u6CTn9KE9boQ8\", \"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"}} +{"type":"item.started","item":{"id":"item_6","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"DSbZOSUuWwEt5DLGlsqpvwFUKGjc53u6CTn9KE9boQ8","sql":"SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS credits,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS distinct_credits,\n (SELECT COUNT(*) FROM main.director_mapping d JOIN main.movies m ON m.id = d.movie_id JOIN main.names n ON n.id = d.name_id JOIN main.ratings r ON r.movie_id = d.movie_id) AS joined_credits,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.movies) AS excess_movie_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.names) AS excess_name_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT movie_id) FROM main.ratings) AS excess_rating_ids,\n (SELECT COUNT(*) FROM main.movies WHERE julianday(date_published) IS NULL OR time(date_published) <> '00:00:00') AS non_midnight_or_invalid,\n (SELECT COUNT(*) FROM main.ratings WHERE avg_rating <> ROUND(avg_rating, 1)) AS beyond_tenths,\n (SELECT MIN(avg_rating) FROM main.ratings) AS min_rating,\n (SELECT MAX(avg_rating) FROM main.ratings) AS max_rating"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_6","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"DSbZOSUuWwEt5DLGlsqpvwFUKGjc53u6CTn9KE9boQ8","sql":"SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS credits,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS distinct_credits,\n (SELECT COUNT(*) FROM main.director_mapping d JOIN main.movies m ON m.id = d.movie_id JOIN main.names n ON n.id = d.name_id JOIN main.ratings r ON r.movie_id = d.movie_id) AS joined_credits,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.movies) AS excess_movie_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.names) AS excess_name_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT movie_id) FROM main.ratings) AS excess_rating_ids,\n (SELECT COUNT(*) FROM main.movies WHERE julianday(date_published) IS NULL OR time(date_published) <> '00:00:00') AS non_midnight_or_invalid,\n (SELECT COUNT(*) FROM main.ratings WHERE avg_rating <> ROUND(avg_rating, 1)) AS beyond_tenths,\n (SELECT MIN(avg_rating) FROM main.ratings) AS min_rating,\n (SELECT MAX(avg_rating) FROM main.ratings) AS max_rating"},"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): credits=int; distinct_credits=int; joined_credits=int; excess_movie_ids=int; excess_name_ids=int; excess_rating_ids=int; non_midnight_or_invalid=int; beyond_tenths=int; min_rating=float; max_rating=float\ncredits | distinct_credits | joined_credits | excess_movie_ids | excess_name_ids | excess_rating_ids | non_midnight_or_invalid | beyond_tenths | min_rating | max_rating\n--- | --- | --- | --- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 0 | 0 | 0 | 0 | 0 | 1.0 | 10.0\nSQL: SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS credits,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS distinct_credits,\n (SELECT COUNT(*) FROM main.director_mapping d JOIN main.movies m ON m.id = d.movie_id JOIN main.names n ON n.id = d.name_id JOIN main.ratings r ON r.movie_id = d.movie_id) AS joined_credits,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.movies) AS excess_movie_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.names) AS excess_name_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT movie_id) FROM main.ratings) AS excess_rating_ids,\n (SELECT COUNT(*) FROM main.movies WHERE julianday(date_published) IS NULL OR time(date_published) <> '00:00:00') AS non_midnight_or_invalid,\n (SELECT COUNT(*) FROM main.ratings WHERE avg_rating <> ROUND(avg_rating, 1)) AS beyond_tenths,\n (SELECT MIN(avg_rating) FROM main.ratings) AS min_rating,\n (SELECT MAX(avg_rating) FROM main.ratings) AS max_rating\nLIMIT 1000"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_7","type":"mcp_tool_call","server":"lang2sql","tool":"fixed_decimal_sql","arguments":{"aggregate":"avg","dialect":"sqlite","input_scale":1,"output_scale":2},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_7","type":"mcp_tool_call","server":"lang2sql","tool":"fixed_decimal_sql","arguments":{"aggregate":"avg","dialect":"sqlite","input_scale":1,"output_scale":2},"result":{"content":[{"type":"text","text":"SQLite only. Supply WITH decimal_input AS (your SELECT exposing group_id, scaled_value), append these CTEs, then SELECT from decimal_result. Reserve decimal_* CTE names. NULL inputs are excluded like AVG/SUM.\nscaled_value MUST be an INTEGER representing value * 10^input_scale. Confirm source precision before conversion: for known fixed-scale numeric data, CAST(ROUND(value * 10^input_scale) AS INTEGER) removes representation noise. Do not choose a scale that rounds away meaningful source digits. No precision or currency conversion is inferred by this tool.\nInspect status and invalid_count: noninteger non-NULL input makes the entire group invalid_input; unsafe magnitude makes it overflow; all NULL makes it empty. Those groups retain their row with NULL results. No partial aggregates.\nRounding is half away from zero, performed once after aggregation using exact integer quotient/remainder. rounded_units is the exact integer at output_scale; rounded_value is its REAL representation for normal SQL display. This changes neither the source values nor the DB connection; run_sql remains required.\n\ndecimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_8","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_8","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":{"content":[{"type":"text","text":"{\"definition_check_id\": \"f2SobJ61dywxxRJloVzZYzbes7wUZWnVi6F_3Efu35I\", \"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"}} +{"type":"item.started","item":{"id":"item_9","type":"mcp_tool_call","server":"lang2sql","tool":"fixed_decimal_sql","arguments":{"aggregate":"avg","dialect":"sqlite","input_scale":1,"output_scale":2},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_9","type":"mcp_tool_call","server":"lang2sql","tool":"fixed_decimal_sql","arguments":{"aggregate":"avg","dialect":"sqlite","input_scale":1,"output_scale":2},"result":{"content":[{"type":"text","text":"SQLite only. Supply WITH decimal_input AS (your SELECT exposing group_id, scaled_value), append these CTEs, then SELECT from decimal_result. Reserve decimal_* CTE names. NULL inputs are excluded like AVG/SUM.\nscaled_value MUST be an INTEGER representing value * 10^input_scale. Confirm source precision before conversion: for known fixed-scale numeric data, CAST(ROUND(value * 10^input_scale) AS INTEGER) removes representation noise. Do not choose a scale that rounds away meaningful source digits. No precision or currency conversion is inferred by this tool.\nInspect status and invalid_count: noninteger non-NULL input makes the entire group invalid_input; unsafe magnitude makes it overflow; all NULL makes it empty. Those groups retain their row with NULL results. No partial aggregates.\nRounding is half away from zero, performed once after aggregation using exact integer quotient/remainder. rounded_units is the exact integer at output_scale; rounded_value is its REAL representation for normal SQL display. This changes neither the source values nor the DB connection; run_sql remains required.\n\ndecimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_10","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"f2SobJ61dywxxRJloVzZYzbes7wUZWnVi6F_3Efu35I","sql":"WITH director_movies AS (\n SELECT d.name_id AS director_id, m.duration, r.avg_rating, r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n), decimal_input AS (\n SELECT director_id AS group_id, CAST(ROUND(avg_rating * 10) AS INTEGER) AS scaled_value\n FROM director_movies\n), decimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)\nSELECT status, SUM(invalid_count) AS invalid_inputs, COUNT(*) AS directors FROM decimal_result GROUP BY status"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_10","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"f2SobJ61dywxxRJloVzZYzbes7wUZWnVi6F_3Efu35I","sql":"WITH director_movies AS (\n SELECT d.name_id AS director_id, m.duration, r.avg_rating, r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n), decimal_input AS (\n SELECT director_id AS group_id, CAST(ROUND(avg_rating * 10) AS INTEGER) AS scaled_value\n FROM director_movies\n), decimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)\nSELECT status, SUM(invalid_count) AS invalid_inputs, COUNT(*) AS directors FROM decimal_result GROUP BY status"},"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): status=str; invalid_inputs=int; directors=int\nstatus | invalid_inputs | directors\n--- | --- | ---\nok | 0 | 3603\nSQL: WITH director_movies AS (\n SELECT d.name_id AS director_id, m.duration, r.avg_rating, r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n), decimal_input AS (\n SELECT director_id AS group_id, CAST(ROUND(avg_rating * 10) AS INTEGER) AS scaled_value\n FROM director_movies\n), decimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)\nSELECT status, SUM(invalid_count) AS invalid_inputs, COUNT(*) AS directors FROM decimal_result GROUP BY status\nLIMIT 1000"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.started","item":{"id":"item_11","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_11","type":"mcp_tool_call","server":"lang2sql","tool":"resolve_business_terms","arguments":{"terms":[]},"result":{"content":[{"type":"text","text":"{\"definition_check_id\": \"AQeGUWxGzLhOjQxsMB3_uHSoHXULf0aBgn65SdRVyyQ\", \"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"}} +{"type":"item.started","item":{"id":"item_12","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"AQeGUWxGzLhOjQxsMB3_uHSoHXULf0aBgn65SdRVyyQ","sql":"WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9"},"result":null,"error":null,"status":"in_progress"}} +{"type":"item.completed","item":{"id":"item_12","type":"mcp_tool_call","server":"lang2sql","tool":"run_sql","arguments":{"definition_check_id":"AQeGUWxGzLhOjQxsMB3_uHSoHXULf0aBgn65SdRVyyQ","sql":"WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9"},"result":{"content":[{"type":"text","text":"9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.48 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.23 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9"}],"structured_content":null},"error":null,"status":"completed"}} +{"type":"item.completed","item":{"id":"item_13","type":"agent_message","text":"```sql\nWITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9\n```"}} +{"type":"turn.completed","usage":{"input_tokens":229772,"cached_input_tokens":215424,"cache_write_input_tokens":0,"output_tokens":1763,"reasoning_output_tokens":66}} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.prompt.txt b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.prompt.txt new file mode 100644 index 00000000..3376d0a7 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.prompt.txt @@ -0,0 +1,6 @@ +You must use lang2sql MCP to inspect the schema and execute your final answer query, not merely write SQL. Call resolve_business_terms before run_sql; use terms=[] only for literal diagnostics or fully specified request criteria. Inspect the returned result and return the exact successfully executed final SQL in one fenced sql block. A result table alone or SQL that you have not executed does not complete this task. Do not use shell, files, web, or other servers. Do not invent missing business definitions; if essential meaning remains unresolved, ask for clarification instead of inventing SQL or placeholders. +Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order. +Official schema metadata (examples are not exhaustive): +Official schema and example rows (examples are not exhaustive): +[{"table_name":"ERD","column_names":["table","column","Unnamed: 2","Unnamed: 3","Unnamed: 4","Unnamed: 5","Unnamed: 6","Unnamed: 7","Unnamed: 8","Unnamed: 9","Unnamed: 10","Unnamed: 11","Unnamed: 12"],"column_types":["TEXT","TEXT","REAL","REAL","REAL","REAL","TEXT","REAL","REAL","TEXT","REAL","REAL","TEXT"],"description":["","","","","","","","","","","","",""],"sample_rows":[{"table":"director_mapping","column":"name_id","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":"role_mapping","Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":"duration","Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":"director_mapping"},{"table":"movie","column":"languages","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":null,"Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":"movie","Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":null},{"table":"names","column":"known_for_movies","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":null,"Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":"name","Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":null},{"table":"genre","column":"genre","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":null,"Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":"year","Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":null},{"table":"movie","column":"worlwide_gross_income","Unnamed: 2":null,"Unnamed: 3":null,"Unnamed: 4":null,"Unnamed: 5":null,"Unnamed: 6":null,"Unnamed: 7":null,"Unnamed: 8":null,"Unnamed: 9":null,"Unnamed: 10":null,"Unnamed: 11":null,"Unnamed: 12":null}]},{"table_name":"director_mapping","column_names":["movie_id","name_id"],"column_types":["TEXT","TEXT"],"description":["",""],"sample_rows":[{"movie_id":"tt6892250","name_id":"nm8994803"},{"movie_id":"tt8396120","name_id":"nm9412189"},{"movie_id":"tt6138688","name_id":"nm1618536"},{"movie_id":"tt7382828","name_id":"nm1671980"},{"movie_id":"tt4161376","name_id":"nm10150409"}]},{"table_name":"genre","column_names":["movie_id","genre"],"column_types":["TEXT","TEXT"],"description":["",""],"sample_rows":[{"movie_id":"tt6359956","genre":"Comedy"},{"movie_id":"tt7986672","genre":"Thriller"},{"movie_id":"tt8016666","genre":"Comedy"},{"movie_id":"tt5911032","genre":"Drama"},{"movie_id":"tt8653824","genre":"Fantasy"}]},{"table_name":"movies","column_names":["id","title","year","date_published","duration","country","worlwide_gross_income","languages","production_company"],"column_types":["TEXT","TEXT","INTEGER","TIMESTAMP","INTEGER","TEXT","TEXT","TEXT","TEXT"],"description":["","","","","","","","",""],"sample_rows":[{"id":"tt7477068","title":"Der Trafikant","year":2018,"date_published":"2018-11-01 00:00:00","duration":117,"country":"Austria, Germany","worlwide_gross_income":"$ 360996","languages":"German, Czech","production_company":"Epo-Film Produktionsgesellschaft"},{"id":"tt7222598","title":"Raju Kannada Medium","year":2018,"date_published":"2018-01-19 00:00:00","duration":159,"country":"India","worlwide_gross_income":null,"languages":"Kannada","production_company":"Suresh Arts"},{"id":"tt5885106","title":"Vengeance","year":2018,"date_published":"2018-09-28 00:00:00","duration":92,"country":"UK","worlwide_gross_income":null,"languages":"English","production_company":"Evolutionary Films"},{"id":"tt8054150","title":"O chyom govoryat muzhchiny. Prodolzhenie","year":2018,"date_published":"2018-02-22 00:00:00","duration":99,"country":"Russia","worlwide_gross_income":"$ 7035897","languages":"Russian","production_company":null},{"id":"tt5887650","title":"Living Space","year":2018,"date_published":"2018-03-10 00:00:00","duration":80,"country":"Australia","worlwide_gross_income":null,"languages":"English","production_company":"Tru Dot Films"}]},{"table_name":"names","column_names":["id","name","height","date_of_birth","known_for_movies"],"column_types":["TEXT","TEXT","REAL","TEXT","TEXT"],"description":["","","","",""],"sample_rows":[{"id":"nm0005405","name":"Seann William Scott","height":180.0,"date_of_birth":"1976-10-03","known_for_movies":null},{"id":"nm5125871","name":"DeRon Horton","height":200.0,"date_of_birth":null,"known_for_movies":"tt5826432"},{"id":"nm5587544","name":"Shane Wheeler","height":NaN,"date_of_birth":null,"known_for_movies":null},{"id":"nm6680947","name":"Nhung Trang","height":NaN,"date_of_birth":null,"known_for_movies":null},{"id":"nm7779129","name":"Nikita Dyuvbanov","height":NaN,"date_of_birth":null,"known_for_movies":"tt7025388,tt5629524,tt5242684"}]},{"table_name":"ratings","column_names":["movie_id","avg_rating","total_votes","median_rating"],"column_types":["TEXT","REAL","INTEGER","REAL"],"description":["","","",""],"sample_rows":[{"movie_id":"tt3923004","avg_rating":3.7,"total_votes":1719,"median_rating":6.0},{"movie_id":"tt6424724","avg_rating":6.7,"total_votes":128,"median_rating":7.0},{"movie_id":"tt8304386","avg_rating":4.0,"total_votes":688,"median_rating":3.0},{"movie_id":"tt6619250","avg_rating":3.1,"total_votes":137,"median_rating":4.0},{"movie_id":"tt7999950","avg_rating":7.2,"total_votes":282,"median_rating":7.0}]},{"table_name":"role_mapping","column_names":["movie_id","name_id","category"],"column_types":["TEXT","TEXT","TEXT"],"description":["","",""],"sample_rows":[{"movie_id":"tt7219324","name_id":"nm0038449","category":"actress"},{"movie_id":"tt2898904","name_id":"nm4666860","category":"actor"},{"movie_id":"tt3809960","name_id":"nm0957257","category":"actor"},{"movie_id":"tt8665794","name_id":"nm3354073","category":"actor"},{"movie_id":"tt5897636","name_id":"nm4264236","category":"actress"}]}] +Return your final answer as exactly one fenced ```sql block containing the single read-only SQLite SELECT/WITH query that answers the question. Do not include exploratory SQL in the final answer. Use the supplied documentation; no user simulator is available. \ No newline at end of file diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.stderr b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/events/local152.stderr new file mode 100644 index 00000000..e69de29b diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/records/local152.json b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/records/local152.json new file mode 100644 index 00000000..ee95cb5b --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/records/local152.json @@ -0,0 +1,275 @@ +{ + "instance_id": "local152", + "profile": "codex-mcp", + "model": "gpt-6.2-astra", + "status": "predicted", + "calls": [], + "prompt_sha256": "ed45cf60901dfe9a2f665510bb2ea3e98f53949a456668d6257a1eaeff99fa83", + "events_sha256": "d7a187ade25a35b141152438e3642b7df31b1ce3e7747fa2fc242e7088e8a3a4", + "cli_exit_code": 0, + "cli_usage": [ + { + "input_tokens": 229772, + "cached_input_tokens": 215424, + "cache_write_input_tokens": 0, + "output_tokens": 1763, + "reasoning_output_tokens": 66 + } + ], + "mcp_calls": [ + { + "id": "item_1", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "director_mapping" + }, + "result": { + "content": [ + { + "type": "text", + "text": "director_mapping (table)\n- movie_id: TEXT\n- name_id: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_2", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "names" + }, + "result": { + "content": [ + { + "type": "text", + "text": "names (table)\n- id: TEXT\n- name: TEXT\n- height: REAL\n- date_of_birth: TEXT\n- known_for_movies: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_3", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "movies" + }, + "result": { + "content": [ + { + "type": "text", + "text": "movies (table)\n- id: TEXT\n- title: TEXT\n- year: INTEGER\n- date_published: TIMESTAMP\n- duration: INTEGER\n- country: TEXT\n- worlwide_gross_income: TEXT\n- languages: TEXT\n- production_company: TEXT" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_4", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "explore_schema", + "arguments": { + "table": "ratings" + }, + "result": { + "content": [ + { + "type": "text", + "text": "ratings (table)\n- movie_id: TEXT\n- avg_rating: REAL\n- total_votes: INTEGER\n- median_rating: REAL" + } + ], + "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\": \"DSbZOSUuWwEt5DLGlsqpvwFUKGjc53u6CTn9KE9boQ8\", \"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": "DSbZOSUuWwEt5DLGlsqpvwFUKGjc53u6CTn9KE9boQ8", + "sql": "SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS credits,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS distinct_credits,\n (SELECT COUNT(*) FROM main.director_mapping d JOIN main.movies m ON m.id = d.movie_id JOIN main.names n ON n.id = d.name_id JOIN main.ratings r ON r.movie_id = d.movie_id) AS joined_credits,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.movies) AS excess_movie_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.names) AS excess_name_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT movie_id) FROM main.ratings) AS excess_rating_ids,\n (SELECT COUNT(*) FROM main.movies WHERE julianday(date_published) IS NULL OR time(date_published) <> '00:00:00') AS non_midnight_or_invalid,\n (SELECT COUNT(*) FROM main.ratings WHERE avg_rating <> ROUND(avg_rating, 1)) AS beyond_tenths,\n (SELECT MIN(avg_rating) FROM main.ratings) AS min_rating,\n (SELECT MAX(avg_rating) FROM main.ratings) AS max_rating" + }, + "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): credits=int; distinct_credits=int; joined_credits=int; excess_movie_ids=int; excess_name_ids=int; excess_rating_ids=int; non_midnight_or_invalid=int; beyond_tenths=int; min_rating=float; max_rating=float\ncredits | distinct_credits | joined_credits | excess_movie_ids | excess_name_ids | excess_rating_ids | non_midnight_or_invalid | beyond_tenths | min_rating | max_rating\n--- | --- | --- | --- | --- | --- | --- | --- | --- | ---\n3867 | 3867 | 3867 | 0 | 0 | 0 | 0 | 0 | 1.0 | 10.0\nSQL: SELECT\n (SELECT COUNT(*) FROM main.director_mapping) AS credits,\n (SELECT COUNT(*) FROM (SELECT DISTINCT name_id, movie_id FROM main.director_mapping)) AS distinct_credits,\n (SELECT COUNT(*) FROM main.director_mapping d JOIN main.movies m ON m.id = d.movie_id JOIN main.names n ON n.id = d.name_id JOIN main.ratings r ON r.movie_id = d.movie_id) AS joined_credits,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.movies) AS excess_movie_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT id) FROM main.names) AS excess_name_ids,\n (SELECT COUNT(*) - COUNT(DISTINCT movie_id) FROM main.ratings) AS excess_rating_ids,\n (SELECT COUNT(*) FROM main.movies WHERE julianday(date_published) IS NULL OR time(date_published) <> '00:00:00') AS non_midnight_or_invalid,\n (SELECT COUNT(*) FROM main.ratings WHERE avg_rating <> ROUND(avg_rating, 1)) AS beyond_tenths,\n (SELECT MIN(avg_rating) FROM main.ratings) AS min_rating,\n (SELECT MAX(avg_rating) FROM main.ratings) AS max_rating\nLIMIT 1000" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_7", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "fixed_decimal_sql", + "arguments": { + "aggregate": "avg", + "dialect": "sqlite", + "input_scale": 1, + "output_scale": 2 + }, + "result": { + "content": [ + { + "type": "text", + "text": "SQLite only. Supply WITH decimal_input AS (your SELECT exposing group_id, scaled_value), append these CTEs, then SELECT from decimal_result. Reserve decimal_* CTE names. NULL inputs are excluded like AVG/SUM.\nscaled_value MUST be an INTEGER representing value * 10^input_scale. Confirm source precision before conversion: for known fixed-scale numeric data, CAST(ROUND(value * 10^input_scale) AS INTEGER) removes representation noise. Do not choose a scale that rounds away meaningful source digits. No precision or currency conversion is inferred by this tool.\nInspect status and invalid_count: noninteger non-NULL input makes the entire group invalid_input; unsafe magnitude makes it overflow; all NULL makes it empty. Those groups retain their row with NULL results. No partial aggregates.\nRounding is half away from zero, performed once after aggregation using exact integer quotient/remainder. rounded_units is the exact integer at output_scale; rounded_value is its REAL representation for normal SQL display. This changes neither the source values nor the DB connection; run_sql remains required.\n\ndecimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_8", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"f2SobJ61dywxxRJloVzZYzbes7wUZWnVi6F_3Efu35I\", \"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_9", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "fixed_decimal_sql", + "arguments": { + "aggregate": "avg", + "dialect": "sqlite", + "input_scale": 1, + "output_scale": 2 + }, + "result": { + "content": [ + { + "type": "text", + "text": "SQLite only. Supply WITH decimal_input AS (your SELECT exposing group_id, scaled_value), append these CTEs, then SELECT from decimal_result. Reserve decimal_* CTE names. NULL inputs are excluded like AVG/SUM.\nscaled_value MUST be an INTEGER representing value * 10^input_scale. Confirm source precision before conversion: for known fixed-scale numeric data, CAST(ROUND(value * 10^input_scale) AS INTEGER) removes representation noise. Do not choose a scale that rounds away meaningful source digits. No precision or currency conversion is inferred by this tool.\nInspect status and invalid_count: noninteger non-NULL input makes the entire group invalid_input; unsafe magnitude makes it overflow; all NULL makes it empty. Those groups retain their row with NULL results. No partial aggregates.\nRounding is half away from zero, performed once after aggregation using exact integer quotient/remainder. rounded_units is the exact integer at output_scale; rounded_value is its REAL representation for normal SQL display. This changes neither the source values nor the DB connection; run_sql remains required.\n\ndecimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_10", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "f2SobJ61dywxxRJloVzZYzbes7wUZWnVi6F_3Efu35I", + "sql": "WITH director_movies AS (\n SELECT d.name_id AS director_id, m.duration, r.avg_rating, r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n), decimal_input AS (\n SELECT director_id AS group_id, CAST(ROUND(avg_rating * 10) AS INTEGER) AS scaled_value\n FROM director_movies\n), decimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)\nSELECT status, SUM(invalid_count) AS invalid_inputs, COUNT(*) AS directors FROM decimal_result GROUP BY status" + }, + "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): status=str; invalid_inputs=int; directors=int\nstatus | invalid_inputs | directors\n--- | --- | ---\nok | 0 | 3603\nSQL: WITH director_movies AS (\n SELECT d.name_id AS director_id, m.duration, r.avg_rating, r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n), decimal_input AS (\n SELECT director_id AS group_id, CAST(ROUND(avg_rating * 10) AS INTEGER) AS scaled_value\n FROM director_movies\n), decimal_bounds AS (\n SELECT group_id, scaled_value,\n COUNT(scaled_value) OVER g AS n,\n SUM(CASE WHEN scaled_value IS NOT NULL AND typeof(scaled_value) <> 'integer' THEN 1 ELSE 0 END) OVER g AS invalid_count,\n SUM(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value NOT BETWEEN -90071992547409 AND 90071992547409 THEN 1 ELSE 0 END) OVER g AS oversized_count,\n TOTAL(CASE WHEN typeof(scaled_value) = 'integer' AND scaled_value BETWEEN -90071992547409 AND 90071992547409 THEN ABS(scaled_value) ELSE 0 END) OVER g AS abs_total\n FROM decimal_input\n WINDOW g AS (PARTITION BY group_id)\n), decimal_totals AS (\n SELECT group_id, n, invalid_count,\n CASE WHEN invalid_count > 0 THEN 'invalid_input'\n WHEN n = 0 THEN 'empty'\n WHEN oversized_count > 0 OR abs_total > 90071992547409\n OR n > 900719925474099 THEN 'overflow'\n ELSE 'ok' END AS status,\n SUM(CASE WHEN invalid_count = 0 AND oversized_count = 0\n AND abs_total <= 90071992547409 AND n <= 900719925474099\n THEN scaled_value END) AS scaled_sum\n FROM decimal_bounds\n GROUP BY group_id\n), decimal_fraction AS (\n SELECT group_id, n, invalid_count, status,\n scaled_sum * 100 AS numerator, n * 10 AS denominator\n FROM decimal_totals\n), decimal_rounded AS (\n SELECT group_id, n, invalid_count, status,\n CASE WHEN status = 'ok' THEN numerator / denominator\n + CASE WHEN ABS(numerator % denominator) >= (denominator + 1) / 2\n THEN CASE WHEN numerator < 0 THEN -1 ELSE 1 END ELSE 0 END END AS rounded_units\n FROM decimal_fraction\n), decimal_result AS (\n SELECT *, rounded_units * 1.0 / 100 AS rounded_value\n FROM decimal_rounded\n)\nSELECT status, SUM(invalid_count) AS invalid_inputs, COUNT(*) AS directors FROM decimal_result GROUP BY status\nLIMIT 1000" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + }, + { + "id": "item_11", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "resolve_business_terms", + "arguments": { + "terms": [] + }, + "result": { + "content": [ + { + "type": "text", + "text": "{\"definition_check_id\": \"AQeGUWxGzLhOjQxsMB3_uHSoHXULf0aBgn65SdRVyyQ\", \"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_12", + "type": "mcp_tool_call", + "server": "lang2sql", + "tool": "run_sql", + "arguments": { + "definition_check_id": "AQeGUWxGzLhOjQxsMB3_uHSoHXULf0aBgn65SdRVyyQ", + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9" + }, + "result": { + "content": [ + { + "type": "text", + "text": "9 row(s):\nResult coverage: fetched_rows=9; displayed_rows=9; 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): director_id=str; director_name=str; movie_count=int; avg_inter_movie_days=int; avg_rating=float; total_votes=int; min_rating=float; max_rating=float; total_movie_duration=int\ndirector_id | director_name | movie_count | avg_inter_movie_days | avg_rating | total_votes | min_rating | max_rating | total_movie_duration\n--- | --- | --- | --- | --- | --- | --- | --- | ---\nnm1777967 | A.L. Vijay | 5 | 177 | 5.42 | 1754 | 3.7 | 6.9 | 613\nnm2096009 | Andrew Jones | 5 | 191 | 3.02 | 1989 | 2.7 | 3.2 | 432\nnm0814469 | Sion Sono | 4 | 331 | 6.03 | 2972 | 5.4 | 6.4 | 502\nnm0001752 | Steven Soderbergh | 4 | 254 | 6.48 | 171684 | 6.2 | 7.0 | 401\nnm0425364 | Jesse V. Johnson | 4 | 299 | 5.45 | 14778 | 4.2 | 6.5 | 383\nnm6356309 | Özgür Bakar | 4 | 112 | 3.75 | 1092 | 3.1 | 4.9 | 374\nnm0831321 | Chris Stokes | 4 | 198 | 4.33 | 3664 | 4.0 | 4.6 | 352\nnm2691863 | Justin Price | 4 | 315 | 4.5 | 5343 | 3.0 | 5.8 | 346\nnm0515005 | Sam Liu | 4 | 260 | 6.23 | 28557 | 5.8 | 6.7 | 312\nSQL: WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9" + } + ], + "structured_content": null + }, + "error": null, + "status": "completed" + } + ], + "answer": "```sql\nWITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9\n```", + "event_parse_errors": [], + "rows": 9, + "sql": "WITH director_movies AS (\n SELECT\n d.name_id AS director_id,\n m.duration,\n r.avg_rating,\n r.total_votes,\n julianday(m.date_published) - LAG(julianday(m.date_published)) OVER (\n PARTITION BY d.name_id ORDER BY m.date_published, m.id\n ) AS gap_days\n FROM main.director_mapping AS d\n JOIN main.movies AS m ON m.id = d.movie_id\n LEFT JOIN main.ratings AS r ON r.movie_id = m.id\n),\ndirector_stats AS (\n SELECT\n director_id,\n COUNT(*) AS movie_count,\n CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days,\n SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths,\n COUNT(avg_rating) AS rated_movies,\n SUM(total_votes) AS total_votes,\n MIN(avg_rating) AS min_rating,\n MAX(avg_rating) AS max_rating,\n SUM(duration) AS total_movie_duration\n FROM director_movies\n GROUP BY director_id\n)\nSELECT\n s.director_id,\n n.name AS director_name,\n s.movie_count,\n s.avg_inter_movie_days,\n ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating,\n s.total_votes,\n s.min_rating,\n s.max_rating,\n s.total_movie_duration\nFROM director_stats AS s\nJOIN main.names AS n ON n.id = s.director_id\nORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id\nLIMIT 9", + "seconds": 53.021380249992944 +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/scores.json b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/scores.json new file mode 100644 index 00000000..711a179f --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/scores.json @@ -0,0 +1,8 @@ +[ + { + "instance_id": "local152", + "score": 1, + "pred_sql": null, + "error_info": null + } +] diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/sql/local152.sql b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/sql/local152.sql new file mode 100644 index 00000000..41d9ad6d --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/sql/local152.sql @@ -0,0 +1,41 @@ +WITH director_movies AS ( + SELECT + d.name_id AS director_id, + m.duration, + r.avg_rating, + r.total_votes, + julianday(m.date_published) - LAG(julianday(m.date_published)) OVER ( + PARTITION BY d.name_id ORDER BY m.date_published, m.id + ) AS gap_days + FROM main.director_mapping AS d + JOIN main.movies AS m ON m.id = d.movie_id + LEFT JOIN main.ratings AS r ON r.movie_id = m.id +), +director_stats AS ( + SELECT + director_id, + COUNT(*) AS movie_count, + CAST(ROUND(AVG(gap_days)) AS INTEGER) AS avg_inter_movie_days, + SUM(CAST(ROUND(avg_rating * 10) AS INTEGER)) * 10 AS rating_sum_hundredths, + COUNT(avg_rating) AS rated_movies, + SUM(total_votes) AS total_votes, + MIN(avg_rating) AS min_rating, + MAX(avg_rating) AS max_rating, + SUM(duration) AS total_movie_duration + FROM director_movies + GROUP BY director_id +) +SELECT + s.director_id, + n.name AS director_name, + s.movie_count, + s.avg_inter_movie_days, + ((s.rating_sum_hundredths + s.rated_movies / 2) / s.rated_movies) / 100.0 AS avg_rating, + s.total_votes, + s.min_rating, + s.max_rating, + s.total_movie_duration +FROM director_stats AS s +JOIN main.names AS n ON n.id = s.director_id +ORDER BY s.movie_count DESC, s.total_movie_duration DESC, s.director_id +LIMIT 9 diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/status.json b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/status.json new file mode 100644 index 00000000..0ece9f40 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/codex-mcp/status.json @@ -0,0 +1,4 @@ +{ + "status": "completed", + "wall_seconds": 53.02218587498646 +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/log.txt b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/log.txt new file mode 100644 index 00000000..e69de29b diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/manifest.json b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/manifest.json new file mode 100644 index 00000000..54b4b07f --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/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": "local152", + "db": "imdb_movies", + "question": "Can you provide the top 9 directors by movie count, including their ID, name, number of movies, average inter-movie duration (rounded to the nearest integer), average rating (rounded to 2 decimals), total votes, minimum and maximum ratings, and total movie duration? Sort the output first by movie count in descending order and then by total movie duration in descending order.", + "external_knowledge": null, + "document_sha256": null + } + ], + "suite": "spider2", + "development_ids": [ + "local152" + ], + "holdout_ids": [], + "split_seed": 20261126 +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/settings.json b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/settings.json new file mode 100644 index 00000000..0194a3f5 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/settings.json @@ -0,0 +1,26 @@ +{ + "profiles": [ + { + "name": "codex-mcp", + "model": "gpt-6.2-astra", + "reasoning_effort": "high" + } + ], + "backend": "ChatGPT login -> Codex CLI -> production Lang2SQL MCP", + "revision": "f805510a660992b1fcdc075bb08c625efd1e81fc", + "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": 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" +} diff --git a/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/summary.json b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/summary.json new file mode 100644 index 00000000..361e9ba6 --- /dev/null +++ b/bench/accuracy/mcp-review-results/fixed-decimal-guidance/spider/summary.json @@ -0,0 +1,18 @@ +[ + { + "profile": "codex-mcp", + "status": "completed", + "correct": 1, + "total": 1, + "accuracy": 1.0, + "failed_predictions": 0, + "failure_types": {}, + "api_calls": null, + "seconds": 53.021380249992944, + "wall_seconds": 53.02218587498646, + "prompt_tokens": null, + "completion_tokens": null, + "usage_missing_calls": null, + "cost_usd": null + } +]