DCG-SQL: Enhancing In-Context Learning for Text-to-SQL with Deep Contextual Schema Link Graph

要約

自然言語の質問をSQLクエリに変換するText-to-SQLは、大規模な言語モデル(LLM)のコンテキスト学習で進歩しました。
ただし、既存の方法では、ランダムに選択されたデモンストレーションと比較してパフォーマンスの改善はほとんどありません。また、LLMS(例:LLAMA 3.1-8B)が使用されると、大幅なパフォーマンスが低下します。
これは、これらの方法が、有用なデモンストレーションを効果的に取得するのではなく、ハイパースケールLLMの本質的な機能に大きく依存していることを示しています。
この論文では、デモンストレーションを効果的に取得し、SQLクエリを生成するための新しいアプローチを提案します。
質問とそのデータベーススキーマ項目の間に重要な情報と意味関係を含む、深いコンテキストスキーマリンクグラフを構築します。
このグラフベースの構造により、テキスト間サンプルを効果的に表現し、コンテキスト学習のための有用なデモンストレーションの取得を可能にします。
クモのベンチマークでの実験結果は、当社のアプローチの有効性を示しており、ハイパースケールLLMと小型LLMの両方でSQL生成のパフォーマンスと効率の一貫した改善を示しています。
私たちのコードはリリースされます。

要約(オリジナル)

Text-to-SQL, which translates a natural language question into an SQL query, has advanced with in-context learning of Large Language Models (LLMs). However, existing methods show little improvement in performance compared to randomly chosen demonstrations, and significant performance drops when smaller LLMs (e.g., Llama 3.1-8B) are used. This indicates that these methods heavily rely on the intrinsic capabilities of hyper-scaled LLMs, rather than effectively retrieving useful demonstrations. In this paper, we propose a novel approach for effectively retrieving demonstrations and generating SQL queries. We construct a Deep Contextual Schema Link Graph, which contains key information and semantic relationship between a question and its database schema items. This graph-based structure enables effective representation of Text-to-SQL samples and retrieval of useful demonstrations for in-context learning. Experimental results on the Spider benchmark demonstrate the effectiveness of our approach, showing consistent improvements in SQL generation performance and efficiency across both hyper-scaled LLMs and small LLMs. Our code will be released.

arxiv情報

著者 Jihyung Lee,Jin-Seop Lee,Jaehoon Lee,YunSeok Choi,Jee-Hyong Lee
発行日 2025-05-26 13:19:10+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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