mlsanityData to 7 Oct 2026

ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought

arXiv 2310.17342 ↗First posted 26 Oct 2023cs.CLcited by 65

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

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2022Training language models to follow instructions with human feedbackcited by 15,712
  3. 2022Large Language Models are Zero-Shot Reasonerscited by 4,323
  4. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  5. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
  6. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
  7. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
  8. 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 402
  9. 2019CoSQL: A Conversational Text-to-SQL Challenge Towards Cross-Domain Natural Language Interfaces to Databasescited by 180
  10. 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 159
  11. 2019SParC: Cross-Domain Semantic Parsing in Contextcited by 141
  12. 2017SQLNet: Generating Structured Queries From Natural Language Without Reinforcement Learningcited by 135
12 more
  1. 2020Structure-Grounded Pretraining for Text-to-SQLcited by 126
  2. 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 119
  3. 2021Towards Robustness of Text-to-SQL Models against Synonym Substitutioncited by 110
  4. 2023Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsingcited by 93
  5. 2021Exploring Underexplored Limitations of Cross-Domain Text-to-SQL Generalizationcited by 92
  6. 2022RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLcited by 85
  7. 2020Grounded Adaptation for Zero-shot Executable Semantic Parsingcited by 76
  8. 2019Representing Schema Structure with Graph Neural Networks for Text-to-SQL Parsingcited by 74
  9. 2023How to Prompt LLMs for Text-to-SQL: A Study in Zero-shot, Single-domain, and Cross-domain Settingscited by 57
  10. 2023Enhancing Few-shot Text-to-SQL Capabilities of Large Language Models: A Study on Prompt Design Strategiescited by 44
  11. 2021ShadowGNN: Graph Projection Neural Network for Text-to-SQL Parsercited by 35
  12. 2022N-Best Hypotheses Reranking for Text-To-SQL Systemscited by 19

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 21; 2025: 29; 2026: 15.

65 papers.

Sort:

By area:

  1. 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 223
  2. 2024Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQLcited by 118
  3. 2024A Survey on Employing Large Language Models for Text-to-SQL Taskscited by 67
  4. 2025Reasoning-SQL: Reinforcement Learning with SQL Tailored Partial Rewards for Reasoning-Enhanced Text-to-SQLcited by 59
  5. 2024A Survey of Text-to-SQL in the Era of LLMs: Where are we, and where are we going?cited by 54
  6. 2024Synthesizing Text-to-SQL Data from Weak and Strong LLMscited by 53
  7. 2024Knowledge-to-SQL: Enhancing SQL Generation with Data Expert LLMcited by 35
  8. 2025ReFoRCE: A Text-to-SQL Agent with Self-Refinement, Consensus Enforcement, and Column Explorationcited by 34
  9. 2024Decomposition for Enhancing Attention: Improving LLM-based Text-to-SQL through Workflow Paradigmcited by 31
  10. 2025A Survey of Data Agents: Emerging Paradigm or Overstated Hype?cited by 30
  11. 2024A Survey of Table Reasoning with Large Language Modelscited by 29
  12. 2024Compromising Embodied Agents with Contextual Backdoor Attackscited by 29
38 more
  1. 2024PET-SQL: A Prompt-Enhanced Two-Round Refinement of Text-to-SQL with Cross-consistencycited by 26
  2. 2025ExCoT: Optimizing Reasoning for Text-to-SQL with Execution Feedbackcited by 23
  3. 2024Investigating the Impact of Data Contamination of Large Language Models in Text-to-SQL Translationcited by 21
  4. 2025Reliable Text-to-SQL with Adaptive Abstentioncited by 19
  5. 2025SQL-o1: A Self-Reward Heuristic Dynamic Search Method for Text-to-SQLcited by 19
  6. 2024From Natural Language to SQL: Review of LLM-based Text-to-SQL Systemscited by 15
  7. 2025Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errorscited by 14
  8. 2025Think2SQL: Reinforce LLM Reasoning Capabilities for Text2SQLcited by 14
  9. 2024CoE-SQL: In-Context Learning for Multi-Turn Text-to-SQL with Chain-of-Editionscited by 13
  10. 2024ROUTE: Robust Multitask Tuning and Collaboration for Text-to-SQLcited by 13
  11. 2024Machine Translation with Large Language Models: Prompt Engineering for Persian, English, and Russian Directionscited by 12
  12. 2024Improving Demonstration Diversity by Human-Free Fusing for Text-to-SQLcited by 10
  13. 2025Tabular Data Understanding with LLMs: A Survey of Recent Advances and Challengescited by 10
  14. 2025Knapsack Optimization-based Schema Linking for LLM-based Text-to-SQL Generationcited by 9
  15. 2025ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLcited by 8
  16. 2025LearNAT: Learning NL2SQL with AST-guided Task Decomposition for Large Language Modelscited by 7
  17. 2025Multilingual Text-to-SQL: Benchmarking the Limits of Language Models with Collaborative Language Agentscited by 7
  18. 2026SQL-Trail: Multi-Turn Reinforcement Learning with Interleaved Feedback for Text-to-SQLcited by 7
  19. 2024Leveraging Prior Experience: An Expandable Auxiliary Knowledge Base for Text-to-SQLcited by 5
  20. 2025SQL-of-Thought: Multi-agentic Text-to-SQL with Guided Error Correctioncited by 5
  21. 2025MTSQL-R1: Towards Long-Horizon Multi-Turn Text-to-SQL via Agentic Trainingcited by 5
  22. 2026EvoSchema: Towards Text-to-SQL Robustness Against Schema Evolutioncited by 5
  23. 2024Dynamic Few-Shot Learning for Knowledge Graph Question Answeringcited by 4
  24. 2024Tool-Assisted Agent on SQL Inspection and Refinement in Real-World Scenarioscited by 4
  25. 2025SAFE-SQL: Self-Augmented In-Context Learning with Fine-grained Example Selection for Text-to-SQLcited by 4
  26. 2025Generating patient cohorts from electronic health records using two-step retrieval-augmented text-to-SQL generationcited by 4
  27. 2025GenEdit: Compounding Operators and Continuous Improvement to Tackle Text-to-SQL in the Enterprisecited by 4
  28. 2025DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graphcited by 4
  29. 2025Exploring the Landscape of Text-to-SQL with Large Language Models: Progresses, Challenges and Opportunitiescited by 4
  30. 2024Enhancing LLM Fine-tuning for Text-to-SQLs by SQL Quality Measurementcited by 3
  31. 2025Abacus-SQL: A Text-to-SQL System Empowering Cross-Domain and Open-Domain Database Retrievalcited by 3
  32. 2025TEXT2DB: Integration-Aware Information Extraction with Large Language Model Agentscited by 3
  33. 2026SQL-ASTRA: Alleviating Sparse Feedback in Agentic SQL via Column-Set Matching and Trajectory Aggregationcited by 3
  34. 2024Multi-Turn Interactions for Text-to-SQL with Large Language Modelscited by 2
  35. 2025MultiTEND: A Multilingual Benchmark for Natural Language to NoSQL Query Translationcited by 2
  36. 2025PaVeRL-SQL: Text-to-SQL via Partial-Match Rewards and Verbal Reinforcement Learningcited by 2
  37. 2025Exploring Database Normalization Effects on SQL Generationcited by 2
  38. 2025Schema-R1: A reasoning training approach for schema linking in Text-to-SQL Taskcited by 1

50 most cited of 65 All 65 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2023Exploring Chain-of-Thought Style Prompting for Text-to-SQL
  2. 2024RB-SQL: A Retrieval-based LLM Framework for Text-to-SQL
  3. 2025Auto prompt sql: a resource-efficient architecture for text-to-sql translation in constrained environments
  4. 2024SelECT-SQL: Self-correcting ensemble Chain-of-Thought for Text-to-SQL
  5. 2023Divide and Prompt: Chain of Thought Prompting for Text-to-SQL
  6. 2023Retrieval-augmented GPT-3.5-based Text-to-SQL Framework with Sample-aware Prompting and Dynamic Revision Chain
  7. 2024Augmenting In-Context-Learning in LLMs via Automatic Data Labeling and Refinement
  8. 2024Open-SQL Framework: Enhancing Text-to-SQL on Open-source Large Language Models