arXiv:2607.02116cs.AI2026-07

为自主AI代理构建可验证的知识治理系统,确保信息来源可信、版本可控。

ContextNest: Verifiable Context Governance for Autonomous AI Agent

论文配图:ContextNest: Verifiable Context Governance for Autonomous AI Agent
图 1 · 摘自论文原文
  • 用带元数据的标记文档和哈希链构建可审计的知识库
  • 治理层使答案准确率提升至97%,输入成本降低三分之二
  • 适合需要合规、可追溯的AI应用团队使用

自主AI代理日益依赖外部知识库,但现有检索流程仅保证相关性,缺乏对来源、版本、完整性、可追溯性的持久保障。本文提出上下文治理概念,并设计ContextNest——一个开放规范与参考实现,用于构建受控的AI可用知识库。它不替代RAG,而是作为底层治理层,在检索前筛选出经批准、当前、可溯源且完整性验证的知识项。该规范结合类型化Markdown文档与元数据、确定性集合选择器、contextnest:// URI引用、SHA-256哈希链版本历史、图级检查点、通过模型上下文协议(MCP)接入实时数据源,以及代理使用上下文的审计日志。这些机制支持组织重建哪些知识版本影响了代理输出,并判断其在消费时是否符合AI使用要求。我们报告两项受控实验结果:在过期版本攻击测试中,治理选择严格优于BM25稀疏检索,答案质量通过率97%对比93%-90%,输入令牌成本约为三分之一;在1,060文档语料的检索确定性实验中,确定性选择器与BM25在重复查询下保持完全一致(杰卡德指数1.0),而密集+HNSW基线在80%查询上非确定(平均杰卡德0.611,最差0.210)。结果表明,上下文治理解决了单纯提升检索质量无法应对的失效模式。核心引擎、CLI工具与MCP服务器已开源。

原文摘要 · Abstract (English)

Autonomous AI agents increasingly depend on external knowledge stores, yet most retrieval pipelines provide relevance without durable guarantees of provenance, version identity, integrity, traceability, or point-in-time reconstruction. We formalize this as context governance and present ContextNest, an open specification and reference implementation for governed AI-consumable knowledge vaults. ContextNest does not replace Retrieval-Augmented Generation (RAG); it supplies the governance layer beneath retrieval, determining which artifacts are approved, current, attributable, and integrity-verified before retrieval systems operate over them. The specification combines typed Markdown documents with metadata, deterministic set-algebraic selectors, contextnest:// URI references, SHA-256 hash-chained version histories, graph-level checkpoints, source nodes for live data through the Model Context Protocol (MCP), and audit traces of agent context consumption. These mechanisms let organizations reconstruct which knowledge versions informed an agent output and whether those versions were AI-eligible when consumed. We report first empirical results from two controlled experiments. In a stale-version attack isolating the governance-versus-retrieval failure mode, governed selection strictly Pareto-dominates BM25 sparse retrieval, with higher answer-quality pass rate (97% versus 93-90%) at about one-third the input-token cost. In a retrieval-determinism experiment over a 1,060-document corpus, deterministic selectors and BM25 return stable document sets across repeated identical queries (Jaccard 1.0), while a dense+HNSW baseline is non-deterministic on 80% of queries (mean Jaccard 0.611, worst case 0.210). These results suggest that context governance addresses failure modes retrieval quality alone is not designed to resolve. We release a core engine, CLI, and MCP server under open licenses.

AI治理知识库RAG可验证

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