PARROT: Een Benchmark voor het Evalueren van LLM's in Cross-Systeem SQL-vertaling
PARROT: A Benchmark for Evaluating LLMs in Cross-System SQL Translation
September 27, 2025
Auteurs: Wei Zhou, Guoliang Li, Haoyu Wang, Yuxing Han, Xufei Wu, Fan Wu, Xuanhe Zhou
cs.AI
Samenvatting
Grote taalmmodellen (LLM's) hebben een toenemende effectiviteit getoond in Text-to-SQL-taken. Een ander nauw verwant probleem, Cross-System SQL-vertaling (ook wel SQL-to-SQL genoemd), waarbij een query geschreven voor één databasesysteem (bijv. MySQL) wordt aangepast naar een equivalente query voor een ander systeem (bijv. ClickHouse), is van groot praktisch belang maar blijft onderbelicht. Bestaande SQL-benchmarks zijn niet goed geschikt voor SQL-to-SQL-evaluatie, omdat ze (1) zich richten op een beperkte set databasesystemen (vaak alleen SQLite) en (2) veel systeemspecifieke SQL-dialecten niet kunnen vastleggen (bijv. aangepaste functies, gegevenstypen en syntaxisregels). Daarom introduceren we in dit artikel PARROT, een Praktische en Realistische BenchmaRk voor CrOss-System SQL-vertaling. PARROT bestaat uit 598 vertaalparen afkomstig uit 38 open-source benchmarks en real-world bedrijfsservices, specifiek samengesteld om het begrip van systeemspecifieke SQL uit te dagen (bijv. LLM's behalen gemiddeld minder dan 38,53% nauwkeurigheid). We bieden ook meerdere benchmarkvarianten, waaronder PARROT-Diverse met 28.003 vertalingen (voor uitgebreide syntaxtesten) en PARROT-Simple met 5.306 representatieve voorbeelden (voor gerichte stresstesten), die 22 productieklasse databasesystemen bestrijken. Om toekomstig onderzoek te bevorderen, hebben we een openbaar leaderboard en broncode vrijgegeven op: 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/.