ChatPaper.aiChatPaper

PARROT: クロスシステムSQL翻訳におけるLLM評価のためのベンチマーク

PARROT: A Benchmark for Evaluating LLMs in Cross-System SQL Translation

September 27, 2025
著者: Wei Zhou, Guoliang Li, Haoyu Wang, Yuxing Han, Xufei Wu, Fan Wu, Xuanhe Zhou
cs.AI

要旨

大規模言語モデル(LLM)は、Text-to-SQLタスクにおいてますます効果を発揮しています。しかし、別の密接に関連する問題である「クロスシステムSQL翻訳」(別名SQL-to-SQL)は、あるデータベースシステム(例:MySQL)向けに書かれたクエリを別のシステム(例:ClickHouse)向けの同等のクエリに適応させるという、実用上非常に重要な課題でありながら、まだ十分に研究されていません。既存のSQLベンチマークはSQL-to-SQL評価には適しておらず、(1) 限られたデータベースシステム(しばしばSQLiteのみ)に焦点を当てており、(2) 多くのシステム固有のSQL方言(例:カスタマイズされた関数、データ型、構文規則)を捉えることができません。そこで本論文では、実用的で現実的なクロスシステムSQL翻訳のベンチマークであるPARROTを紹介します。PARROTは、38のオープンソースベンチマークと実世界のビジネスサービスから収集した598の翻訳ペアで構成され、特にシステム固有のSQL理解を試すために準備されています(例:LLMの平均精度は38.53%未満)。また、28,003の翻訳を含むPARROT-Diverse(広範な構文テスト用)と5,306の代表的なサンプルを含むPARROT-Simple(集中ストレステスト用)など、複数のベンチマークバリアントを提供し、22のプロダクショングレードのデータベースシステムをカバーしています。今後の研究を促進するため、公開リーダーボードとソースコードを以下で公開しています:https://code4db.github.io/parrot-bench/。
English
Large language models (LLMS) have shown increasing effectiveness in Text-to-SQL tasks. However, another closely related problem, Cross-System SQL Translation (a.k.a., SQL-to-SQL), which adapts a query written for one database system (e.g., MySQL) into its equivalent one for another system (e.g., ClickHouse), is of great practical importance but remains underexplored. Existing SQL benchmarks are not well-suited for SQL-to-SQL evaluation, which (1) focus on a limited set of database systems (often just SQLite) and (2) cannot capture many system-specific SQL dialects (e.g., customized functions, data types, and syntax rules). Thus, in this paper, we introduce PARROT, a Practical And Realistic BenchmaRk for CrOss-System SQL Translation. PARROT comprises 598 translation pairs from 38 open-source benchmarks and real-world business services, specifically prepared to challenge system-specific SQL understanding (e.g., LLMS achieve lower than 38.53% accuracy on average). We also provide multiple benchmark variants, including PARROT-Diverse with 28,003 translations (for extensive syntax testing) and PARROT-Simple with 5,306 representative samples (for focused stress testing), covering 22 production-grade database systems. To promote future research, we release a public leaderboard and source code at: https://code4db.github.io/parrot-bench/.
PDF32September 30, 2025