让大模型更懂数据库,提升文本转SQL的准确率。
Meta-aware Learning in text-to-SQL Large Language Model
- 融合模式、推理链、知识和元数据信息进行联合学习
- 在真实业务场景中执行准确率显著提升,且减少遗忘
- 适合需要高精度数据库查询的工业级应用
大型语言模型(LLMs)的进步为文本转SQL任务带来了新机遇,可有效应对商业应用中复杂领域信息与数据库结构的理解挑战。本文提出一种元感知学习框架,通过整合领域知识、数据库模式、思维链推理过程及元数据关系,提升SQL生成质量。该框架包含四种学习策略:基于模式的学习、思维链(CoT)学习、知识增强学习和关键信息分词。通过微调使大模型全面理解数据库结构与元数据信息,显著提升其在商业领域中的SQL生成性能。两个实验研究验证了该方法在执行准确率、多任务生成能力以及缓解灾难性遗忘方面的优势。
原文摘要 · Abstract (English)
The advancements of Large language models (LLMs) have provided great opportunities to text-to-SQL tasks to overcome the main challenges to understand complex domain information and complex database structures in business applications. In this paper, we propose a meta-aware learning framework to integrate domain knowledge, database schema, chain-of-thought reasoning processes, and metadata relationships to improve the SQL generation quality. The proposed framework includes four learning strategies: schema-based learning, Chain-of-Thought (CoT) learning, knowledge-enhanced learning, and key information tokenization. This approach provides a comprehensive understanding of database structure and metadata information towards LLM through fine-tuning to improve its performance on SQL generation within business domains. Through two experimental studies, we have demonstrated the superiority of the proposed methods in execution accuracy, multi-task SQL generation capability, and reduction of catastrophic forgetting.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。