要約
大規模な言語モデル(LLMS)の最近の進歩により、単一テーブルクエリのテキストからSQLへのパフォーマンスが大幅に改善されました。
しかし、複雑なスキーマとリレーショナル操作により、マルチテーブルデータベースでは困難なままです。
既存の方法は、適切なテーブルと柱の取得、正確な結合と組合の生成、多様なスキーマ全体に一般化することに苦労しています。
これらの問題に対処するために、SQLロジック生成からスキーマ要素の検索を切り離す2段階のフレームワークであるUnjoinを紹介します。
最初の段階では、データベース内のすべてのテーブルの列名を、各列にテーブル名をプレフィックスすることにより、単一テーブル表現にマージします。
これにより、複雑なSQLロジックを記述する必要性に気を取られることなく、モデルが正確な検索に純粋に焦点を合わせることができます。
第2段階では、この単純化されたスキーマでSQLクエリが生成され、結合、組合、およびリレーショナルロジックを再構築することにより、元のスキーマにマッピングされます。
クモと鳥のデータセットの評価は、結合していないベースラインが一致するか、それを超えることを示しています。
Unjoinはスキーマ情報のみを使用します。これは、データアクセスや微調整を必要としないため、データベース全体でスケーラブルで適応可能になります。
要約(オリジナル)
Recent advances in large language models (LLMs) have greatly improved Text-to-SQL performance for single-table queries. But, it remains challenging in multi-table databases due to complex schema and relational operations. Existing methods often struggle with retrieving the right tables and columns, generating accurate JOINs and UNIONs, and generalizing across diverse schemas. To address these issues, we introduce UNJOIN, a two-stage framework that decouples the retrieval of schema elements from SQL logic generation. In the first stage, we merge the column names of all tables in the database into a single-table representation by prefixing each column with its table name. This allows the model to focus purely on accurate retrieval without being distracted by the need to write complex SQL logic. In the second stage, the SQL query is generated on this simplified schema and mapped back to the original schema by reconstructing JOINs, UNIONs, and relational logic. Evaluations on SPIDER and BIRD datasets show that UNJOIN matches or exceeds the state-of-the-art baselines. UNJOIN uses only schema information, which does not require data access or fine-tuning, making it scalable and adaptable across databases.
arxiv情報
著者 | Poojah Ganesan,Rajat Aayush Jha,Dan Roth,Vivek Gupta |
発行日 | 2025-05-23 17:28:43+00:00 |
arxivサイト | arxiv_id(pdf) |
提供元, 利用サービス
arxiv.jp, Google