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

要約

最近、Large Language Model (LLM) がさまざまなドメインやタスクにおいて強力な能力を備えていることが証明されています。
私たちはテキストから SQL へのタスクにおけるプロンプト設計の問題を研究し、SQL クエリを生成する際の LLM の推論能力を向上させることを試みます。
簡単な少数ショットのコンテキスト内学習設定に加えて、スキーマ リンクと同様の方法を使用して思考連鎖 (CoT) プロンプトを設計します。
自動 CoT イグザンプラを自動的に生成する ACT-SQL というメソッドが提供されているため、プロセス全体で手動のラベル付けが必要ありません。
私たちのアプローチは、1 つの SQL クエリを生成するときに LLM の API 呼び出しを 1 回だけ使用するため、コストが節約されます。
さらに、コンテキスト内学習メソッドを、複数ターンのテキストから SQL へのタスクに拡張します。
実験結果は、LLM のパフォーマンスが ACT-SQL アプローチから恩恵を受けることができることを示しています。
私たちのアプローチは、既存のインコンテキスト学習アプローチの中で、Spider dev set 上で SOTA パフォーマンスを達成します。

要約(オリジナル)

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.

arxiv情報

著者 Hanchong Zhang,Ruisheng Cao,Lu Chen,Hongshen Xu,Kai Yu
発行日 2023-10-26 12:16:25+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL パーマリンク