CLOct 26, 2023

ACT-SQL: In-Context Learning for Text-to-SQL with Automatically-Generated Chain-of-Thought

arXiv:2310.17342v1158 citationsh-index: 23
Originality Highly original
AI Analysis

This addresses the challenge of manual prompt design for text-to-SQL conversion, offering a cost-saving solution for database query generation.

The paper tackles the problem of improving large language models' reasoning in text-to-SQL tasks by designing an automatically-generated chain-of-thought prompt, achieving state-of-the-art performance on the Spider dev set among in-context learning approaches.

Recently Large Language Models (LLMs) have been proven to have strong abilities in various domains and tasks. We study the problem of prompt designing in the text-to-SQL task and attempt to improve the LLMs' reasoning ability when generating SQL queries. Besides the trivial few-shot in-context learning setting, we design our chain-of-thought (CoT) prompt with a similar method to schema linking. We provide a method named ACT-SQL to automatically generate auto-CoT exemplars and thus the whole process doesn't need manual labeling. Our approach is cost-saving since we only use the LLMs' API call once when generating one SQL query. Furthermore, we extend our in-context learning method to the multi-turn text-to-SQL task. The experiment results show that the LLMs' performance can benefit from our ACT-SQL approach. Our approach achieves SOTA performance on the Spider dev set among existing in-context learning approaches.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes