Knowledge-to-SQL: Enhancing SQL Generation with Data Expert LLM

要約

SQL の生成にはクエリとデータベースを理解し、それに応じてデータベースから正確なデータを取得する必要があるため、ユーザー クエリに対する正確な SQL の生成 (text-to-SQL) は長年にわたる問題です。
既存のモデルは、データベース スキーマに従って SQL を生成する大規模言語モデル (LLM) の包括的な機能に依存しています。
ただし、データベース スキーマに明示的に含まれていない、または LLM によって学習された必要な知識がいくつかあります。
したがって、知識が不十分なクエリの生成された SQL は不正確になる可能性があり、テキストから SQL へのモデルの堅牢性に悪影響を及ぼします。
この状況に対処するために、私たちは Knowledge-to-SQL フレームワークを提案します。このフレームワークは、カスタマイズされた Data Expert LLM (DELLM) を採用して、あらゆる種類の text-to-SQL モデルに役立つ知識を提供します。
具体的には、テーブルの読み取りに関する DELLM の詳細な設計と、基本的な微調整プロセスを提供します。
さらに、DELLM が LLM にとってより役立つ知識を生成できるよう、データベース フィードバックによる優先学習 (PLDBF) トレーニング戦略を提供しています。
広範な実験により、DELLM がテキストから SQL へのタスクで最先端の LLM を強化できることが検証されました。
DELLM のモデル構造とパラメータの重みは、さらなる研究のために公開されています。

要約(オリジナル)

Generating accurate SQL for user queries (text-to-SQL) is a long-standing problem since the generation of the SQL requires comprehending the query and database and retrieving the accurate data from the database accordingly. Existing models rely on the comprehensive ability of Large Language Models (LLMs) to generate the SQL according to the database schema. However, there is some necessary knowledge that is not explicitly included in the database schema or has been learned by LLMs. Thus, the generated SQL of the knowledge-insufficient queries may be inaccurate, which negatively impacts the robustness of the text-to-SQL models. To deal with this situation, we propose the Knowledge-to-SQL framework, which employs tailored Data Expert LLM (DELLM) to provide helpful knowledge for all types of text-to-SQL models. Specifically, we provide the detailed design of DELLM, in terms of table reading, and the basic fine-tuning process. We further provide a Preference Learning via Database Feedback (PLDBF) training strategy to guide the DELLM to generate more helpful knowledge for LLMs. Extensive experiments verify DELLM can enhance the state-of-the-art LLMs on text-to-SQL tasks. The model structure and the parameter weight of DELLM are released for further research.

arxiv情報

著者 Zijin Hong,Zheng Yuan,Hao Chen,Qinggang Zhang,Feiran Huang,Xiao Huang
発行日 2024-03-07 13:43:03+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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