arXiv:2608.24921cs.AI2026-08

用PostgreSQL原生构建带时间锚定的图谱RAG,解决数据过时和冗余问题。

post-graph-rag: A PostgreSQL-Native Bi-Temporal Graph RAG Engine with Temporal Grounding at Synthesis

  • 将文档、向量、图谱全存于PostgreSQL,用pgvector搜索、边表遍历。
  • 拒绝模糊、代词、无主语的实体关系,统一命名并标记否定关系。
  • 引入双时间层记录事实生效期与系统认知期,支持时间推理和过时信息覆盖。

图谱RAG能连接单个文本未明确陈述的事实,但现有实现存在三重代价:基础设施上需同步向量库、图数据库和文档库;质量上因不筛选提取结果而存储无效边;时间上因仅累积更新而无法区分旧事实与新事实。post-graph-rag是开源引擎,解决了以上所有问题。文本块、嵌入向量、标准实体图谱与社区摘要均存储于单一PostgreSQL数据库,使用pgvector进行检索,边表支持遍历。提取结果在写入前经验证:模糊谓词、代词名称、孤立数值被拒绝;谓词归一化至可选词汇表;实体按规范名唯一化;否定关系以否定标志保留在正向谓词下。双时间层记录关系真实成立时间与系统认知时间,根据时间先后覆盖不兼容的早期断言。在三个语料库上固定抽取与嵌入模型对比LightRAG,其图谱密度更高,每实体关系最多达2.4倍,且查询性更强:每关系不同边标签数0.46-0.58,低于基准的0.77-1.33。在长期记忆评估(LongMemEval)中,500个长时程对话问题,gemini-3.6-flash得分85.8%,优于Zep的gpt-4o(71.2%)和全上下文基线(60.2%),六类问题全部领先。最大贡献在于提示中的时间锚定:将每个关系的有效期传递至生成阶段,使时间推理得分从0.496提升至0.881(消融实验中每实例一张图)。

原文摘要 · Abstract (English)

Graph RAG connects facts no single passage states, but implementations pay three times: in infrastructure, keeping vector store, graph database and document store in sync; in quality, because a pipeline that never refuses extractor output stores edges that assert nothing; and over time, because a graph that only accumulates treats superseded and current facts alike. post-graph-rag is an open-source engine addressing all three. Chunks with embeddings, a canonical entity graph and community summaries live in one PostgreSQL database, with pgvector for search and edge tables for traversal. Extraction output is validated before writing: vague predicates, pronominal names and bare quantities are rejected, predicates normalise onto an optional vocabulary, entities resolve to one vertex per canonical name, and denials keep the positive predicate under a negation flag. A bi-temporal layer records when a relation held and when the system believed it, superseding incompatible earlier assertions from document order. Against LightRAG on three corpora with extraction and embedding models fixed, it builds a denser graph everywhere, up to $2.4\times$ the relations per entity, and a more queryable one: 0.46-0.58 distinct edge labels per relation against 0.77-1.33. It supersedes 13 and 8 relationships where the baseline, having no temporal model, supersedes none. On LongMemEval, 500 questions of long-horizon chat memory, it scores 85.8 percent with gemini-3.6-flash against 71.2 for Zep's gpt-4o and 60.2 for a full-context baseline, leading on all six question types. The largest single contribution is temporal grounding in the prompt: carrying each relation's validity period through to synthesis moves temporal reasoning from 0.496 to 0.881, ablated paired on one graph per instance. Code: post-graph-rag https://github.com/crajah/post-graph-rag; post-graph https://github.com/crajah/post-graph

图谱RAG时间建模PostgreSQL知识融合

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。