Text-to-SQL
Overview
Text-to-SQL studies how to turn natural-language questions into database queries that retrieve the intended information. Systems link questions to tables, columns, and values, then generate SQL using language models, structured intermediate plans, retrieval, or schema-aware semantic metadata. Common approaches add query decomposition, execution feedback, verification, and iterative repair; training methods include fine-tuning on curated or synthetic examples and reinforcement learning with execution-based rewards. Benchmarks such as Spider and BIRD test execution accuracy, but real deployments also expose challenges in large or changing schemas, ambiguity, multiple SQL dialects, and balancing reliability against cost and latency.
Latest papers
173 papers24 papers in the last four weeks, up 33% on the four weeks before. 0.1% of all new papers.
Querying an astronomical database using large language models: the ALeRCE text-to-SQL system
DecoSearch: Complexity-Aware Routing and Plan-Level Repair for Text-to-SQL
Integrating Reasoning and Generalization in Text-to-SQL via Self-Enhanced Fine-Tuning
TAHOE: Text-to-SQL with Automated Hint Optimization from Experience
SOMA-SQL: Resolving Multi-Source Ambiguity in NL-to-SQL via Synthetic Log and Execution Probing
Robust Active Learning for Few-Shot Example Selection in Text-to-SQL
ZAS-SQL: Distilling Rules from Failures for Zero-Shot Text-to-SQL
UniQL: Towards Dialect-Universal Benchmarking for Text-to-SQL
Progress-SQL: Improving Reinforcement Learning for Text-to-SQL via Progressive Rewards
ACE-SQL: Adaptive Co-Optimization via Empirical Credit Assignment for Text-to-SQL
ProSPy: A Profiling-Driven SQL-Python Agentic Framework for Enterprise Text-to-SQL
Bootstrapping Semantic Layer from Execution for Text-to-SQL
SANE Schema-aware Natural-language Evaluation of Biological Data
EntSQL: A Benchmark for Grounding Text-to-SQL in Long-Context Enterprise Knowledge
CAPER: Clause-Aligned Process Supervision for Text-to-SQL
BADGER: Bridging Agentic and Deterministic Evaluation for Generative Enterprise Reasoning
Benchmarking Local LLMs for Natural-Language-to-SQL Querying in Biopharmaceutical Manufacturing: An Empirical Benchmark on Consumer-Grade Hardware
SIRIUS-SQL: Anchoring Multi-Candidate Text-to-SQL in Execution Feedback
Learning to Retrieve: Dual-Level Long-Term Memory for Text-to-SQL Agents
Sophrosyne: Agentic Exploration of Relational Data Systems Needs Moderation
DisasterLex: An Expert Concept-to-Schema Knowledge Graph for Geospatial Reasoning in Disaster Analytics
EviLink: Multi-Path Schema Linking with Uncertainty-Guided Evidence Acquisition for Large-Scale Text-to-SQL
Memory Architectures for Multi-Turn Text-to-SQL: A Benchmark and Empirical Study
Residual Skill Optimization for Text-to-SQL Ensembles
AgentNLQ: A General-Purpose Agent for Natural Language to SQL
Knowledge Distillation for Low-Resource Open-source Text-to-SQL Model
<question, SQL> pairs are scarce, particularly for domain-specific databases. Additional challenges include opaque schema definitions, abbreviations, and implicit business logic that are not explicitly encoded in the schema. Existing data synthesis and prompting techniques improve coverage but often fail to produce task-specific, semantically grounded examples aligned with database constraints. To address these challenges, we propose a knowledge-aware Text-to-SQL framework that constructs task-specific knowledge base including schema semantics, abbreviations, business logic, and query patterns, and injects them into both training and inference. This framework generates diverse, contextually grounded synthetic training data and enhances inference through targeted knowledge retrieval. Experiments on seven benchmarks, covering both general and domain-specific datasets, demonstrate that our approach substantially improves the performance of open-source and closed-source large language models in Text-to-SQL tasks, especially in low-resource domain-specific settings, enhancing generalization, robustness, and adaptability.