The Nuts and Bolts of Natural Language to SQL Translation: A Systematic Analysis of Model Pipeline Optimisation Approaches and their Interactions
2026-07-12 • Computation and Language
Computation and LanguageArtificial IntelligenceDatabases
AI summaryⓘ
The authors studied different ways to improve translating natural language questions into SQL queries, which is useful for databases. They combined several techniques like using an intermediate format (NatSQL), preprocessing input, fine-tuning with synthetic data, and adding a model to choose the best SQL query. By testing these separately and together on two existing systems, they found that just combining all improvements doesn't always make things better. Instead, how these parts work together and with the base system matters a lot.
Natural Language to SQL (NL2SQL)Intermediate RepresentationNatSQLPreprocessingFine-tuningSynthetic DataReranker ModelAblation StudyShapley AnalysisBeam Search
Authors
Filip Klubicka, Vasudevan Nedumpozhimana, Sneha Rautmare, Bora Caglayan, Mingxue Wang, John D. Kelleher
Abstract
In the age of large language models, Natural Language to SQL (NL2SQL) translation remains an open problem with many useful applications. We explore interactions between several NL2SQL pipeline extensions to inspire development of more lightweight models. Specifically, we integrate the NatSQL intermediate representation, include a preprocessing step and a fine-tuning step based on synthetic data, and develop a novel reranker model to improve SQL selection in the final beam. We perform an ablation study supplemented by a Shapley analysis of these different components integrated with two backbone architectures, SmBoP and RASAT. We find that simply combining all of them does not lead to best results, but that their impact depends on their interactions with the baseline system, as well as each other.