Advancing Natural Language to SQL: A Comparative Study of Open Source LLMs on Benchmark Datasets

Translating Natural Language to SQL (NL-to-SQL) allows users to communicate with databases using a common language instead of complicated query syntax. This is important as it frees the non-technical user from querying the database, making interactions more easier. This work primarily evaluates open-source language models on three key NL-to-SQL bench-mark datasets: SPIDER, a cross-domain dataset; WikiSQL, a simpler single-domain dataset; and BIRD, a dataset comprising of real-world data. These datasets were selected because of the variety of problems they present: WikiSQL concentrates on effective querying using straightforward single-tables, while BIRD simulates noisy, real-world data scenarios where precise and effective SQL creation is essential. SPIDER analyzes how well models generalize over complex schemas and multi-table queries. We fine-tuned eight models from the LLM families of LLama, Gemma, and Mistral across these datasets with consistent hyper-parameters to tackle these challenges. We used an SQL evaluation framework that examines model generalization, considering both linguistic variety and complex query patterns against a baseline of accuracy and correctness of existing NL-to-SQL models available. This study demonstrates how different models perform across datasets, with some performing better in simpler queries and others being suited for managing inconsistent, real-world data or difficult cross-domain tasks.

Authors

Institutions

Publication Details

Published
2025-03-17
DOI
https://doi.org/10.1109/ci-nlpsomecompanion65206.2025.10977851
Citations
1
Primary Topic
Semantic Web and Ontologies
Type
article
Field-Weighted Citation Impact
2.48
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Advancing Natural Language to SQL: A Comparative Study of Open Source LLMs on Benchmark Datasets

Arun Sharma, Sandeep Kanumuri, Shylaja S Sharath, A Pranav
1 citations
Semantic Web and Ontologies
2.48
article

Advancing Natural Language to SQL: A Comparative Study of Open Source LLMs on Benchmark Datasets

Arun Sharma, Sandeep Kanumuri, Shylaja S Sharath, A Pranav
article en
1 citations

Abstract

Translating Natural Language to SQL (NL-to-SQL) allows users to communicate with databases using a common language instead of complicated query syntax. This is important as it frees the non-technical user from querying the database, making interactions more easier. This work primarily evaluates open-source language models on three key NL-to-SQL bench-mark datasets: SPIDER, a cross-domain dataset; WikiSQL, a simpler single-domain dataset; and BIRD, a dataset comprising of real-world data. These datasets were selected because of the variety of problems they present: WikiSQL concentrates on effective querying using straightforward single-tables, while BIRD simulates noisy, real-world data scenarios where precise and effective SQL creation is essential. SPIDER analyzes how well models generalize over complex schemas and multi-table queries. We fine-tuned eight models from the LLM families of LLama, Gemma, and Mistral across these datasets with consistent hyper-parameters to tackle these challenges. We used an SQL evaluation framework that examines model generalization, considering both linguistic variety and complex query patterns against a baseline of accuracy and correctness of existing NL-to-SQL models available. This study demonstrates how different models perform across datasets, with some performing better in simpler queries and others being suited for managing inconsistent, real-world data or difficult cross-domain tasks.

PES University (IN)
Quality Education
Openalex Percentile: Top 11%
Semantic Web and Ontologies
2.48
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.