Abstract
Large Language Models (LLMs) have demonstrated strong performance in Text-to-SQL generation, converting natural language questions into SQL queries. While most researches focus on enhancing large LLMs like GPT-4 by OpenAI, small-scale open-source LLMs remain overlooked and underutilized. This paper introduces SPS-SQL, a novel lightweight approach designed to boost the Text-to-SQL accuracy on small-scale open-source LLMs. By leveraging semantic information to extract templates from training data, SPS-SQL pre-synthesizes queries based solely on schema information, which serve as few-shot examples to guide further SQL generation. SPS-SQL achieves execution accuracies on the Spider development and test set with Qwen 2.5 Coder (7 billion parameters) of 81.7% and 82.1%. Competitive results are seen on other LLMs as well, further emphasizing its flexibility and adaptability, significantly outperforming other methods on the same model.
| Original language | English |
|---|---|
| Pages (from-to) | 45-51 |
| Number of pages | 7 |
| Journal | Pattern Recognition Letters |
| Volume | 196 |
| DOIs | |
| State | Published - Oct 2025 |
| Externally published | Yes |
Keywords
- In-context learning
- Large language model
- SQL synthesis
- Text-to-SQL
Fingerprint
Dive into the research topics of 'SPS-SQL: Enhancing Text-to-SQL generation on small-scale LLMs with pre-synthesized queries'. Together they form a unique fingerprint.Cite this
- APA
- Author
- BIBTEX
- Harvard
- Standard
- RIS
- Vancouver