{"slug": "learning-when-to-reason-for-text-to-sql-via-sft-and-dpo", "title": "Learning When to Reason for Text-to-SQL via SFT and DPO", "summary": "AutoThinkSQL, a framework integrating an auto-thinking mechanism into Supervised Fine-Tuning and Direct Preference Optimization for Text-to-SQL, enables dynamic bypassing of reasoning for simple queries while invoking deep Chain-of-Thought for complex ones. On Qwen3-Coder-30B-A3B, the method achieves consistent gains on Spider and BIRD benchmarks while reducing average output tokens by 24.6% and 18.3% and average latency by 17.1% and 11.5% compared to CoT-only generation.", "body_md": "arXiv:2607.22622v1 Announce Type: new\nAbstract: Recent Text-to-SQL methods rely heavily on reasoning-centric paradigms such as Chain-of-Thought (CoT), achieving substantial gains on complex benchmarks at the cost of high inference-time overhead. However, a large fraction of real-world queries are simple lookups or aggregations that can be resolved without multi-step deduction, making forced reasoning wasteful. Thus, we propose AutoThinkSQL, a framework that integrates an auto-thinking mechanism into both Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO) on Text-to-SQL. Our approach enables the model to dynamically bypass reasoning for simple queries while invoking deep CoT for complex queries. On Qwen3-Coder-30B-A3B, our method achieves consistent gains compared to the best counterpart baseline on both Spider and BIRD benchmarks while simultaneously reducing average output tokens by 24.6% and 18.3%, and average latency by 17.1% and 11.5% compared to CoT-only generation. Further analysis indicates that the model learns to align its reasoning decisions with query difficulty.", "url": "https://wpnews.pro/news/learning-when-to-reason-for-text-to-sql-via-sft-and-dpo", "canonical_source": "https://arxiv.org/abs/2607.22622", "published_at": "2026-07-28 04:00:00+00:00", "updated_at": "2026-07-28 04:25:07.619184+00:00", "lang": "en", "topics": ["artificial-intelligence", "natural-language-processing", "large-language-models"], "entities": ["AutoThinkSQL", "Qwen3-Coder-30B-A3B", "Spider", "BIRD"], "alternates": {"html": "https://wpnews.pro/news/learning-when-to-reason-for-text-to-sql-via-sft-and-dpo", "markdown": "https://wpnews.pro/news/learning-when-to-reason-for-text-to-sql-via-sft-and-dpo.md", "text": "https://wpnews.pro/news/learning-when-to-reason-for-text-to-sql-via-sft-and-dpo.txt", "jsonld": "https://wpnews.pro/news/learning-when-to-reason-for-text-to-sql-via-sft-and-dpo.jsonld"}}