GraphRAG on Consumer Hardware: Benchmarking Local LLMs for Healthcare EHR Schema Retrieval

📄 arXiv: 2605.20815v1 📥 PDF

作者: Peter Fernandes, Ria Kanjilal

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

发布日期: 2026-05-20

备注: 9 pages, 1 figure, 5 tables


💡 一句话要点

在消费级硬件上实现GraphRAG,评估本地LLM在医疗EHR模式检索中的性能。

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

关键词: GraphRAG 本地LLM EHR模式检索 知识图谱 消费级硬件

📋 核心要点

  1. 现有基于云的LLM在处理医疗EHR数据时,面临成本高昂、延迟大以及数据隐私合规性等挑战。
  2. 本文提出在消费级硬件上部署GraphRAG,利用本地LLM进行EHR模式检索,以解决上述问题。
  3. 实验结果表明,Llama 3.1和Qwen 2.5等模型在知识图谱构建和答案质量方面表现出色,局部检索优于全局摘要。

📝 摘要(中文)

本文评估了在资源受限、隐私敏感场景下GraphRAG的可靠性,特别是在医疗保健领域,电子健康记录(EHR)数据的复杂性和严格监管使得依赖云端LLM面临成本、延迟和合规性挑战。研究在真实EHR模式文档上实现了Microsoft GraphRAG流程,并使用Ollama在单个消费级GPU(8GB VRAM)上部署了Llama 3.1 (8B)、Mistral (7B)、Qwen 2.5 (7B)和Phi-4-mini (3.8B)四个本地开源LLM进行基准测试。评估了索引效率、知识图谱构建、查询延迟、答案质量和幻觉,包括全局和局部检索模式。结果表明,Llama 3.1生成最丰富的知识图谱(1172个实体),Qwen 2.5实现最佳答案质量(3.3/5),Phi-4-mini因结构化输出错误而无法完成流程,Mistral表现出退化的重复行为。研究表明GraphRAG存在实际容量阈值,低于约7B参数的模型无法可靠地生成有效的结构化输出并完成流程。此外,索引和答案质量在不同模型之间是解耦的,局部检索在延迟和事实依据方面始终优于全局摘要,并减少了幻觉。这些发现表明,GraphRAG在消费级硬件上是可行的,同时强调了模型选择和检索设计对于在受监管环境中稳健部署的重要性。

🔬 方法详解

问题定义:论文旨在解决在资源受限的消费级硬件上,如何利用本地部署的LLM有效地进行医疗EHR模式检索的问题。现有方法依赖于云端LLM,存在成本高、延迟大、隐私泄露等痛点,无法满足医疗领域对数据安全和实时性的严格要求。

核心思路:论文的核心思路是利用GraphRAG框架,将EHR模式文档转化为知识图谱,并结合局部检索策略,使得本地LLM能够更好地理解和推理复杂的EHR数据,从而提高检索的准确性和效率,同时保障数据隐私。

技术框架:整体流程包括以下几个主要阶段:1) EHR模式文档的预处理和清洗;2) 利用LLM构建知识图谱,提取实体和关系;3) 基于知识图谱进行索引;4) 接收用户查询,进行局部检索,获取相关信息;5) 利用LLM生成答案。整个流程在本地消费级GPU上运行。

关键创新:最重要的技术创新点在于将GraphRAG框架与本地LLM相结合,并针对医疗EHR数据进行了优化。与传统的全局摘要方法相比,局部检索能够更准确地定位相关信息,减少幻觉,提高答案质量。此外,论文还系统地评估了不同规模的LLM在GraphRAG框架下的性能表现,为实际部署提供了指导。

关键设计:论文的关键设计包括:1) 选择了Llama 3.1、Mistral、Qwen 2.5和Phi-4-mini等开源LLM进行评估;2) 使用Ollama进行模型部署;3) 采用Microsoft GraphRAG pipeline;4) 设计了全局和局部检索两种模式;5) 评估指标包括索引效率、知识图谱质量、查询延迟、答案质量和幻觉。

🖼️ 关键图片

fig_0

📊 实验亮点

实验结果表明,Llama 3.1生成了最丰富的知识图谱(1172个实体),Qwen 2.5实现了最佳的答案质量(3.3/5)。局部检索在延迟和事实依据方面均优于全局摘要,并减少了幻觉。研究还发现,模型参数量低于7B时,难以生成有效的结构化输出。这些结果验证了GraphRAG在消费级硬件上进行EHR模式检索的可行性。

🎯 应用场景

该研究成果可应用于医疗机构内部的EHR系统,帮助医生和研究人员快速检索和理解EHR数据,提高诊疗效率和科研水平。同时,该方法也可推广到其他需要处理复杂结构化数据的领域,如金融、法律等。

📄 摘要(原文)

Graph-based Retrieval Augmented Generation (GraphRAG) extends retrieval-augmented generation to support structured reasoning over complex corpora, but its reliability under resource-constrained, privacy-sensitive deployments remains unclear. In healthcare, where Electronic Health Record (EHR) data is complex and strictly regulated, reliance on cloud-based large language models (LLMs) introduces challenges in cost, latency, and compliance. In this work, we present a systematic evaluation of GraphRAG for EHR schema retrieval using locally deployed open-source LLMs. We implement the Microsoft GraphRAG pipeline on real-world EHR schema documentation and benchmark four models, including Llama 3.1 (8B), Mistral (7B), Qwen 2.5 (7B), and Phi-4-mini (3.8B), each deployed via Ollama on a single consumer GPU (8 GB VRAM). We evaluate indexing efficiency, knowledge graph construction, query latency, answer quality, and hallucination under both global and local retrieval modes. Our results reveal substantial differences: Llama 3.1 produces the richest knowledge graph (1,172 entities), Qwen 2.5 achieves the best answer quality (3.3/5), Phi-4-mini fails to complete the pipeline due to structured-output errors, and Mistral exhibits degenerate repetition behavior. We further show that GraphRAG exhibits a practical capacity threshold, where models below approximately 7B parameters fail to reliably produce valid structured outputs and cannot complete the pipeline. In addition, indexing and answer quality are decoupled across models, and local retrieval consistently outperforms global summarization in both latency and factual grounding, with reduced hallucination. These findings demonstrate that GraphRAG is feasible on consumer hardware while highlighting the importance of model selection and retrieval design for robust deployment in regulated settings.