ChatPaper.aiChatPaper

LLMSQL: Aggiornare WikiSQL per l'era degli LLM nel Text-to-SQL

LLMSQL: Upgrading WikiSQL for the LLM Era of Text-to-SQL

September 27, 2025
Autori: Dzmitry Pihulski, Karol Charchut, Viktoria Novogrodskaia, Jan Kocoń
cs.AI

Abstract

La conversione di domande in linguaggio naturale in query SQL (Text-to-SQL) consente agli utenti non esperti di interagire con database relazionali ed è da tempo un compito centrale per le interfacce in linguaggio naturale ai dati. Sebbene il dataset WikiSQL abbia svolto un ruolo chiave nelle prime ricerche su NL2SQL, il suo utilizzo è diminuito a causa di problemi strutturali e di annotazione, tra cui inconsistenze nella sensibilità alle maiuscole, discrepanze nei tipi di dati, errori di sintassi e domande senza risposta. Presentiamo LLMSQL, una revisione e trasformazione sistematica di WikiSQL progettata per l'era dei modelli linguistici di grandi dimensioni (LLM). Classifichiamo questi errori e implementiamo metodi automatizzati per la pulizia e la ri-annotazione. Per valutare l'impatto di questi miglioramenti, abbiamo testato diversi LLM, tra cui Gemma 3, LLaMA 3.2, Mistral 7B, gpt-oss 20B, Phi-3.5 Mini, Qwen 2.5, OpenAI o4-mini, DeepSeek R1 e altri. Piuttosto che essere un aggiornamento, LLMSQL viene introdotto come benchmark pronto per gli LLM: a differenza del WikiSQL originale, progettato per modelli a rete di puntatori che selezionano token dall'input, LLMSQL fornisce domande in linguaggio naturale pulite e query SQL complete come testo semplice, consentendo una generazione e valutazione diretta per i moderni modelli di conversione da linguaggio naturale a SQL.
English
Converting natural language questions into SQL queries (Text-to-SQL) enables non-expert users to interact with relational databases and has long been a central task for natural language interfaces to data. While the WikiSQL dataset played a key role in early NL2SQL research, its usage has declined due to structural and annotation issues, including case sensitivity inconsistencies, data type mismatches, syntax errors, and unanswered questions. We present LLMSQL, a systematic revision and transformation of WikiSQL designed for the LLM era. We classify these errors and implement automated methods for cleaning and re-annotation. To assess the impact of these improvements, we evaluated multiple large language models (LLMs), including Gemma 3, LLaMA 3.2, Mistral 7B, gpt-oss 20B, Phi-3.5 Mini, Qwen 2.5, OpenAI o4-mini, DeepSeek R1 and others. Rather than serving as an update, LLMSQL is introduced as an LLM-ready benchmark: unlike the original WikiSQL, tailored for pointer-network models selecting tokens from input, LLMSQL provides clean natural language questions and full SQL queries as plain text, enabling straightforward generation and evaluation for modern natural language-to-SQL models.
PDF32October 7, 2025