Fine-Tuning Large Language Models for Text-to-SQL

In recent years, the integration of natural language processing (NLP) with database querying has led to the emergence of Text-to-SQL systems, which enable nontechnical users to interact with databases using natural language. While existing models, particularly those based on large language models (LLMs), have demonstrated remarkable generalization capabilities, they face challenges in generating complex multi-table and nested queries, as well as adapting to cross-domain tasks. This paper proposes a novel approach for Text-to-SQL tasks by utilizing supervised fine-tuning (SFT) on large language models. By leveraging high-quality annotated datasets, the proposed method significantly improves the accuracy of complex SQL generation and enhances cross-domain adaptability. Comprehensive evaluations on the Spider and CHASE datasets demonstrate that our approach achieves superior performance, with Exact Match (EM) scores of 36.5% and 45.5% for the deepseek-SQL and Qwen2.5-SQL models, respectively. The findings highlight the effectiveness of fine-tuning in optimizing LLMs for Text-to-SQL tasks, reducing inference costs, and bridging the gap between semantic parsing accuracy and real-world application requirements.

Authors

Institutions

Publication Details

Published
2025-05-23
DOI
https://doi.org/10.1109/icetci64844.2025.11084052
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Fine-Tuning Large Language Models for Text-to-SQL

Y. Sophia Dai
Topic Modeling
article

Fine-Tuning Large Language Models for Text-to-SQL

Y. Sophia Dai
article en

Abstract

In recent years, the integration of natural language processing (NLP) with database querying has led to the emergence of Text-to-SQL systems, which enable nontechnical users to interact with databases using natural language. While existing models, particularly those based on large language models (LLMs), have demonstrated remarkable generalization capabilities, they face challenges in generating complex multi-table and nested queries, as well as adapting to cross-domain tasks. This paper proposes a novel approach for Text-to-SQL tasks by utilizing supervised fine-tuning (SFT) on large language models. By leveraging high-quality annotated datasets, the proposed method significantly improves the accuracy of complex SQL generation and enhances cross-domain adaptability. Comprehensive evaluations on the Spider and CHASE datasets demonstrate that our approach achieves superior performance, with Exact Match (EM) scores of 36.5% and 45.5% for the deepseek-SQL and Qwen2.5-SQL models, respectively. The findings highlight the effectiveness of fine-tuning in optimizing LLMs for Text-to-SQL tasks, reducing inference costs, and bridging the gap between semantic parsing accuracy and real-world application requirements.

Jilin University of Finance and Economics (CN)
Quality Education
Openalex Percentile: Top 91%
Topic Modeling
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.

Fine-Tuning Large Language Models for Text-to-SQL — Y. Sophia Dai · (2025) | TGRS Research Map | TGRS