GraphRAG: How AI Answers Questions Hidden Across Many Documents

编译摘要

1. 浓缩

  • 核心结论1: RAG 的根本限制在于相似度假设——"答案文本与问题相似"——对 local queries(who/what/when/where)成立,对 global queries(跨语料的推理/汇总问题)失效;Vector retrieval with 64K token context 仍输给 GraphRAG,因为 vector 返回的是 vocabulary 共现而非 underlying pattern
    • 关键证据: Microsoft 测试,Vector RAG with 8K/64K context 在 global questions 上仍 gap on comprehensiveness, diversity, supporting source material
  • 核心结论2: GraphRAG 的解决路径是把 corpus 转换为 knowledge graph + 预生成 community reports——6 阶段 indexing pipeline(chunking → entity/relation extraction → merge with description compression → optional claim extraction → Leiden community clustering → community report generation);每个 community 在多个 level 都有 summary,全文-level query 答案在 indexing 时已写就
    • 关键证据: Microsoft documented workflow;graph extraction 占 indexing cost ~75%;每个 entity/relationship/claim 保留 text-unit pointer 支持 citation
  • 核心结论3: 三种 query modes 服务不同 query 类型——local search(5 个并行 expansion:text units/community reports/neighbors/relationships/claims)+ global search(map-reduce over community reports)+ DRIFT search(混合模式);Agentic RAG 用 LM 路由 query 类型到合适策略,避免单策略 trade-off
    • 关键证据: 5 个 parallel streams for local;map/reduce over shuffled batches for global;LlamaIndex two-layer composite retriever + auto-routed mode
  • 核心结论4: LinkedIn customer service (SIGIR 2024) 是 GraphRAG 实证案例——rebuild retrieval around knowledge graph 提升 MRR 77.6%、median per-issue resolution time -28.6%
    • 关键证据: linkedin.com / SIGIR 2024 published results
  • 核心结论5: 经济权衡——full GraphRAG indexing 成本是 vector RAG 的 1000×;LazyGraphRAG 用 NLP 替代 LM extraction + 推迟所有 LM 工作到 query time,把 indexing 成本降至 0.1% of full GraphRAG;query cost 降 700×
    • 关键证据: Microsoft LazyGraphRAG paper——indexing cost 0.1%,global-query quality comparable
  • 核心结论6: GraphRAG 不减少 hallucination——它在 comprehensiveness / diversity / supporting source material 上优于 baseline RAG,但在 faithfulness 上相当
    • 关键证据: Microsoft 自己的评估结论

2. 质疑

  • 关于"GraphRAG 在 global queries 上优于 vector RAG" 的稳定性: Microsoft 自己的测试可能存在 selection bias——他们开发 GraphRAG;需要独立 benchmark 验证
  • 关于"LinkedIn 77.6% MRR 提升" 的因果: rebuild retrieval 包含其他改进(重 index、LLM 升级、UX 改进),不能完全归因于 knowledge graph 本身
  • 关于"indexing cost 75% 是 graph extraction": 这是 Microsoft 文档的估计;不同 corpus 不同——可能 higher 或 lower
  • 关于"LazyGraphRAG 是 universal solution": Microsoft 自己反对"every deployment LazyGraphRAG"——社区报告有独立价值(人阅读和分享),是 GraphRAG 的副产物
  • 关于"DRIFT search 是最佳实践": 是新模式,缺乏广泛独立验证;实际 query 类型分布可能不需要 hybrid
  • 关于"Agentic RAG 解决单策略 trade-off": 增加 LM call 增加 latency + cost + routing error 风险——是元层 trade-off,不是免费午餐
  • 关于"graph extraction prompts tuned to domain": 暗示 GraphRAG 的 cross-domain robustness 较弱——研究性 corpus(生物/法律)需要专门 prompt engineering
  • 关于"FastGraphRAG 的 NLP-only extraction": cheaper 但"considerably more noise"——质量/成本的二选一仍是未解工程选择

3. 对标与旁逸

  • 跨域关联1: GraphRAG 的 "leverage knowledge graph to expose corpus-wide patterns" 与 RAG-vs-LLM-Wiki 的 "structured knowledge + semantic retrieval" 互补——RAG-vs-LLM-Wiki 是知识库构建对比,GraphRAG 是 retrieval architecture 对比
  • 跨域关联2: GraphRAG 的 community detection + community reports 与 Knowledge-Compilation 的 canonicalization 类似——两者都是把分散源材料"压缩成可重用的语义层",但前者是 retrieval-time 优化,后者是 human curation
  • 跨域关联3: GraphRAG 的 indexing pipeline(chunk → extract → merge → cluster → report)与 Decision-Centric-Architecture 的 ontology build pipeline 同构——ontology 是更结构化的图,GraphRAG 是 LM-extracted 较轻图
  • 跨域关联4: GraphRAG 的 entity extraction prompts 与 Skills-as-Products 的 eval prompt 治理同源——prompt quality 决定 system quality
  • 跨域关联5: Agentic RAG 的 query classification 与 Skills-as-Products 的 scope 治理同构——"what to do with which input" 是 agent 时代核心问题
  • 跨域关联6: Global queries 的 fundamental limitation 与 Knowledge-Profiling 的 recall bottleneck 同构——LLM 知道什么 vs 能 recall 什么之间有 gap,知识图谱通过预生成 reports 部分缓解
  • 跨域关联7: GraphRAG cost (75% extraction + community report) 与 Prompt Caching(forward reference,未建 entity) / Inference-Engineering 同源——LLM call 成本是 systemic concern
  • 跨域关联8: GraphRAG 与 Structured-Agent-Memory 的多属性结构化记忆同源——都是"用 structure 暴露 retrieval gap"
  • 跨域关联9: "Graph extraction prompts tuned to domain" 与 LLM-as-a-Judge 的 rubric design 同源——extraction prompt 是 judge rubric

关联概念