Biomedical knowledge graph-optimized prompt generation for large language models
作者: Karthik Soman, Peter W Rose, John H Morris, Rabia E Akbas, Brett Smith, Braian Peetoom, Catalina Villouta-Reyes, Gabriel Cerono, Yongmei Shi, Angela Rizk-Jackson, Sharat Israni, Charlotte A Nelson, Sui Huang, Sergio E Baranzini
分类: cs.CL
发布日期: 2023-11-29 (更新: 2024-05-13)
备注: 29 pages, 5 figures, 1 table, 1 supplementary file
💡 一句话要点
提出KG-RAG框架以优化生物医学领域的LLM提示生成
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 知识图谱 大型语言模型 生物医学 文本生成 上下文提取 性能提升 检索增强生成
📋 核心要点
- 现有方法在生物医学领域的知识密集型任务中面临高计算开销和领域专业知识要求的挑战。
- 本文提出KG-RAG框架,通过优化上下文提取和令牌使用,结合知识图谱与大型语言模型,提升生成文本的质量和效率。
- 实验结果表明,KG-RAG在多项选择题数据集上使Llama-2模型性能提升71%,同时也增强了GPT系列模型的表现。
📝 摘要(中文)
大型语言模型(LLMs)在生物医学等知识密集型领域的应用面临挑战。本文提出了一种基于知识图谱的检索增强生成(KG-RAG)框架,利用大规模生物医学知识图谱(SPOKE)与LLMs(如Llama-2-13b、GPT-3.5-Turbo和GPT-4)结合,生成基于已建立知识的生物医学文本。与现有的知识图谱RAG技术相比,该方法在上下文提取中使用最小图谱模式,并采用嵌入方法进行上下文修剪,显著减少了超过50%的令牌消耗,同时保持准确性。KG-RAG在多种生物医学提示下提升了LLMs的性能,并在基准测试中显示出Llama-2模型在多项选择题数据集上提高了71%的性能,证明了该框架在特定领域问题上的有效性。
🔬 方法详解
问题定义:本文旨在解决大型语言模型在生物医学领域生成文本时的知识获取效率低和计算资源消耗大的问题。现有方法通常依赖于大量的预训练和领域特定的微调,导致计算开销高且需要领域专业知识。
核心思路:KG-RAG框架通过结合知识图谱和大型语言模型,优化上下文提取过程,减少令牌消耗,同时确保生成文本的准确性和可靠性。该设计旨在提高生成效率,降低成本。
技术框架:KG-RAG框架主要包括三个模块:知识图谱的构建与优化、上下文提取与修剪、以及与大型语言模型的集成。首先,利用生物医学知识图谱(SPOKE)进行信息检索,然后通过最小图谱模式提取相关上下文,最后将提取的上下文输入到大型语言模型中生成文本。
关键创新:KG-RAG的主要创新在于其在上下文提取中采用了最小图谱模式和嵌入方法,显著减少了令牌消耗超过50%,而不影响生成文本的准确性。这一方法与传统的知识图谱RAG技术相比,具有更高的效率和更低的计算成本。
关键设计:在KG-RAG中,关键设计包括上下文提取的最小图谱模式和嵌入方法的选择,这些设计使得上下文修剪更加高效。此外,框架在与大型语言模型的集成中,采用了适应性调整的参数设置,以优化生成效果。
📊 实验亮点
KG-RAG框架在实验中表现出色,特别是在生物医学多项选择题数据集上,Llama-2模型的性能提升达71%。此外,该框架还有效增强了GPT-3.5和GPT-4模型的表现,证明了其在知识密集型任务中的有效性和适用性。
🎯 应用场景
KG-RAG框架具有广泛的应用潜力,特别是在生物医学领域的知识获取和文本生成任务中。它可以帮助研究人员和临床医生快速获取可靠的信息,提升决策支持系统的智能化水平。此外,该框架的高效性和低成本特性使其适用于资源有限的环境,推动开放源代码模型在专业领域的应用。
📄 摘要(原文)
Large Language Models (LLMs) are being adopted at an unprecedented rate, yet still face challenges in knowledge-intensive domains like biomedicine. Solutions such as pre-training and domain-specific fine-tuning add substantial computational overhead, requiring further domain expertise. Here, we introduce a token-optimized and robust Knowledge Graph-based Retrieval Augmented Generation (KG-RAG) framework by leveraging a massive biomedical KG (SPOKE) with LLMs such as Llama-2-13b, GPT-3.5-Turbo and GPT-4, to generate meaningful biomedical text rooted in established knowledge. Compared to the existing RAG technique for Knowledge Graphs, the proposed method utilizes minimal graph schema for context extraction and uses embedding methods for context pruning. This optimization in context extraction results in more than 50% reduction in token consumption without compromising the accuracy, making a cost-effective and robust RAG implementation on proprietary LLMs. KG-RAG consistently enhanced the performance of LLMs across diverse biomedical prompts by generating responses rooted in established knowledge, accompanied by accurate provenance and statistical evidence (if available) to substantiate the claims. Further benchmarking on human curated datasets, such as biomedical true/false and multiple-choice questions (MCQ), showed a remarkable 71% boost in the performance of the Llama-2 model on the challenging MCQ dataset, demonstrating the framework's capacity to empower open-source models with fewer parameters for domain specific questions. Furthermore, KG-RAG enhanced the performance of proprietary GPT models, such as GPT-3.5 and GPT-4. In summary, the proposed framework combines explicit and implicit knowledge of KG and LLM in a token optimized fashion, thus enhancing the adaptability of general-purpose LLMs to tackle domain-specific questions in a cost-effective fashion.