Treffer: SPS-SQL: Enhancing Text-to-SQL generation on small-scale LLMs with pre-synthesized queries.
Weitere Informationen
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. • Focus on improving Text-to-SQL accuracy on open-source small-scale LLMs. • Extract templates from prior SQL queries to synthesis new queries. • Pre-synthesis SQL queries with database schema as few-shot examples. • Achieve high execution accuracy on Spider dataset. • Improve accuracies of SQL generation on multiple small-scale LLMs. [ABSTRACT FROM AUTHOR]