arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.04710cs.CL
收藏

GEMMA-SQL:一种基于大型语言模型的新型文本到SQL模型

GEMMA-SQL: A Novel Text-to-SQL Model Based on Large Language Models

Bournemouth University(伯恩茅斯大学);Maharaja Surajmal Institute of Technology(马哈拉贾·苏拉杰马尔理工学院);University of Liechtenstein(列支敦士登大学)

Hari Mohan Pandey, Anshul Gupta, Subham Sarkar, Minakshi Tomer, Schneider Johannes, Yan Gong

AI总结:

本文提出基于Gemma 2B的轻量级文本到SQL模型GEMMA-SQL,通过迭代微调、少样本提示和指令微调,在SPIDER基准上以66.8% Test-Suite准确率超越多个最先进基线,展示了低成本高效文本到SQL方案的可行性。

摘要:

文本到SQL系统使用户能够使用自然语言与结构化数据库进行交互,无需专业的编程知识。在本工作中,我们提出了GEMMA-SQL,这是一个基于开源Gemma 2B架构构建的轻量级高效文本到SQL模型。与许多大型语言模型(LLMs)不同,GEMMA-SQL以资源高效、迭代的方式进行微调,并且可以部署在低成本硬件上。利用SPIDER基准进行训练和评估,GEMMA-SQL结合了多种提示策略,包括少样本学习,以提高SQL查询生成的准确性。经过指令微调的变体GEMMA-SQL Instruct达到了66.8%的Test-Suite准确率和63.3%的Exact Set Match准确率,优于IRNet、RYANSQL和CodeXDavinci等多个最先进的基线模型。所提出的方法表明,有效的提示设计和有针对性的指令微调可以显著提升性能,同时保持高可扩展性和适应性。这些结果使GEMMA-SQL成为构建稳健且易用的文本到SQL系统的一种实用、开源的替代方案。

英文摘要:

Text-to-SQL systems enable users to interact with structured databases using natural language, eliminating the need for specialized programming knowledge. In this work, we introduce GEMMA-SQL, a lightweight and efficient text-to-SQL model built upon the open-source Gemma 2B architecture. Unlike many large language models (LLMs), GEMMA-SQL is fine-tuned in a resource-efficient, iterative manner and can be deployed on low-cost hardware. Leveraging the SPIDER benchmark for training and evaluation, GEMMA-SQL combines multiple prompting strategies, including few-shot learning, to enhance SQL query generation accuracy. The instruction-tuned variant, GEMMA-SQL Instruct, achieves 66.8% Test-Suite accuracy and 63.3% Exact Set Match accuracy, outperforming several state-of-the-art baselines such as IRNet, RYANSQL, and CodeXDavinci. The proposed approach demonstrates that effective prompt design and targeted instruction tuning can significantly boost performance while maintaining high scalability and adaptability. These results position GEMMA-SQL as a practical, open-source alternative for robust and accessible text-to-SQL systems.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑