MAG-SQL: Multi-Agent Generative Approach with Soft Schema Linking and Iterative Sub-SQL Refinement for Text-to-SQL

要約

最近のインコンテキスト学習ベースの手法は、Text-to-SQL タスクで目覚ましい成功を収めています。
ただし、これらのモデルのパフォーマンスと、複雑なデータベース スキーマや BIRD などの難しい質問を含むデータセットに対する人間のパフォーマンスとの間には、依然として大きなギャップがあります。
さらに、既存の研究では、質問分解法を使用して質問を反復的に解く際の中間ステップの監視が無視されており、これらの研究で使用されているスキーマリンク手法は非常に初歩的です。
これらの問題に対処するために、ソフト スキーマ リンクと反復的な Sub-SQL 改良を備えたマルチエージェント生成アプローチである MAG-SQL を提案します。
私たちのフレームワークでは、テーブルの概要を含むエンティティベースの方法を使用してデータベース内の列を選択し、新しいターゲット条件分解方法を導入して複雑な質問を分解します。
さらに、サブ SQL ジェネレーターとサブ SQL リファイナーを含む反復生成モジュールを構築し、生成の各ステップに外部監視を導入します。
一連のアブレーション研究を通じて、私たちのフレームワークにおける各薬剤の有効性が実証されました。
GPT-4 を使用した BIRD ベンチマークで評価した場合、MAG-SQL は 61.08\% の実行精度を達成しました。これに対し、バニラ GPT-4 のベースライン精度は 46.35\%、MAC-SQL のベースライン精度は 57.56\% でした。
さらに、私たちのアプローチは Spider でも同様の進歩をもたらしました。

要約(オリジナル)

Recent In-Context Learning based methods have achieved remarkable success in Text-to-SQL task. However, there is still a large gap between the performance of these models and human performance on datasets with complex database schema and difficult questions, such as BIRD. Besides, existing work has neglected to supervise intermediate steps when solving questions iteratively with question decomposition methods, and the schema linking methods used in these works are very rudimentary. To address these issues, we propose MAG-SQL, a multi-agent generative approach with soft schema linking and iterative Sub-SQL refinement. In our framework, an entity-based method with tables’ summary is used to select the columns in database, and a novel targets-conditions decomposition method is introduced to decompose those complex questions. Additionally, we build a iterative generating module which includes a Sub-SQL Generator and Sub-SQL Refiner, introducing external oversight for each step of generation. Through a series of ablation studies, the effectiveness of each agent in our framework has been demonstrated. When evaluated on the BIRD benchmark with GPT-4, MAG-SQL achieves an execution accuracy of 61.08\%, compared to the baseline accuracy of 46.35\% for vanilla GPT-4 and the baseline accuracy of 57.56\% for MAC-SQL. Besides, our approach makes similar progress on Spider.

arxiv情報

著者 Wenxuan Xie,Gaochen Wu,Bowen Zhou
発行日 2024-08-15 04:57:55+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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