Lune

EMNLP2024Top-tier venue

Improving Retrieval-augmented Text-to-SQL with AST-based Ranking and Schema Pruning

Zhili Shen, Pavlos Vougiouklis, Chenxin Diao, Kaustubh Vyas, Yuanyi Ji, Jeff Z. Pan

Abstract

We focus on Text-to-SQL semantic parsing from the perspective of retrieval-augmented generation. Motivated by challenges related to the size of commercial database schemata and the deployability of business intelligence solutions, we propose ASTRES that dynamically retrieves input database information and uses abstract syntax trees to select few-shot examples for in-context learning. Furthermore, we investigate the extent to which an in-parallel semantic parser can be leveraged for generating approximated versions of the expected SQL queries, to support our retrieval. We take this approach to the extreme-we adapt a model consisting of less than 500M parameters, to act as an extremely efficient approximator, enhancing it with the ability to process schemata in a parallelised manner. We apply ASTRES to monolingual and crosslingual benchmarks for semantic parsing, showing improvements over state-of-the-art baselines. Comprehensive experiments highlight the contribution of modules involved in this retrieval-augmented generation setting, revealing interesting directions for future work.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

7 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors cites RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
  • Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL Errors cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
  • ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL cites RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
  • ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQL cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
  • SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query Optimizer cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
  • Dialect-SQL: An Adaptive Framework for Bridging the Dialect Gap in Text-to-SQL cites RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
  • Dialect-SQL: An Adaptive Framework for Bridging the Dialect Gap in Text-to-SQL cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • Dialect-SQL: An Adaptive Framework for Bridging the Dialect Gap in Text-to-SQL cites Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation
  • Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation cites RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL
  • Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation cites DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-Correction
  • Text-to-SQL Empowered by Large Language Models: A Benchmark Evaluation cites MPNet: Masked and Permuted Pre-training for Language Understanding
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers7

  1. ReEx-SQL: Reasoning with Execution-Aware Reinforcement Learning for Text-to-SQLYaxun Dai, Wenxuan Xie, Xialie Zhuang, Tianyu Yang et al.ACL 2026 · 8 citations
  2. SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query OptimizerHanwen Liu, Qihan Zhang, Ryan Marcus, Ibrahim SabekSIGMOD 2026 · 2 citations
  3. Dialect-SQL: An Adaptive Framework for Bridging the Dialect Gap in Text-to-SQLJie Shi, Xi Cao, Bo Xu, Jiaqing Liang et al.EMNLP 2025 · 2 citations
  4. Understanding, Detecting, and Repairing Real-World In-Context-Learning-Based Text-to-SQL ErrorsJiawei Shen, Chengcheng Wan, Ruoyi Qiao, Jiazhen Zou et al.FSE 2026 · 1 citation
  5. From an LLM Swarm to a PDDL-empowered Hive: Planning Self-executed Instructions in a Multi-modal JungleKaustubh Vyas, Damien Graux, Yijun Yang, Sébastien Montella et al.ICLR 2025

Builds on13

  1. MPNet: Masked and Permuted Pre-training for Language UnderstandingKaitao Song, Xu Tan, Tao Qin, Jianfeng Lu et al.NeurIPS 2020 · 1,957 citations
  2. Teaching Large Language Models to Self-DebugXinyun Chen, Maxwell Lin, Nathanael Schärli, Denny ZhouICLR 2024 · 1,085 citations
  3. DIN-SQL: Decomposed In-Context Learning of Text-to-SQL with Self-CorrectionMohammadreza Pourreza, Davood RafieiNeurIPS 2023 · 909 citations
  4. Text-to-SQL Empowered by Large Language Models: A Benchmark EvaluationDawei Gao, Haibin Wang, Yaliang Li, Xiuyu Sun et al.VLDB 2024 · 609 citations
  5. RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQLHaoyang Li, Jing Zhang, Cuiping Li, Hong ChenAAAI 2023 · 343 citations

Related papers

  1. XRICL: Cross-lingual Retrieval-Augmented In-Context Learning for Cross-lingual Text-to-SQL Semantic ParsingPeng Shi, Rui Zhang, He Bai, Jimmy LinEMNLP Findings 2022 · 29 citations
  2. Diverse Parallel Data Synthesis for Cross-Database Adaptation of Text-to-SQL ParsersAbhijeet Awasthi, Ashutosh Sathe, Sunita SarawagiEMNLP 2022 · 7 citations
  3. SchemaRAG: A Schema-aware Retrieval-Augmented Generation Framework for Text-to-SQLDi Wu, Zetong Tang, Yi He, Xin LuoSIGMOD 2026 · 9 citations
  4. AID-SQL: Adaptive In-Context Learning of Text-to-SQL with Difficulty-Aware Instruction and Retrieval-Augmented GenerationXiuwen Li, Qifeng Cai, Yang Shu, Chenjuan Guo et al.ICDE 2025 · 9 citations
  5. G³R: A Graph-Guided Generate-and-Rerank Framework for Complex and Cross-domain Text-to-SQL GenerationYanzheng Xiang, Qian-Wen Zhang, Xu Zhang, Zejie Liu et al.ACL Findings 2023 · 3 citations
Dusk over the sea between two cliffs drawn in fine vertical lines