A new survey examines the architectures and strategies behind large language model (LLM) systems that translate natural-language questions into executable SQL. It reviews more than 100 papers and technical resources, focusing on work published from 2022 to 2026, and organizes the field into five broad approaches: in-context learning, fine-tuning, agentic and tool-augmented systems, retrieval-augmented generation, and reinforcement learning.

Text-to-SQL aims to make relational databases easier to query without requiring users to write SQL themselves. Earlier systems relied on handcrafted rules and templates, followed by neural models that introduced encoder-decoder architectures, schema linking and constrained decoding. The survey describes how LLM-based methods have expanded the field, with systems including ReFoRCE, Agentar-Scale-SQL, Snowflake’s Arctic-Text2SQL-R1 and the modular XiYan-SQL framework.

Rather than treating SQL generation as a single step, many newer systems split it into tasks such as identifying relevant schema elements, drafting a query, repairing errors and ranking candidate outputs. Agentic approaches coordinate specialized components or agents, and may use database tools, validators and execution feedback to improve results. The survey also treats reinforcement learning as a distinct approach, including methods that use execution-based rewards.

The authors discuss evaluation metrics and benchmarks including Spider, Spider 2.0 and BIRD, alongside challenges that remain for real-world use. These include generalizing to unfamiliar database schemas, handling ambiguity in questions, grounding values such as dates and names, and balancing computational cost with response speed.

The survey also addresses the semantic layer used in production systems and responsible AI considerations when models interact with sensitive databases. Its coverage includes privacy, transparency, bias, security and governance, as well as practical deployment topics such as schema management, caching, SQL debugging and inference scheduling.

Sources: arXiv cs.AI.