Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
41 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

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

Published 26 Oct 2023 in cs.CL

Abstract: Recently 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.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (5)
  1. Hanchong Zhang (10 papers)
  2. Ruisheng Cao (24 papers)
  3. Lu Chen (244 papers)
  4. Hongshen Xu (21 papers)
  5. Kai Yu (201 papers)
Citations (28)