提出PatchOptic框架,解决多智能体共享状态更新的合法性验证问题。
PatchOptic for Shared-State LLM Workflows with Projected Views and Verified Structured Updates
- 通过投影读取和受验结构补丁实现状态视图的双向操作
- 运行时验证阻止非法更新,减少数据泄露并降低令牌开销
- 支持工作流拆分、组合与静态重排,适合复杂协作系统
智能体工作流常在共享结构化状态上运行。由于大模型上下文窗口有限,每次调用仅展示当前步骤所需的状态片段,这种模式称为渐进披露。现有系统使用类似grep的关键词搜索、检索增强生成(RAG)、抽象语法树(AST)查询及任务特定技能构造模型可见视图,虽便于读取,但未定义本地修改在回写全局状态后的有效性。缺失的是局部更新与全局一致性的契约。本文提出PatchOptic,一种受光学(optic)启发的共享状态工作流接口。光学是可组合的双向访问器,描述结构化数据视图的读写方式。PatchOptic借鉴这一思想,通过投影读取和受验结构补丁实现。每个工作流步骤声明投影读取视图、授权写入区域和补丁源区域。除运行时强制执行外,同一声明还生成路径级足迹,支持委托、子工作流组合及同阶段独立步骤的静态重排证书。我们在包含46个案例的PatchBench基准上评估该设计:投影读取减少报告泄露与令牌成本,同时在强执行者下保持输出质量;运行时验证在提交前拦截工作流契约违规;补丁读取强制拒绝使用隐藏来源的受损补丁制品。
原文摘要 · Abstract (English)
Agentic workflows often operate over shared, structured state. Because LLM context windows are limited, each model invocation is typically shown only the state fragment needed for the current workflow step, a pattern commonly known as progressive disclosure. Modern systems construct such model-facing views using grep-like keyword search, retrieval-augmented generation (RAG), abstract-syntax-tree (AST) queries, and task-specific agent skills. These methods make the read side manageable, but they do not define when a locally proposed rewrite is valid after it is applied back to the full state. The missing piece is a contract between local updates and global validity. We introduce PatchOptic, an optic-inspired interface for shared-state LLM workflows. Optics are compositional bidirectional accessors that describe how views of structured data are read and updated. PatchOptic borrows this view/update intuition and realizes it through projected reads and verified structured patches. Each workflow step declares a projected read view, an authorized write region, and a patch-source region. Beyond runtime enforcement, the same declaration yields a path-level footprint that supports delegation, sub-workflow composition, and static certificates for reordering independent steps within the same phase. We evaluate this design with PatchBench, a benchmark with 46 cases across domains. The results show that projected reads reduce reported leakage and token cost while preserving accepted-output quality under the strong actor. Runtime verification blocks declared workflow-contract violations before commit, and patch-read enforcement rejects compromised patch artifacts that use hidden sources.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。