E-SQL: Direct Schema Linking via Question Enrichment in Text-to-SQL

要約

自然言語クエリを構造化クエリ言語 (Text-to-SQL または NLQ-to-SQL) に変換することは、データベース (NLIDB) への自然言語インターフェイスを提供することを目的として、自然言語処理コミュニティとデータベース コミュニティの両方によって広範に研究されている重要なタスクです。
非専門家に対する障壁を下げる。
大規模言語モデル (LLM) の使用による最近の進歩にもかかわらず、大きな課題が残っています。
これには、複雑なデータベース スキーマの処理、ユーザー クエリのあいまいさの解決、ユーザーの意図を正確に反映する複雑な構造を持つ SQL クエリの生成などが含まれます。
この研究では、スキーマの直接リンクと述語候補の拡張を通じてこれらの課題に対処するために特別に設計された新しいパイプラインである E-SQL を紹介します。
E-SQL は、関連するデータベース項目 (つまり、テーブル、列、値) と条件を質問に直接組み込むことで自然言語クエリを強化し、クエリとデータベース構造の間のギャップを橋渡しします。
このパイプラインは、候補述語の拡張を利用して、生成された SQL 内の誤った述語または不完全な述語を軽減します。
私たちは、以前の研究で広く調査された手法であるスキーマ フィルタリングの影響をさらに調査し、高度な大規模言語モデルと併用した場合にその効果が逓減することを実証します。
BIRD ベンチマークの包括的な評価では、E-SQL が競争力のあるパフォーマンスを達成しており、特に複雑なクエリで優れており、テスト セットで 66.29% の実行精度を示しています。
報告された結果を再現するために必要なコードはすべて、GitHub リポジトリで公開されています。

要約(オリジナル)

Translating Natural Language Queries into Structured Query Language (Text-to-SQL or NLQ-to-SQL) is a critical task extensively studied by both the natural language processing and database communities, aimed at providing a natural language interface to databases (NLIDB) and lowering the barrier for non-experts. Despite recent advancements made through the use of Large Language Models (LLMs), significant challenges remain. These include handling complex database schemas, resolving ambiguity in user queries, and generating SQL queries with intricate structures that accurately reflect the user’s intent. In this work, we introduce E-SQL, a novel pipeline specifically designed to address these challenges through direct schema linking and candidate predicate augmentation. E-SQL enhances the natural language query by incorporating relevant database items (i.e., tables, columns, and values) and conditions directly into the question, bridging the gap between the query and the database structure. The pipeline leverages candidate predicate augmentation to mitigate erroneous or incomplete predicates in generated SQLs. We further investigate the impact of schema filtering, a technique widely explored in previous work, and demonstrate its diminishing returns when applied alongside advanced large language models. Comprehensive evaluations on the BIRD benchmark illustrate that E-SQL achieves competitive performance, particularly excelling in complex queries with a 66.29% execution accuracy on the test set. All code required to reproduce the reported results is publicly available on our GitHub repository.

arxiv情報

著者 Hasan Alp Caferoğlu,Özgür Ulusoy
発行日 2024-09-25 09:02:48+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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