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

Zhenhe Wu, Zhongqiu Li, Jie Zhang, Mengxiang Li, Yu Zhao +5 more
7/11/2024
cs.CL

No confident code implementation found for this paper. 4 possible matches can be shown below.

Abstract

Large language models (LLMs) with in-context learning have significantly improved the performance of text-to-SQL task. Previous works generally focus on using exclusive SQL generation prompt to improve the LLMs' reasoning ability. However, they are mostly hard to handle large databases with numerous tables and columns, and usually ignore the significance of pre-processing database and extracting valuable information for more efficient prompt engineering. Based on above analysis, we propose RB-SQL, a novel retrieval-based LLM framework for in-context prompt engineering, which consists of three modules that retrieve concise tables and columns as schema, and targeted examples for in-context learning. Experiment results demonstrate that our model achieves better performance than several competitive baselines on public datasets BIRD and Spider.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 4 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{wu2024rbsql,
  title  = {RB-SQL: A Retrieval-based LLM Framework for Text-to-SQL},
  author = {Zhenhe Wu and Zhongqiu Li and Jie Zhang and Mengxiang Li and Yu Zhao and Ruiyu Fang and Zhongjiang He and Xuelong Li and Zhoujun Li and Shuangyong Song},
  year   = {2024},
  eprint = {2407.08273},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2407.08273v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2407.08273.svg)](https://codeofpaper.com/paper/2407.08273)

Discussion