A Survey of Text-to-SQL in the Era of LLMs: Where Are We, and Where Are We Going?
A structured English digest of the arXiv survey (August 2024) originally shared on zhichai.net.
- Source: https://arxiv.org/abs/2408.05109
- Authors: Xinyu Liu, Shuyu Shen, Boyan Li, Peixian Ma, Runzhi Jiang, Yuxin Zhang, et al. (10 authors)
- Type: Survey
- Category: Querying Structured Information
- Problem: Text-to-SQL — translating natural language questions into executable SQL — is a core bottleneck for natural-language access to relational databases, and LLMs have reshaped both the methods and evaluation of this task.
- Unified view: The survey consolidates a decade of work (from pre-LLM seq2seq models to modern instruction-tuned and reasoning LLMs) into a comparable framework rather than treating papers as isolated contributions.
- Pipeline decomposition: It breaks down the modern Text-to-SQL stack into schema linking, prompt construction, in-context examples, fine-tuning, query decomposition/planning, tool use, and self-correction / execution-feedback refinement.
- Benchmarks: Covers widely used datasets such as Spider, BIRD, and WikiSQL, and discusses evaluation metrics and their limitations (execution accuracy vs. exact match, dataset leakage, and generalization to unseen schemas and SQL dialects).
- LLM-era techniques: Reviews prompting strategies, retrieval-augmented schema/example selection, decomposition-based reasoning for complex queries, and agentic designs that interleave generation with execution feedback.
- Open problems: Evaluation trustworthiness, hallucinated or unsafe SQL, latency/cost constraints, cross-domain and cross-dialect generalization, and applicability to private enterprise schemas with complex metadata.
- A Survey on Employing Large Language Models for Text-to-SQL Tasks (May 2024)
- Next-Generation Database Interfaces: A Survey of LLM-based Text-to-SQL (arXiv:2406.08426)
- Large language model for table processing: a survey (Jan 2025, Frontiers)
- Querying Databases with Function Calling (arXiv:2502.00032, Jan 2025)
Key points
Positioning and evolution
The survey traces the field's trajectory: early neural seq2seq approaches, pre-trained encoder-based models, then the explosion of LLM-based methods from 2023 onward. It situates Text-to-SQL at the intersection of natural language understanding, structured data access, and LLM tool-calling/agentic paradigms.
Related works referenced by the list
Takeaways
1. For researchers: Attention should move beyond Spider-style leaderboards toward realistic settings — large schemas, ambiguous questions, dialect diversity, and measurable cost/latency trade-offs. 2. For engineers: Execution-feedback loops and schema-aware retrieval are the most practically impactful components; benchmark numbers should be validated against private-schema behavior. 3. For evaluation: Offline execution accuracy alone is insufficient; citation-style verification of generated SQL and human audits are increasingly important as LLM-as-judge methods spread.
*Note: This digest is based on the original post and public metadata; consult the PDF for precise quantitative claims.*