Prompt Tuning for Natural Language to SQL with Embedding Fine-Tuning and RAG
Jisoo Jang, Tien-Cuong Bui, Yunjun Choi, Wen-Syan Li
本文介绍了通过 NL-to-SQL 的提示调谐错误更正,利用基于生成式预训练的 LLM 和 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 me...