Is Long Context All You Need? Leveraging LLM’s Extended Context for NL2SQL

要約

大規模な言語モデル(LLM)は、さまざまな自然言語処理タスクにわたって印象的な機能を実証しています。
特に、推論能力の改善とコンテキストウィンドウの拡張により、これらの強力なモデルを活用するための新しい手段が開かれました。
NL2SQLは、自然言語の質問が本質的に曖昧であるという点で挑戦的ですが、SQL生成は複雑なデータスキーマとセマンティクスを正確に理解する必要があります。
このセマンティックな曖昧な問題に対するアプローチの1つは、より多くの十分なコンテキスト情報を提供することです。
この作業では、Googleの最先端のLLM(\ TextIT {gemini-1.5-pro})が提供する拡張コンテキストウィンドウ(別名、長いコンテキスト)のパフォーマンスとレイテンシトレードオフを調査します。
列の例の値、質問とSQLクエリのペア、ユーザーが提供するヒント、SQLドキュメント、スキーマなど、さまざまなコンテキスト情報の影響を調査します。
私たちの知る限り、これは、拡張されたコンテキストウィンドウと追加のコンテキスト情報が、精度と潜時コストの両方に関してNL2SQLの生成をどのように役立つかを研究するための最初の作業です。
長いコンテキストLLMが堅牢であり、拡張されたコンテキスト情報で迷子にならないことを示します。
さらに、Googleの\ textit {gemini-pro-1.5}に基づく長いコンテキストNL2SQLパイプラインは、微調整と高価な自己整合に基づくテクニックなしで、さまざまなベンチマークデータセットで強力なパフォーマンスを実現します。

要約(オリジナル)

Large Language Models (LLMs) have demonstrated impressive capabilities across a range of natural language processing tasks. In particular, improvements in reasoning abilities and the expansion of context windows have opened new avenues for leveraging these powerful models. NL2SQL is challenging in that the natural language question is inherently ambiguous, while the SQL generation requires a precise understanding of complex data schema and semantics. One approach to this semantic ambiguous problem is to provide more and sufficient contextual information. In this work, we explore the performance and the latency trade-offs of the extended context window (a.k.a., long context) offered by Google’s state-of-the-art LLM (\textit{gemini-1.5-pro}). We study the impact of various contextual information, including column example values, question and SQL query pairs, user-provided hints, SQL documentation, and schema. To the best of our knowledge, this is the first work to study how the extended context window and extra contextual information can help NL2SQL generation with respect to both accuracy and latency cost. We show that long context LLMs are robust and do not get lost in the extended contextual information. Additionally, our long-context NL2SQL pipeline based on Google’s \textit{gemini-pro-1.5} achieve strong performances on various benchmark datasets without finetuning and expensive self-consistency based techniques.

arxiv情報

著者 Yeounoh Chung,Gaurav T. Kakkar,Yu Gan,Brenton Milne,Fatma Ozcan
発行日 2025-03-20 17:39:13+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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