ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought
On the map: LLM reasoning → Knowledge- and tool-augmented reasoning
Abstract (arXiv)
Recently Large Language Models (LLMs) have been proven to have strong abilities in various domains and tasks. We study the problem of prompt designing in the text-to-SQL task and attempt to improve the LLMs' reasoning ability when generating SQL queries. Besides the trivial few-shot in-context learning setting, we design our chain-of-thought (CoT) prompt with a similar method to schema linking. We provide a method named ACT-SQL to automatically generate auto-CoT exemplars and thus the whole process doesn't need manual labeling. Our approach is cost-saving since we only use the LLMs' API call once when generating one SQL query. Furthermore, we extend our in-context learning method to the multi-turn text-to-SQL task. The experiment results show that the LLMs' performance can benefit from our ACT-SQL approach. Our approach achieves SOTA performance on the Spider dev set among existing in-context learning approaches.
Key facts. Cited by 65 papers in the map (data through 7 Oct 2026). Placed in Knowledge- and tool-augmented reasoning, one of 17 directions in LLM reasoning. Builds on 24 of its 33 references that are in the map. First posted on arXiv 26 Oct 2023.
Builds on
24 of 33 references.
References · 24
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Training language models to follow instructions with human feedbackcited by 15,712
- 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
- 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
- 2019CoSQL: A Conversational Text-to-SQL Challenge Towards Cross-Domain Natural Language Interfaces to Databasescited by 180
- 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 159
- 2019SParC: Cross-Domain Semantic Parsing in Contextcited by 141
- 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
12 more
- 2020Structure-Grounded Pretraining for Text-to-SQLcited by 126
- 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 119
- 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
- 2023Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsingcited by 93
- 2021Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalizationcited by 92
- 2022RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLcited by 85
- 2020Grounded Adaptation for Zero-shot Executable Semantic Parsingcited by 76
- 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
- 2023How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settingscited by 57
- 2023Enhancing Few-shot Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategiescited by 44
- 2021ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parsercited by 35
- 2022N-Best Hypotheses Reranking for Text-To-SQL Systemscited by 19
Built on by
Citing papers per year: 2024: 21; 2025: 29; 2026: 15.
65 papers.
Sort:
By area:
- 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 223
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
- 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQLcited by 59
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
- 2024Synthesizing Text-to-SQL Data from Weak and Strong LLMscited by 53
- 2024Knowledge-to-SQL: Enhancing SQL Generation with Data Expert LLMcited by 35
- 2025ReFoRCE: A Text-to-SQL Agent with Self-Refinement, Consensus Enforcement, and Column Explorationcited by 34
- 2024Decomposition for Enhancing Attention: Improving LLM-based Text-to-SQL through Workflow Paradigmcited by 31
- 2025A Survey of Data Agents: Emerging Paradigm or Overstated Hype?cited by 30
- 2024A Survey of Table Reasoning with Large Language Modelscited by 29
- 2024Compromising Embodied Agents with Contextual Backdoor Attackscited by 29
38 more
- 2024PET-SQL: A Prompt-Enhanced Two-Round Refinement of Text-to-SQL with Cross-consistencycited by 26
- 2025ExCoT: Optimizing Reasoning for Text-to-SQL with Execution Feedbackcited by 23
- 2024Investigating the Impact of Data Contamination of Large Language Models in Text-to-SQL Translationcited by 21
- 2025Reliable Text-to-SQL with Adaptive Abstentioncited by 19
- 2025SQL-o1: A Self-Reward Heuristic Dynamic Search Method for Text-to-SQLcited by 19
- 2024From Natural Language to SQL: Review of LLM-based Text-to-SQL Systemscited by 15
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
- 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQLcited by 14
- 2024CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editionscited by 13
- 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQLcited by 13
- 2024Machine Translation with Large Language Models: Prompt Engineering for Persian, English, and Russian Directionscited by 12
- 2024Improving Demonstration Diversity by Human-Free Fusing for Text-to-SQLcited by 10
- 2025Tabular Data Understanding with LLMs: A Survey of Recent Advances and Challengescited by 10
- 2025Knapsack Optimization-based Schema Linking for LLM-based Text-to-SQL Generationcited by 9
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLcited by 8
- 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Modelscited by 7
- 2025Multilingual Text-to-SQL: Benchmarking the Limits of Language Models with Collaborative Language Agentscited by 7
- 2026SQL-Trail: Multi-Turn Reinforcement Learning with Interleaved Feedback for Text-to-SQLcited by 7
- 2024Leveraging Prior Experience: An Expandable Auxiliary Knowledge Base for Text-to-SQLcited by 5
- 2025SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correctioncited by 5
- 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Trainingcited by 5
- 2026EvoSchema: Towards Text-to-SQL Robustness Against Schema Evolutioncited by 5
- 2024Dynamic Few-Shot Learning for Knowledge Graph Question Answeringcited by 4
- 2024Tool-Assisted Agent on SQL Inspection and Refinement in Real-World Scenarioscited by 4
- 2025SAFE-SQL: Self-Augmented In-Context Learning with Fine-grained Example Selection for Text-to-SQLcited by 4
- 2025Generating patient cohorts from electronic health records using two-step retrieval-augmented text-to-SQL generationcited by 4
- 2025GenEdit: Compounding Operators and Continuous Improvement to Tackle Text-to-SQL in the Enterprisecited by 4
- 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graphcited by 4
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
- 2024Enhancing LLM Fine-tuning for Text-to-SQLs by SQL Quality Measurementcited by 3
- 2025Abacus-SQL: A Text-to-SQL System Empowering Cross-Domain and Open-Domain Database Retrievalcited by 3
- 2025TEXT2DB: Integration-Aware Information Extraction with Large Language Model Agentscited by 3
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregationcited by 3
- 2024Multi-Turn Interactions for Text-to-SQL with Large Language Modelscited by 2
- 2025MultiTEND: A Multilingual Benchmark for Natural Language to NoSQL Query Translationcited by 2
- 2025PaVeRL-SQL: Text-to-SQL via Partial-Match Rewards and Verbal Reinforcement Learningcited by 2
- 2025Exploring Database Normalization Effects on SQL Generationcited by 2
- 2025Schema-R1: A reasoning training approach for schema linking in Text-to-SQL Taskcited by 1
50 most cited of 65 All 65 (JSON)
- 2026text2ql: Multi-Target Natural Language Querying via a Language-Agnostic Intermediate Representation2 Sep 2026
- 2026SPOC-SQL: Stage-wise Preference Optimization for Controllable Text-to-SQL24 Aug 2026
- 2026SafeQL: Search-based Refinement for Safe and Efficient LLM-based Text-to-SQL10 Aug 2026
- 2026Causal Episodic Memory for Feedback-Driven Agent Repair6 Aug 2026
- 2026Database Context Compression for Text-to-SQL on Real-World Large Databases26 Jun 2026
- 2026ZAS-SQL: Distilling Rules from Failures for Zero-Shot Text-to-SQL6 Jun 2026
- 2026ProSPy: A Profiling-Driven SQL-Python Agentic Framework for Enterprise Text-to-SQL4 Jun 2026
- 2026Reliable Answers for Recurring Questions: Boosting Text-to-SQL Accuracy with Template Constrained Decoding30 Apr 2026
- 2026EXPO-SQL: Execution-based Clause-level Policy Optimization for Text-to-SQL29 Apr 2026
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregation17 Mar 2026
- 2026EvoSchema: Towards Text-to-SQL Robustness Against Schema Evolution11 Mar 2026
- 2026Track-SQL: Enhancing Generative Language Models with Dual-Extractive Modules for Schema and Context Tracking in Multi-turn Text-to-SQL6 Mar 2026
38 more
- 2026ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement4 Mar 2026
- 2026Beyond Static Pipelines: Learning Dynamic Workflows for Text-to-SQL17 Feb 2026
- 2026SQL-Trail: Multi-Turn Reinforcement Learning with Interleaved Feedback for Text-to-SQL25 Jan 2026
- 2025Skeletons Matter: Dynamic Data Augmentation for Text-to-Query24 Nov 2025
- 2025TEXT2DB: Integration-Aware Information Extraction with Large Language Model Agents28 Oct 2025
- 2025A Survey of Data Agents: Emerging Paradigm or Overstated Hype?27 Oct 2025
- 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Training12 Oct 2025
- 2025Exploring Database Normalization Effects on SQL Generation2 Oct 2025
- 2025Multilingual Text-to-SQL: Benchmarking the Limits of Language Models with Collaborative Language Agents29 Sep 2025
- 2025PaVeRL-SQL: Text-to-SQL via Partial-Match Rewards and Verbal Reinforcement Learning8 Sep 2025
- 2025SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correction30 Aug 2025
- 2025SPORTSQL: An Interactive System for Real-Time Sports Reasoning and Visualization23 Aug 2025
- 2025Tabular Data Understanding with LLMs: A Survey of Recent Advances and Challenges31 Jul 2025
- 2025Schema-R1: A reasoning training approach for schema linking in Text-to-SQL Task13 Jun 2025
- 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunities28 May 2025
- 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graph26 May 2025
- 2025Meta-aware Learning in text-to-SQL Large Language Model25 May 2025
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL19 May 2025
- 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQL21 Apr 2025
- 2025Abacus-SQL: A Text-to-SQL System Empowering Cross-Domain and Open-Domain Database Retrieval14 Apr 2025
- 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Models3 Apr 2025
- 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQL29 Mar 2025
- 2025GenEdit: Compounding Operators and Continuous Improvement to Tackle Text-to-SQL in the Enterprise27 Mar 2025
- 2025ExCoT: Optimizing Reasoning for Text-to-SQL with Execution Feedback25 Mar 2025
- 2025Generating patient cohorts from electronic health records using two-step retrieval-augmented text-to-SQL generation28 Feb 2025
- 2025Knapsack Optimization-based Schema Linking for LLM-based Text-to-SQL Generation18 Feb 2025
- 2025SQL-o1: A Self-Reward Heuristic Dynamic Search Method for Text-to-SQL17 Feb 2025
- 2025SAFE-SQL: Self-Augmented In-Context Learning with Fine-grained Example Selection for Text-to-SQL17 Feb 2025
- 2025MultiTEND: A Multilingual Benchmark for Natural Language to NoSQL Query Translation16 Feb 2025
- 2025ReFoRCE: A Text-to-SQL Agent with Self-Refinement, Consensus Enforcement, and Column Exploration2 Feb 2025
- 2025Reliable Text-to-SQL with Adaptive Abstention18 Jan 2025
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors16 Jan 2025
- 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQL13 Dec 2024
- 2024Leveraging Prior Experience: An Expandable Auxiliary Knowledge Base for Text-to-SQL20 Nov 2024
- 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflows12 Nov 2024
- 2024Enhancing LLM Fine-tuning for Text-to-SQLs by SQL Quality Measurement2 Oct 2024
- 2024From Natural Language to SQL: Review of LLM-based Text-to-SQL Systems1 Oct 2024
- 2024Tool-Assisted Agent on SQL Inspection and Refinement in Real-World Scenarios30 Aug 2024
50 newest of 65 All 65 (JSON)
- 2025ReFoRCE: A Text-to-SQL Agent with Self-Refinement, Consensus Enforcement, and Column Explorationcited by 34
- 2025A Survey of Data Agents: Emerging Paradigm or Overstated Hype?cited by 30
- 2024Compromising Embodied Agents with Contextual Backdoor Attackscited by 29
- 2025Multilingual Text-to-SQL: Benchmarking the Limits of Language Models with Collaborative Language Agentscited by 7
- 2025SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correctioncited by 5
- 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Trainingcited by 5
- 2024Tool-Assisted Agent on SQL Inspection and Refinement in Real-World Scenarioscited by 4
- 2025TEXT2DB: Integration-Aware Information Extraction with Large Language Model Agentscited by 3
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregationcited by 3
- 2026ProSPy: A Profiling-Driven SQL-Python Agentic Framework for Enterprise Text-to-SQLcited by 0
- 2026Causal Episodic Memory for Feedback-Driven Agent Repaircited by 0
- 2026Causal Episodic Memory for Feedback-Driven Agent Repair6 Aug 2026
- 2026ProSPy: A Profiling-Driven SQL-Python Agentic Framework for Enterprise Text-to-SQL4 Jun 2026
- 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregation17 Mar 2026
- 2025TEXT2DB: Integration-Aware Information Extraction with Large Language Model Agents28 Oct 2025
- 2025A Survey of Data Agents: Emerging Paradigm or Overstated Hype?27 Oct 2025
- 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Training12 Oct 2025
- 2025Multilingual Text-to-SQL: Benchmarking the Limits of Language Models with Collaborative Language Agents29 Sep 2025
- 2025SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correction30 Aug 2025
- 2025ReFoRCE: A Text-to-SQL Agent with Self-Refinement, Consensus Enforcement, and Column Exploration2 Feb 2025
- 2024Tool-Assisted Agent on SQL Inspection and Refinement in Real-World Scenarios30 Aug 2024
- 2024Compromising Embodied Agents with Contextual Backdoor Attacks6 Aug 2024
- 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQLcited by 59
- 2024Decomposition for Enhancing Attention: Improving LLM-based Text-to-SQL through Workflow Paradigmcited by 31
- 2024A Survey of Table Reasoning with Large Language Modelscited by 29
- 2025ExCoT: Optimizing Reasoning for Text-to-SQL with Execution Feedbackcited by 23
- 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQLcited by 14
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLcited by 8
- 2024Multi-Turn Interactions for Text-to-SQL with Large Language Modelscited by 2
- 2025SPORTSQL: An Interactive System for Real-Time Sports Reasoning and Visualizationcited by 0
- 2025SPORTSQL: An Interactive System for Real-Time Sports Reasoning and Visualization23 Aug 2025
- 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL19 May 2025
- 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQL21 Apr 2025
- 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQL29 Mar 2025
- 2025ExCoT: Optimizing Reasoning for Text-to-SQL with Execution Feedback25 Mar 2025
- 2024Multi-Turn Interactions for Text-to-SQL with Large Language Models9 Aug 2024
- 2024Decomposition for Enhancing Attention: Improving LLM-based Text-to-SQL through Workflow Paradigm16 Feb 2024
- 2024A Survey of Table Reasoning with Large Language Models13 Feb 2024
- 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 223
- 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
- 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
- 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
- 2024Synthesizing Text-to-SQL Data from Weak and Strong LLMscited by 53
- 2024Knowledge-to-SQL: Enhancing SQL Generation with Data Expert LLMcited by 35
- 2024PET-SQL: A Prompt-Enhanced Two-Round Refinement of Text-to-SQL with Cross-consistencycited by 26
- 2024Investigating the Impact of Data Contamination of Large Language Models in Text-to-SQL Translationcited by 21
- 2025Reliable Text-to-SQL with Adaptive Abstentioncited by 19
- 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
- 2024CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editionscited by 13
- 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQLcited by 13
12 most cited of 41 All 41 (JSON)
- 2026text2ql: Multi-Target Natural Language Querying via a Language-Agnostic Intermediate Representation2 Sep 2026
- 2026SafeQL: Search-based Refinement for Safe and Efficient LLM-based Text-to-SQL10 Aug 2026
- 2026Database Context Compression for Text-to-SQL on Real-World Large Databases26 Jun 2026
- 2026ZAS-SQL: Distilling Rules from Failures for Zero-Shot Text-to-SQL6 Jun 2026
- 2026Reliable Answers for Recurring Questions: Boosting Text-to-SQL Accuracy with Template Constrained Decoding30 Apr 2026
- 2026EXPO-SQL: Execution-based Clause-level Policy Optimization for Text-to-SQL29 Apr 2026
- 2026EvoSchema: Towards Text-to-SQL Robustness Against Schema Evolution11 Mar 2026
- 2026Track-SQL: Enhancing Generative Language Models with Dual-Extractive Modules for Schema and Context Tracking in Multi-turn Text-to-SQL6 Mar 2026
- 2026ErrorLLM: Modeling SQL Errors for Text-to-SQL Refinement4 Mar 2026
- 2026Beyond Static Pipelines: Learning Dynamic Workflows for Text-to-SQL17 Feb 2026
- 2026SQL-Trail: Multi-Turn Reinforcement Learning with Interleaved Feedback for Text-to-SQL25 Jan 2026
- 2025Skeletons Matter: Dynamic Data Augmentation for Text-to-Query24 Nov 2025
12 newest of 41 All 41 (JSON)
Similar, not cited
Close in wording, no citation either way
- 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQL
- 2024RB-SQL: A Retrieval-based LLM Framework for Text-to-SQL
- 2025Auto prompt sql: a resource-efficient architecture for text-to-sql translation in constrained environments
- 2024SelECT-SQL: Self-correcting ensemble Chain-of-Thought for Text-to-SQL
- 2023Divide and Prompt: Chain of Thought Prompting for Text-to-SQL
- 2023Retrieval-augmented GPT-3.5-based Text-to-SQL Framework with Sample-aware Prompting and Dynamic Revision Chain
- 2024Augmenting In-Context-Learning in LLMs via Automatic Data Labeling and Refinement
- 2024Open-SQL Framework: Enhancing Text-to-SQL on Open-source Large Language Models