English

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

Computation and Language 2024-11-05 v2 Artificial Intelligence Databases

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\text{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 500500M parameters, to act as an extremely efficient approximator, enhancing it with the ability to process schemata in a parallelised manner. We apply ASTReS\text{ASTReS} to monolingual and cross-lingual 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.

Keywords

Cite

@article{arxiv.2407.03227,
  title  = {Improving Retrieval-augmented Text-to-SQL with AST-based Ranking and Schema Pruning},
  author = {Zhili Shen and Pavlos Vougiouklis and Chenxin Diao and Kaustubh Vyas and Yuanyi Ji and Jeff Z. Pan},
  journal= {arXiv preprint arXiv:2407.03227},
  year   = {2024}
}

Comments

EMNLP 2024 Main

R2 v1 2026-06-28T17:28:07.449Z