SQLong: Enhanced NL2SQL for Longer Contexts with LLMs

Open-weight large language models (LLMs) have significantly advanced performance in the Natural Language to SQL (NL2SQL) task.However, their effectiveness diminishes when dealing with large database schemas, as the context length increases.To address this limitation, we present SQLong, a novel and efficient data augmentation framework designed to enhance LLM performance in long-context scenarios for the NL2SQL task.SQLong generates augmented datasets by extending existing database schemas with additional synthetic CREATE TABLE commands and corresponding data rows, sampled from diverse schemas in the training data.This approach effectively simulates long-context scenarios during finetuning and evaluation.Through experiments on the Spider and BIRD datasets, we demonstrate that LLMs finetuned with SQLong-augmented data significantly outperform those trained on standard datasets.These imply SQLong's practical implementation and its impact on improving NL2SQL capabilities in real-world settings with complex database schemas. 1

Authors

Institutions

Publication Details

Published
2025-01-01
DOI
https://doi.org/10.18653/v1/2025.trl-1.5
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

SQLong: Enhanced NL2SQL for Longer Contexts with LLMs

L. Duong, Thanh Long Vu, Duy Quang T. Nguyen, Duy Vu et al.
1 citations
Semantic Web and Ontologies
2.48
article

SQLong: Enhanced NL2SQL for Longer Contexts with LLMs

L. Duong, Thanh Long Vu, Duy Quang T. Nguyen, Duy Vu, Yuan-Fang Li, Chuong D. Hoang, Don Dharmasiri, Gioacchino Tangari
article en
1 citations

Abstract

Open-weight large language models (LLMs) have significantly advanced performance in the Natural Language to SQL (NL2SQL) task.However, their effectiveness diminishes when dealing with large database schemas, as the context length increases.To address this limitation, we present SQLong, a novel and efficient data augmentation framework designed to enhance LLM performance in long-context scenarios for the NL2SQL task.SQLong generates augmented datasets by extending existing database schemas with additional synthetic CREATE TABLE commands and corresponding data rows, sampled from diverse schemas in the training data.This approach effectively simulates long-context scenarios during finetuning and evaluation.Through experiments on the Spider and BIRD datasets, we demonstrate that LLMs finetuned with SQLong-augmented data significantly outperform those trained on standard datasets.These imply SQLong's practical implementation and its impact on improving NL2SQL capabilities in real-world settings with complex database schemas. 1

Oracle (United States) (US)
Openalex Percentile: Top 9%
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.