Skip to main content
QUICK REVIEW

[論文レビュー] Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs

Jinyang Li, Binyuan Hui|arXiv (Cornell University)|May 4, 2023
Topic ModelingComputer Science被引用数 79
ひとこと要約

Birdは、実世界のデータベースを対象にした大規模なクロスドメインText-to-SQLベンチマークで、巨大な値、ノイズの多いデータ、外部知識の根拠付けと実行効率に焦点を当てており、現状のSOTA LLMは人間の性能に大きく及ばないことを示している。

ABSTRACT

Text-to-SQL parsing, which aims at converting natural language instructions into executable SQLs, has gained increasing attention in recent years. In particular, Codex and ChatGPT have shown impressive results in this task. However, most of the prevalent benchmarks, i.e., Spider, and WikiSQL, focus on database schema with few rows of database contents leaving the gap between academic study and real-world applications. To mitigate this gap, we present Bird, a big benchmark for large-scale database grounded in text-to-SQL tasks, containing 12,751 pairs of text-to-SQL data and 95 databases with a total size of 33.4 GB, spanning 37 professional domains. Our emphasis on database values highlights the new challenges of dirty database contents, external knowledge between NL questions and database contents, and SQL efficiency, particularly in the context of massive databases. To solve these problems, text-to-SQL models must feature database value comprehension in addition to semantic parsing. The experimental results demonstrate the significance of database values in generating accurate text-to-SQLs for big databases. Furthermore, even the most effective text-to-SQL models, i.e. ChatGPT, only achieves 40.08% in execution accuracy, which is still far from the human result of 92.96%, proving that challenges still stand. Besides, we also provide an efficiency analysis to offer insights into generating text-to-efficient-SQLs that are beneficial to industries. We believe that BIRD will contribute to advancing real-world applications of text-to-SQL research. The leaderboard and source code are available: https://bird-bench.github.io/.

研究の動機と目的

  • 大規模でノイズの多いデータベースを持つ実世界アプリケーションと、学術的なText-to-SQLベンチマークとのギャップを埋める。
  • データベース値、外部知識、実行効率を重視する大規模ベンチマーク(Bird)を導入する。
  • 現在のモデルの限界を明らかにし、今後の研究を導く評価指標とベースラインを提供する。

提案手法

  • 37ドメインにわたる95データベース(33.4 GB)から12,751のText-to-SQLペアを精選する。
  • 注釈作成を支援するためのDatabase Description Filesと外部知識証拠カテゴリを開発する。
  • 真偽性を確保するために、二重盲検のSQL注釈プロセスを用いて真値SQLを取得する。
  • SQLの実行妥当性と効率を総合的に評価するValid Efficiency Score (VES)を定義する。
  • 知識あり/なし設定の下で、T5モデルを用いたファインチューニング(FT)と、LLMs (ChatGPT, Claude-2, GPT-4 など)を用いたインコンテキスト学習(ICL)を評価する。
  • 大きな値とノイズのための難易度の上昇を示すために、BirdをSpiderとWikiSQLと比較する。

実験結果

リサーチクエスチョン

  • RQ1大型のデータベースとノイズのある値を持つText-to-SQLタスクで、LLMsは一般化できるか?
  • RQ2外部知識の根拠付けと実行効率は、実世界の大規模データベースに対するText-to-SQLの性能にどう影響するか?
  • RQ3Birdにおける現在のSOTAモデル(LLMs)と人間の性能とのギャップはどれくらいで、なぜか?
  • RQ4異なる注釈・評価設定(例:二重盲検SQL注釈、知識証拠)がベンチマーク結果にどう影響するか?

主な発見

  • Birdは37ドメインにわたる95データベース(33.4 GB)で12,751の例を含み、実世界の値の課題を浮き彫りにしている。
  • 最も強力なLLM(GPT-4)でも実行精度はわずか54.89%にとどまり、人間の性能(92.96%)には及ばない。
  • 外部知識証拠は、難易度レベルを問わずモデルの性能を著しく向上させる。
  • 知識の根拠付け、データベース値の理解、クエリの効率は、実世界のText-to-SQL成功にとって極めて重要である。
  • 二段階最適化(セマンティックパーシング、次にSQL最適化)は、結果を維持しつつ、平均で約77.75%の時間節約といった大幅なスピードアップをもたらす。
  • Chat-with-Databaseとインデックスチューニングにより、SQLクエリの時間を最大で約87.3%節約できる。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。