mlsanityData to 7 Oct 2026

AV-SQL: Decomposing Complex Text-to-SQL Queries with Agentic Views

arXiv 2604.07041 ↗First posted 8 Apr 2026cs.DB cs.AI cs.ETcited by 1

On the map: LLM agents and tool use → Web, search, and research agents

Abstract (arXiv)

Text-to-SQL is the task of translating natural language queries into executable SQL for a given database, enabling non-expert users to access structured data without writing SQL manually. Despite rapid advances driven by large language models (LLMs), existing approaches still struggle with complex queries in real-world settings, where database schemas are large and questions require multi-step reasoning over many interrelated tables. In such cases, providing the full schema often exceeds the context window, while one-shot generation frequently produces non-executable SQL due to syntax errors and incorrect schema linking. To address these challenges, we introduce AV-SQL, a framework that decomposes complex Text-to-SQL into a pipeline of specialized LLM agents. Central to AV-SQL is the concept of agentic views: agent-generated Common Table Expressions (CTEs) that encapsulate intermediate query logic and filter relevant schema elements from large schemas. AV-SQL operates in three stages: (1) a rewriter agent compresses and clarifies the input query; (2) a view generator agent processes schema chunks to produce agentic views; and (3) a planner, generator, and revisor agent collaboratively compose these views into the final SQL query. Extensive experiments show that AV-SQL achieves 70.38% execution accuracy on the challenging Spider 2.0 benchmark, outperforming state-of-the-art baselines, while remaining competitive on standard datasets with 85.59% on Spider, 72.16% on BIRD and 63.78% on KaggleDBQA. Our source code is available at https://github.com/pminhtam/AV-SQL.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Web, search, and research agents, one of 16 directions in LLM agents and tool use. Builds on 27 of its 49 references that are in the map. First posted on arXiv 8 Apr 2026.

Builds on

27 of 49 references.

References · 27

  1. 2020Language Models are Few-Shot Learnerscited by 32,199
  2. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  3. 2020Retrieval-Augmented Generation for Knowledge-Intensive NLP Taskscited by 9,160
  4. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
  5. 2020MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformerscited by 1,414
  6. 2022Text Embeddings by Weakly-Supervised Contrastive Pre-trainingcited by 1,216
  7. 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
  8. 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
  9. 2023DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correctioncited by 465
  10. 2019RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parserscited by 420
  11. 2023Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluationcited by 378
  12. 2024Spider 2.0: Evaluating Language Models on Real-World Enterprise Text-to-SQL Workflowscited by 223
15 more
  1. 2023RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLcited by 191
  2. 2024CodeS: Towards Building Open-source Language Models for Text-to-SQLcited by 183
  3. 2023C3: Zero-shot Text-to-SQL with ChatGPTcited by 159
  4. 2024Seven Failure Points When Engineering a Retrieval Augmented Generation Systemcited by 138
  5. 2018Improving Text-to-SQL Evaluation Methodologycited by 133
  6. 2021LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relationscited by 119
  7. 2023A comprehensive evaluation of ChatGPT's zero-shot Text-to-SQL capabilitycited by 118
  8. 2023How to Train Your DRAGON: Diverse Augmentation Towards Generalizable Dense Retrievalcited by 116
  9. 2021KaggleDBQA: Realistic Evaluation of Text-to-SQL Parserscited by 105
  10. 2024MCS-SQL: Leveraging Multiple Prompts and Multiple-Choice Selection For Text-to-SQL Generationcited by 103
  11. 2022RASAT: Integrating Relational Structures into Pretrained Seq2Seq Model for Text-to-SQLcited by 85
  12. 2024A Preview of XiYan-SQL: A Multi-Generator Ensemble Framework for Text-to-SQLcited by 46
  13. 2025Is Long Context All You Need? Leveraging LLM's Extended Context for NL2SQLcited by 30
  14. 2025AutoLink: Autonomous Schema Exploration and Expansion for Scalable Schema Linking in Text-to-SQL at Scalecited by 15
  15. 2025Text-to-SQL as Dual-State Reasoning: Integrating Adaptive Context and Progressive Generationcited by 8

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2023MAC-SQL: A Multi-Agent Collaborative Framework for Text-to-SQL
  2. 2025BAPPA: Benchmarking Agents, Plans, and Pipelines for Automated Text-to-SQL Generation
  3. 2026DecoSearch: Complexity-Aware Routing and Plan-Level Repair for Text-to-SQL
  4. 2026APEX-SQL: Talking to the data via Agentic Exploration for Text-to-SQL
  5. 2025AGENTIQL: An Agent-Inspired Multi-Expert Framework for Text-to-SQL Generation
  6. 2025Text2Schema: Filling the Gap in Designing Database Table Structures based on Natural Language
  7. 2026AgentNLQ: A General-Purpose Agent for Natural Language to SQL
  8. 2025From Queries to Insights: Agentic LLM Pipelines for Spatio-Temporal Text-to-SQL