Domain-Specific Retrieval-Augmented Generation Using Vector Stores, Knowledge Graphs, and Tensor Factorization

📄 arXiv: 2410.02721v1 📥 PDF

作者: Ryan C. Barron, Ves Grantcharov, Selma Wanna, Maksim E. Eren, Manish Bhattarai, Nicholas Solovyev, George Tompkins, Charles Nicholas, Kim Ø. Rasmussen, Cynthia Matuszek, Boian S. Alexandrov

分类: cs.CL, cs.AI, cs.IR, cs.SE

发布日期: 2024-10-03

备注: 9 pages 7 figures, 1 table, 1 cypher code Accepted to ICMLA 2024


💡 一句话要点

提出SMART-SLIC框架,结合RAG、知识图谱和向量存储,提升领域特定问答能力。

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 检索增强生成 知识图谱 向量存储 领域特定问答 非负张量分解

📋 核心要点

  1. 现有LLM在领域特定任务中存在幻觉、知识不足等问题,且微调成本高昂,限制了其在专业领域的应用。
  2. SMART-SLIC框架结合RAG、知识图谱和向量存储,利用NLP和数据挖掘构建领域知识库,避免LLM幻觉。
  3. 该框架在恶意软件分析和异常检测语料库上验证了问答能力,展示了其在领域特定任务中的有效性。

📝 摘要(中文)

大型语言模型(LLM)在通用自然语言处理(NLP)任务(如问答(QA))中表现出色,但当涉及领域特定和知识密集型任务时,LLM会受到幻觉、知识截断和缺乏知识归属的影响。微调LLM的内在知识到高度特定的领域既昂贵又耗时。检索增强生成(RAG)最近作为一种优化LLM响应的方法出现,通过参考预定的本体。使用知识图谱(KG)本体进行RAG可以提高QA的准确性,因为它考虑了以结构化方式保存信息的相关子图。本文介绍SMART-SLIC,一个高度领域特定的LLM框架,它将RAG与KG和一个存储事实领域特定信息的向量存储(VS)集成。重要的是,为了避免KG中的幻觉,我们构建这些高度领域特定的KG和VS,不使用LLM,而是通过NLP、数据挖掘和具有自动模型选择的非负张量分解。将我们的RAG与领域特定的:(i)KG(包含结构化信息)和(ii)VS(包含非结构化信息)配对,能够开发领域特定的聊天机器人,这些机器人可以归属信息来源,减轻幻觉,减少微调的需要,并在高度领域特定的问答任务中表现出色。我们将SMART-SLIC与思维链提示代理配对。该框架被设计为可推广的,以适应任何特定或专门的领域。在本文中,我们展示了我们的框架在恶意软件分析和异常检测科学出版物语料库上的问答能力。

🔬 方法详解

问题定义:现有大型语言模型在处理领域特定问题时,容易产生幻觉,无法准确追溯知识来源,并且需要耗费大量资源进行微调。这些问题限制了LLM在专业领域的应用,例如恶意软件分析和异常检测等需要高度精确知识的任务。

核心思路:SMART-SLIC框架的核心思路是利用检索增强生成(RAG)方法,结合领域特定的知识图谱(KG)和向量存储(VS),为LLM提供外部知识来源,从而减少幻觉,提高问答准确性,并降低微调成本。通过构建高质量的领域知识库,使LLM能够基于可靠的知识进行推理和回答。

技术框架:SMART-SLIC框架包含以下主要模块:1) 领域特定知识图谱构建:利用NLP和数据挖掘技术,从领域语料库中提取结构化知识,构建KG。2) 领域特定向量存储构建:利用NLP技术,将领域语料库中的非结构化信息嵌入到向量空间中,构建VS。3) 检索模块:根据用户问题,从KG和VS中检索相关知识。4) 生成模块:利用LLM,结合检索到的知识,生成答案。5) 思维链提示代理:使用chain-of-thought prompting agents来提升推理能力。

关键创新:该框架的关键创新在于:1) 避免使用LLM构建KG和VS,而是采用NLP、数据挖掘和非负张量分解等技术,从而避免了LLM可能产生的幻觉。2) 将KG和VS结合使用,既利用了KG的结构化知识,又利用了VS的非结构化知识,从而提高了知识覆盖率。3) 框架设计具有通用性,可以应用于任何特定或专门的领域。

关键设计:论文中提到使用非负张量分解进行知识抽取和模型选择,但没有提供具体的参数设置和损失函数等技术细节。向量存储的具体实现方式(例如使用的嵌入模型)也未详细说明。KG构建过程中使用的NLP和数据挖掘技术的具体算法也未给出。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

论文在恶意软件分析和异常检测的科学出版物语料库上验证了SMART-SLIC框架的问答能力,但没有提供具体的性能数据和对比基线。因此,无法量化该框架的性能提升幅度。未来的研究需要提供更详细的实验结果,以证明该框架的有效性。

🎯 应用场景

该研究成果可应用于构建各种领域特定的智能问答系统和聊天机器人,例如医疗诊断辅助、法律咨询、金融分析等。通过提供准确、可靠的领域知识,可以提升LLM在专业领域的应用价值,并降低人工干预的需求。未来,该框架可以进一步扩展到更多领域,并与其他技术(如多模态学习)相结合,实现更强大的智能应用。

📄 摘要(原文)

Large Language Models (LLMs) are pre-trained on large-scale corpora and excel in numerous general natural language processing (NLP) tasks, such as question answering (QA). Despite their advanced language capabilities, when it comes to domain-specific and knowledge-intensive tasks, LLMs suffer from hallucinations, knowledge cut-offs, and lack of knowledge attributions. Additionally, fine tuning LLMs' intrinsic knowledge to highly specific domains is an expensive and time consuming process. The retrieval-augmented generation (RAG) process has recently emerged as a method capable of optimization of LLM responses, by referencing them to a predetermined ontology. It was shown that using a Knowledge Graph (KG) ontology for RAG improves the QA accuracy, by taking into account relevant sub-graphs that preserve the information in a structured manner. In this paper, we introduce SMART-SLIC, a highly domain-specific LLM framework, that integrates RAG with KG and a vector store (VS) that store factual domain specific information. Importantly, to avoid hallucinations in the KG, we build these highly domain-specific KGs and VSs without the use of LLMs, but via NLP, data mining, and nonnegative tensor factorization with automatic model selection. Pairing our RAG with a domain-specific: (i) KG (containing structured information), and (ii) VS (containing unstructured information) enables the development of domain-specific chat-bots that attribute the source of information, mitigate hallucinations, lessen the need for fine-tuning, and excel in highly domain-specific question answering tasks. We pair SMART-SLIC with chain-of-thought prompting agents. The framework is designed to be generalizable to adapt to any specific or specialized domain. In this paper, we demonstrate the question answering capabilities of our framework on a corpus of scientific publications on malware analysis and anomaly detection.