End-to-End Text-to-SQL with Dataset Selection: Leveraging LLMs for Adaptive Query Generation
Not on the map. Why?
Abstract (arXiv)
Text-to-SQL bridges the gap between natural language and structured database language, thus allowing non-technical users to easily query databases. Traditional approaches model text-to-SQL as a direct translation task, where a given Natural Language Query (NLQ) is mapped to an SQL command. Recent advances in large language models (LLMs) have significantly improved translation accuracy, however, these methods all require that the target database is pre-specified. This becomes problematic in scenarios with multiple extensive databases, where identifying the correct database becomes a crucial yet overlooked step. In this paper, we propose a three-stage end-to-end text-to-SQL framework to identify the user's intended database before generating SQL queries. Our approach leverages LLMs and prompt engineering to extract implicit information from natural language queries (NLQs) in the form of a ruleset. We then train a large dbid prediction model, which includes a RoBERTa-based finetuned encoder, to predict the correct Database identifier (dbid) based on both the NLQ and the LLM-generated rules. Finally, we refine the generated SQL by using critic agents to correct errors. Experimental results demonstrate that our framework outperforms the current state-of-the-art models in both database intent prediction and SQL generation accuracy.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 29 of its 36 references that are in the map. First posted on arXiv 8 Aug 2025.
Builds on
29 of 36 references.
References · 29
- 2019RoBERTa: A Robustly Optimized BERT Pretraining Approachcited by 13,372
- 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,459
- 2023A Survey on Large Language Model based Autonomous Agentscited by 2,242
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,139
- 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 477
- 2021PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Modelscited by 411
- 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 385
- 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
- 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 195
- 2024CHESS: Contextual Harnessing for Efficient SQL Synthesiscited by 169
- 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 164
- 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQLcited by 164
17 more
- 2023OpenAgents: An Open Platform for Language Agents in the Wildcited by 137
- 2022Evaluating the Text-to-SQL Capabilities of Large Language Modelscited by 101
- 2020SmBoP: Semi-autoregressive Bottom-up Semantic Parsingcited by 97
- 2023Graphix-T5: Mixing Pre-Trained Transformers with Graph-Aware Layers for Text-to-SQL Parsingcited by 93
- 2022RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLcited by 85
- 2021Natural SQL: Making SQL Easier to Infer from Natural Language Specificationscited by 68
- 2020RYANSQL: Recursively Applying Sketch-based Slot Fillings for Complex Text-to-SQL in Cross-Domain Databasescited by 63
- 2022A Survey on Text-to-SQL Parsing: Concepts, Methods, and Future Directionscited by 52
- 2022S2SQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parserscited by 41
- 2024MAGIC: Generating Self-Correction Guideline for In-Context Text-to-SQLcited by 35
- 2024SQLBench: A Comprehensive Evaluation for Text-to-SQL Capabilities of Large Language Modelscited by 32
- 2022Importance of Synthesizing High-quality Data for Text-to-SQL Parsingcited by 28
- 2017An Encoder-Decoder Framework Translating Natural Language to Database Queriescited by 23
- 2022N-Best Hypotheses Reranking for Text-To-SQL Systemscited by 19
- 2022Natural Language Interfaces to Datacited by 14
- 2024SQL-to-Schema Enhances Schema Linking in Text-to-SQLcited by 12
- 2020Duoquest: A Dual-Specification System for Expressive SQL Queriescited by 7
Built on by
Citing papers per year: 2025: 2.
2 papers.