arXiv:2410.20724cs.CLcs.IR2024-10ICLR被引 111

用轻量图检索提升大模型问答准确率,不需微调也能抗幻觉。

Simple Is Effective: The Roles of Graphs and Large Language Models in Knowledge-Graph-Based Retrieval-Augmented Generation

  • 通过多层感知机+并行三元组评分,高效灵活地提取相关子图。
  • 在WebQSP和CWQ上,小模型8B表现媲美大模型,大模型达当前最优。
  • 无需微调,适配不同大小模型,适合追求可靠推理的开发者。

大语言模型(LLM)虽具强大推理能力,但存在幻觉和知识过时问题。基于知识图谱(KG)的检索增强生成(RAG)通过引入结构化外部知识来缓解此问题。然而现有框架难以在检索效果与效率间取得平衡,无法有效确定适宜的图信息量供LLM处理。本文提出SubgraphRAG,扩展了基于子图检索的RAG框架,利用LLM进行推理与答案预测。创新性地结合轻量级多层感知机与并行三元组评分机制,实现高效灵活的子图检索,并编码方向性结构距离以增强检索效果。可灵活调整检索子图规模以匹配查询需求与下游模型能力。该设计在模型复杂度与推理能力间取得平衡,支持可扩展、通用的检索流程。实验表明,在WebQSP与CWQ基准上,无需微调,较小模型如Llama3.1-8B-Instruct表现优异且推理可解释,较大模型GPT-4o达到当前最佳准确率,显著降低幻觉,提升回答可靠性。

原文摘要 · Abstract (English)

Large Language Models (LLMs) demonstrate strong reasoning abilities but face limitations such as hallucinations and outdated knowledge. Knowledge Graph (KG)-based Retrieval-Augmented Generation (RAG) addresses these issues by grounding LLM outputs in structured external knowledge from KGs. However, current KG-based RAG frameworks still struggle to optimize the trade-off between retrieval effectiveness and efficiency in identifying a suitable amount of relevant graph information for the LLM to digest. We introduce SubgraphRAG, extending the KG-based RAG framework that retrieves subgraphs and leverages LLMs for reasoning and answer prediction. Our approach innovatively integrates a lightweight multilayer perceptron with a parallel triple-scoring mechanism for efficient and flexible subgraph retrieval while encoding directional structural distances to enhance retrieval effectiveness. The size of retrieved subgraphs can be flexibly adjusted to match the query's need and the downstream LLM's capabilities. This design strikes a balance between model complexity and reasoning power, enabling scalable and generalizable retrieval processes. Notably, based on our retrieved subgraphs, smaller LLMs like Llama3.1-8B-Instruct deliver competitive results with explainable reasoning, while larger models like GPT-4o achieve state-of-the-art accuracy compared with previous baselines -- all without fine-tuning. Extensive evaluations on the WebQSP and CWQ benchmarks highlight SubgraphRAG's strengths in efficiency, accuracy, and reliability by reducing hallucinations and improving response grounding.

知识图谱RAG大模型子图检索

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。