{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/excot-optimizing-reasoning-for-text-to-sql","title":"ExCoT: Optimizing Reasoning for Text-to-SQL with Execution Feedback","arxiv_id":"2503.19988","date":"2025-03-25","proceeding":null,"authors":["Bohan Zhai","Canwen Xu","Yuxiong He","Zhewei Yao"],"abstract":"Text-to-SQL demands precise reasoning to convert natural language questions into structured queries. While large language models (LLMs) excel in many reasoning tasks, their ability to leverage Chain-of-Thought (CoT) reasoning for text-to-SQL remains underexplored. We identify critical limitations: zero-shot CoT offers minimal gains, and Direct Preference Optimization (DPO) applied without CoT yields marginal improvements. We propose ExCoT, a novel framework that iteratively optimizes open-source LLMs by combining CoT reasoning with off-policy and on-policy DPO, relying solely on execution accuracy as feedback. This approach eliminates the need for reward models or human-annotated preferences. Our experimental results demonstrate significant performance gains: ExCoT improves execution accuracy on BIRD dev set from 57.37% to 68.51% and on Spider test set from 78.81% to 86.59% for LLaMA-3 70B, with Qwen-2.5-Coder demonstrating similar improvements. Our best model achieves state-of-the-art performance in the single-model setting on both BIRD and Spider datasets, notably achieving 68.53% on the BIRD test set.","url_abs":"https://arxiv.org/abs/2503.19988v1","url_pdf":"https://arxiv.org/pdf/2503.19988v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"excot-optimizing-reasoning-for-text-to-sql","repo_url":"https://github.com/snowflakedb/ArcticTraining","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"text-to-sql","task_name":"Text to SQL"},{"task_slug":"text-to-sql","task_name":"Text-To-SQL"}],"methods":[{"method_slug":"dpo","method_name":"DPO"},{"method_slug":"set","method_name":"SET"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2503.19988","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2503.19988"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/snowflakedb/ArcticTraining","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"unverified":5},"by_repo_kind":{"official":{"samples":5,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"516bf07f422b7e2f","entry":"deepspeed_launch","repo":"snowflakedb/ArcticTraining","repo_kind":"official","path":"arctic_training_cli.py","file_url":"https://github.com/snowflakedb/ArcticTraining/blob/HEAD/arctic_training_cli.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"516bf07f422b7e2f"}},{"code_sha256_prefix":"6d755b4f1a5a2297","entry":"gather_object","repo":"snowflakedb/ArcticTraining","repo_kind":"official","path":"arctic_training/metrics.py","file_url":"https://github.com/snowflakedb/ArcticTraining/blob/HEAD/arctic_training/metrics.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6d755b4f1a5a2297"}},{"code_sha256_prefix":"0a43094e901920e4","entry":"get_causal_lm_model_cls_prefix","repo":"snowflakedb/ArcticTraining","repo_kind":"official","path":"arctic_training/model/tiled_compute.py","file_url":"https://github.com/snowflakedb/ArcticTraining/blob/HEAD/arctic_training/model/tiled_compute.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0a43094e901920e4"}},{"code_sha256_prefix":"b6c9a0be1ef593bb","entry":"get_model_type","repo":"snowflakedb/ArcticTraining","repo_kind":"official","path":"arctic_training/model/tiled_compute.py","file_url":"https://github.com/snowflakedb/ArcticTraining/blob/HEAD/arctic_training/model/tiled_compute.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b6c9a0be1ef593bb"}},{"code_sha256_prefix":"37b06f7f7e7359e0","entry":"ray_launch","repo":"snowflakedb/ArcticTraining","repo_kind":"official","path":"arctic_training_cli.py","file_url":"https://github.com/snowflakedb/ArcticTraining/blob/HEAD/arctic_training_cli.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"37b06f7f7e7359e0"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}