RB-SQL: A Retrieval-based LLM Framework for Text-to-SQL

ACL ARR 2024 June Submission853 Authors

13 Jun 2024 (modified: 06 Aug 2024)ACL ARR 2024 June SubmissionEveryoneRevisionsBibTeXCC BY 4.0
Abstract: Large language models (LLMs) with In-context learning has significantly improved the performance of text-to-SQL task. Previous works generally focus on using exclusive SQL generation prompt methods to improve the LLMs' reasoning ability. However, they usually ignore significance of the tables and columns related to the question, as well as the skeleton with SQL syntactic structure to alleviate errors and hallucination in SQL generation process. In this paper, we propose a novel retrieval-based text-to-SQL framework for In-context learning prompt construction, which consists of three models that retrieve tables, columns, and SQL skeleton respectively. Our experimental results and comprehensive analysis demonstrate the effectiveness of the proposed framework and achieve SOTA performance on two cross-domain text-to-SQL datasets (BIRD and Spider).
Paper Type: Long
Research Area: NLP Applications
Research Area Keywords: Generation, Information Retrieval and Text Mining, Machine Learning for NLP
Contribution Types: Model analysis & interpretability
Languages Studied: English
Submission Number: 853
Loading