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

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Shen, Zhili, Vougiouklis, Pavlos, Diao, Chenxin, Vyas, Kaustubh, Ji, Yuanyi, Pan, Jeff Z.
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866915004354134016
author Shen, Zhili
Vougiouklis, Pavlos
Diao, Chenxin
Vyas, Kaustubh
Ji, Yuanyi
Pan, Jeff Z.
author_facet Shen, Zhili
Vougiouklis, Pavlos
Diao, Chenxin
Vyas, Kaustubh
Ji, Yuanyi
Pan, Jeff Z.
contents 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 $\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 $500$M parameters, to act as an extremely efficient approximator, enhancing it with the ability to process schemata in a parallelised manner. We apply $\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.
format Preprint
id arxiv_https___arxiv_org_abs_2407_03227
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Improving Retrieval-augmented Text-to-SQL with AST-based Ranking and Schema Pruning
Shen, Zhili
Vougiouklis, Pavlos
Diao, Chenxin
Vyas, Kaustubh
Ji, Yuanyi
Pan, Jeff Z.
Computation and Language
Artificial Intelligence
Databases
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 $\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 $500$M parameters, to act as an extremely efficient approximator, enhancing it with the ability to process schemata in a parallelised manner. We apply $\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.
title Improving Retrieval-augmented Text-to-SQL with AST-based Ranking and Schema Pruning
topic Computation and Language
Artificial Intelligence
Databases
url https://arxiv.org/abs/2407.03227