用知识图谱增强大模型推理链,提升复杂任务准确率。
CoT-RAG: Integrating Chain of Thought and Retrieval-Augmented Generation to Enhance Reasoning in Large Language Models
- 用知识图谱约束推理过程,让思考更可信。
- 检索相关案例并融入推理,准确率最高提升44.3%。
- 将推理转为伪代码形式,逻辑更严谨,适合工程落地。
链式思维(CoT)推理虽能提升大语言模型在复杂任务上的表现,但存在两大缺陷:完全依赖模型生成的推理链可靠性不足;自然语言提示的推理效果低于代码提示。为此,我们提出CoT-RAG框架,包含三项创新设计:(i) 基于知识图谱的链式思维生成,利用知识图谱引导模型生成更可信的推理链;(ii) 可学习的知识案例感知RAG,将检索增强生成融入知识图谱,检索相关子案例与子描述,提供可学习信息;(iii) 伪程序提示执行,引导模型以伪代码形式执行推理,增强逻辑严谨性。在九个涵盖三类推理任务的公开数据集上评估显示,相比现有最优方法,准确率提升4.0%至44.3%。在四个领域特定数据集上的测试也验证了其高精度与高效执行能力,凸显其实际应用价值与可扩展性。代码与数据已开源。
原文摘要 · Abstract (English)
Chain-of-thought (CoT) reasoning boosts large language models' (LLMs) performance on complex tasks but faces two key limitations: a lack of reliability when solely relying on LLM-generated reasoning chains and lower reasoning performance from natural language prompts compared with code prompts. To address these issues, we propose CoT-RAG, a novel reasoning framework with three key designs: (i) Knowledge Graph-driven CoT Generation, featuring knowledge graphs to modulate reasoning chain generation of LLMs, thereby enhancing reasoning credibility; (ii) Learnable Knowledge Case-aware RAG, which incorporates retrieval-augmented generation (RAG) into knowledge graphs to retrieve relevant sub-cases and sub-descriptions, providing LLMs with learnable information; (iii) Pseudo Program Prompting Execution, which promotes greater logical rigor by guiding LLMs to execute reasoning tasks as pseudo-programs. Evaluations on nine public datasets spanning three reasoning tasks reveal significant accuracy gains-ranging from 4.0% to 44.3%-over state-of-the-art methods. Furthermore, tests on four domain-specific datasets demonstrate exceptional accuracy and efficient execution, underscoring its practical applicability and scalability. Our code and data are available at https: //github.com/hustlfy123/CoT-RAG.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。