Valid Text-to-SQL Generation with Unification-based DeepStochLog

要約

大規模な言語モデルは、自然言語の質問をSQLクエリに翻訳するために使用されています。
構文とデータベーススキーマのハード制約がなければ、実行可能ではない無効なクエリを作成することがあります。
これらの障害は、実際のシナリオでのこれらのシステムの使用を制限します。
SQLの構文とスキーマの制約を統一ベースの明確な節文法に課し、有効なクエリの生成を保証する神経共役フレームワークを提案します。
また、私たちのフレームワークは、自然言語の理解能力を活用するために、言語モデルへの双方向のインターフェースも構築しています。
SQL文法のサブセットの評価結果は、すべての出力クエリが有効であることを示しています。
この作業は、統一ベースの文法で言語モデルを拡張するための最初のステップです。
この拡張は、基礎となる言語モデルの有効性、実行精度、およびグラウンドトゥルースアライメントを大きなマージンで強化することを実証します。
私たちのコードは、https://github.com/ml-kuleuven/deepstochlog-lmで入手できます。

要約(オリジナル)

Large language models have been used to translate natural language questions to SQL queries. Without hard constraints on syntax and database schema, they occasionally produce invalid queries that are not executable. These failures limit the usage of these systems in real-life scenarios. We propose a neurosymbolic framework that imposes SQL syntax and schema constraints with unification-based definite clause grammars and thus guarantees the generation of valid queries. Our framework also builds a bi-directional interface to language models to leverage their natural language understanding abilities. The evaluation results on a subset of SQL grammars show that all our output queries are valid. This work is the first step towards extending language models with unification-based grammars. We demonstrate this extension enhances the validity, execution accuracy, and ground truth alignment of the underlying language model by a large margin. Our code is available at https://github.com/ML-KULeuven/deepstochlog-lm.

arxiv情報

著者 Ying Jiao,Luc De Raedt,Giuseppe Marra
発行日 2025-03-17 16:21:10+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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