用依赖图精准检索文档上下文,高效改写长文档且不破坏引用关系。
LEDGER: Scaling Agentic Document Editing with Dependency-aware Graph Retrieval

- 构建轻量依赖图,显式建模文档结构与引用关系。
- 在1900个测试用例中,一致性提升至76%,节省大量计算资源。
- 适合需要高效、高保真文档编辑的AI应用开发者。
我们提出LEDGER,解决智能体进行长篇结构化文档编辑时的上下文工程难题:局部修改需高效执行,同时避免破坏跨引用和语义一致性。LEDGER构建轻量级依赖图,显式建模文档的层级结构、显式引用、隐式依赖及语义关系。每次编辑时,图引导的检索仅选取必要上下文,避免全文档处理,同时保持一致性。我们在涵盖六种先进模型、多种文档类型与长度的1900个测试用例上评估LEDGER,结果显示其将一致性从56%提升至76%,同时降低令牌使用量。值得注意的是,低推理开销的LEDGER可达到高推理开销基线的性能,且消耗更少令牌,表明显式依赖表示可部分替代昂贵的内部推理。
原文摘要 · Abstract (English)
We introduce LEDGER to tackle the novel context engineering challenge of agentic document editing, where localized edits to long, structured documents must be applied efficiently without breaking cross-references or semantic consistency. LEDGER constructs a lightweight dependency graph that explicitly models document structure, including hierarchical organization, explicit references, implicit dependencies, and semantic relationships. For each edit, graph-guided retrieval selects only the necessary context, avoiding full-document processing while preserving consistency. We evaluate LEDGER on a curated benchmark of 1.9k test cases with various document types and lengths, spanning six state-of-the-art models: LEDGER improves consistency from 56% to 76% across all six models and test scenarios while reducing token usage. Notably, LEDGER with low reasoning effort matches baseline performance at high reasoning effort using fewer tokens, showing that explicit dependency representations can partially substitute for expensive internal reasoning in agentic document editing.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。