型規則に従う:宣言型プログラムにおけるLLM関数の制約推論
なぜ重要か: 企業や社会への影響が見込まれ、一般メディアにも波及する可能性があります。
arXiv:2509.20208v1発表タイプ:クロス
概要:宣言型問い合わせ言語にLLM駆動演算子を統合することにより、安価で解釈可能な関数と、強力で汎化可能な言語モデル推論を組み合わせることができます。しかし、SQLのようなデータベース問い合わせ言語の最適化された実行の恩恵を受けるためには、生成された出力は、型チェッカーとデータベースの内容の両方によって強制されるルールに合致する必要があります。現在のアプローチは、生成された出力とデータベース値の整合性を確保するために、多くのLLMベースの後処理呼び出しからなるオーケストレーションでこの課題に対処しており、パフォーマンスのボトルネックが生じています。本研究では、様々なサイズのオープンソース言語モデルがSQLベースの問い合わせ言語内で関数を解析および実行する能力について調査を行い、小規模な言語モデルがハイブリッドデータソース上での関数実行において優れた性能を示すことを明らかにしました。そして、LLM関数のwell-typednessを強制するための効率的なソリューションを提案し、マルチホップ質問応答データセットにおいて7%の精度向上、および同等のソリューションと比較して53%のレイテンシ向上を実証しました。実装はhttps://github.com/parkervg/blendsqlで公開しています。
原文(英語)を表示
Title (EN): Play by the Type Rules: Inferring Constraints for LLM Functions in Declarative Programs
arXiv:2509.20208v1 Announce Type: cross
Abstract: Integrating LLM powered operators in declarative query languages allows for the combination of cheap and interpretable functions with powerful, generalizable language model reasoning. However, in order to benefit from the optimized execution of a database query language like SQL, generated outputs must align with the rules enforced by both type checkers and database contents. Current approaches address this challenge with orchestrations consisting of many LLM-based post-processing calls to ensure alignment between generated outputs and database values, introducing performance bottlenecks. We perform a study on the ability of various sized open-source language models to both parse and execute functions within a query language based on SQL, showing that small language models can excel as function executors over hybrid data sources. Then, we propose an efficient solution to enforce the well-typedness of LLM functions, demonstrating 7% accuracy improvement on a multi-hop question answering dataset with 53% improvement in latency over comparable solutions. We make our implementation available at https://github.com/parkervg/blendsql
Published: 2025-09-24 19:00 UTC