How RAPTOR, GraphRAG, and OpenViking Structure RAG Knowledge
A WeChat article explains that flat retrieval can struggle with statistical counting and cross-document relationships, then presents three approaches that organize knowledge before retrieval. RAPTOR builds a recursive tree of clustered summaries; GraphRAG represents entities and relationships in a knowledge graph with community summaries; and OpenViking maps agent memories, resources, and skills into a virtual file system. The article also discusses incremental updates, version-aware retrieval, and expiry cleanup as knowledge-governance practices.
The article offers a practical selection framework: RAPTOR for hierarchical technical documents, GraphRAG for relationship-oriented questions, and OpenViking’s file-system paradigm for agent context. It also notes that structured indexing adds cost, so it should be used selectively rather than as a default for every RAG scenario.
原文:mp.weixin.qq.com/s/R3MJ-y8cm…(2026年10月03日)
前三篇里,RAG 一直是“扁平”的:把文档切成小片,平铺着存,查询时按相似度捞几片回来。这在很多场景已经够用,但它有一类问题天生答不好。
书里给了两个典型案例。统计计数:知识库里放了 100 份独立文本,其中 90 只黑猫、10 只白猫,用户问“黑猫白猫各占多少”。系统会卡在三重障碍上——top-k 限制了召回数量,大部分样本根本捞不回来;每份文本的描述有差异,检索分数参差不齐,样本持续遗漏;而检索的逻辑是“找相似片段”,统计却需要“遍历全部文档”。第二类是跨文档关联:答案分散在好几篇文档里,靠“找相似”根本串不起来。