arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2511.08245cs.CLcs.LG

结合嵌入微调与RAG的自然语言转SQL提示调优

Prompt Tuning for Natural Language to SQL with Embedding Fine-Tuning and RAG

  • Graduate School of Data Science, Seoul National University(数据科学研究生院,首尔国立大学)

机构由 AI 辅助整理,请以论文原文为准。

Jisoo Jang, Tien-Cuong Bui, Yunjun Choi, Wen-Syan Li

更新

AI总结:

针对自然语言转SQL的高效准确转换需求,本文提出结合嵌入微调与RAG的提示调优错误校正框架,受医学诊断启发集成错误诊断与修复机制,实验显示准确率较基线提升12%。

AI中文摘要:

本文提出一种通过提示调优实现自然语言转SQL(NL-to-SQL)的错误校正方法,利用基于生成式预训练的大语言模型(LLMs)和检索增强生成(RAG)的最新进展。随着自然语言接口的广泛应用,在各类场景中高效准确地将自然语言查询转换为SQL表达式的需求日益迫切,本文工作正是针对这一关键需求。我们探讨了自然语言接口数据库(NLIDBs)从早期基于规则的系统到先进神经网络驱动方法的演变。受医学诊断流程启发,我们提出一种新颖框架,集成错误校正机制:诊断错误类型、识别原因、提供修复指令并将这些校正应用于SQL查询。该方法通过嵌入微调与RAG进一步优化,利用外部知识库提升准确性与透明度。通过全面实验,我们证明该框架相比现有基线准确率显著提升12%,凸显其在现代数据驱动环境中革新数据访问与处理的潜力。

英文摘要:

This paper introduces an Error Correction through Prompt Tuning for NL-to-SQL, leveraging the latest advancements in generative pre-training-based LLMs and RAG. Our work addresses the crucial need for efficient and accurate translation of natural language queries into SQL expressions in various settings with the growing use of natural language interfaces. We explore the evolution of NLIDBs from early rule-based systems to advanced neural network-driven approaches. Drawing inspiration from the medical diagnostic process, we propose a novel framework integrating an error correction mechanism that diagnoses error types, identifies their causes, provides fixing instructions, and applies these corrections to SQL queries. This approach is further enriched by embedding fine-tuning and RAG, which harnesses external knowledge bases for improved accuracy and transparency. Through comprehensive experiments, we demonstrate that our framework achieves a significant 12 percent accuracy improvement over existing baselines, highlighting its potential to revolutionize data access and handling in contemporary data-driven environments.

补充信息

↑