Saved in:
Bibliographic Details
Main Authors: Solanki, Anshul, Latawa, Sanchit, Chakraborty, Koushik, Kamboj, Navneet
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2603.22942
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866917359464218624
author Solanki, Anshul
Latawa, Sanchit
Chakraborty, Koushik
Kamboj, Navneet
author_facet Solanki, Anshul
Latawa, Sanchit
Chakraborty, Koushik
Kamboj, Navneet
contents Translating Natural Language to SQL (NL2SQL) remains a critical bottleneck for democratization of data in enterprises. Although Large Language Models (LLMs) like Gemini 2.5 and other LLMs have demonstrated impressive zero-shot capabilities, their high inference costs limit deployment at scale. This paper explores the efficacy of fine-tuning both large and small language models on NL2SQL tasks. Our research reveals a counter-intuitive scaling phenomenon. Fine-tuning large models (Gemini 2.5 Flash/Lite) on standard datasets yields negligible returns, often leading to overfitting on complex queries. Conversely, small models (Qwen) show significant gains. Fine-tuning improved the small model baseline from 36% to 45%, and further enriching the dataset with explicit Chain-of-Thought (CoT) reasoning surged accuracy to 54.5%(Fig 2). While this is still lower than the accuracy of large models like Gemini 2.5 , it does serve the business goal of significant cost reduction, latency in inference time and also meeting the business critical performance accuracy threshold.This paper demonstrates that transferring reasoning patterns enables compute-efficient smaller models to approach production-grade performance.
format Preprint
id arxiv_https___arxiv_org_abs_2603_22942
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Optimizing Small Language Models for NL2SQL via Chain-of-Thought Fine-Tuning
Solanki, Anshul
Latawa, Sanchit
Chakraborty, Koushik
Kamboj, Navneet
Artificial Intelligence
Translating Natural Language to SQL (NL2SQL) remains a critical bottleneck for democratization of data in enterprises. Although Large Language Models (LLMs) like Gemini 2.5 and other LLMs have demonstrated impressive zero-shot capabilities, their high inference costs limit deployment at scale. This paper explores the efficacy of fine-tuning both large and small language models on NL2SQL tasks. Our research reveals a counter-intuitive scaling phenomenon. Fine-tuning large models (Gemini 2.5 Flash/Lite) on standard datasets yields negligible returns, often leading to overfitting on complex queries. Conversely, small models (Qwen) show significant gains. Fine-tuning improved the small model baseline from 36% to 45%, and further enriching the dataset with explicit Chain-of-Thought (CoT) reasoning surged accuracy to 54.5%(Fig 2). While this is still lower than the accuracy of large models like Gemini 2.5 , it does serve the business goal of significant cost reduction, latency in inference time and also meeting the business critical performance accuracy threshold.This paper demonstrates that transferring reasoning patterns enables compute-efficient smaller models to approach production-grade performance.
title Optimizing Small Language Models for NL2SQL via Chain-of-Thought Fine-Tuning
topic Artificial Intelligence
url https://arxiv.org/abs/2603.22942