提出LLM代理运行时架构设计方法,解决随机与确定性系统融合难题。
A Methodology for Selecting and Composing Runtime Architecture Patterns for Production LLM Agents
- 定义随机-确定性边界(SDB)作为代理运行时核心契约
- 提出六种可组合的运行时模式,适配不同任务类型
- 揭示模型版本变化引发的重播偏差问题,强调架构设计关键性
生产级LLM代理将随机模型输出与确定性软件系统结合,但两者边界常被忽视。本文提出‘随机-确定性边界’(SDB):由提议者、验证者、提交步骤和拒绝信号构成的四部分契约,定义模型输出如何成为系统动作。我们主张SDB是生产代理运行时的核心构件,并围绕其构建三大设计关注点:协调、状态与控制。提出六种运行时模式,分别适用于对话式、自主型和长周期代理:分层委派、散列-汇聚+Saga、事件驱动编排、共享状态机、监督器+门控、人机协同。每种模式追溯分布式系统概念,指出随机工作节点带来的变化。论文贡献五步选择方法、故障诊断流程,并发现‘重播偏差’这一新型失败模式——在模型版本或提示变化下,基于确定性事件日志的LLM消费端产生不同下游结果。通过可靠性分解,分离单次调用模型方差与架构惯性,表明随着模型方差下降,模式选择与SDB强度将成为长期可靠性的关键杠杆。在五个工作负载上应用该方法,并提供一个90天合同续签代理的可运行参考实现。
原文摘要 · Abstract (English)
Production LLM agents combine stochastic model outputs with deterministic software systems, yet the boundary between the two is rarely treated as a first-class architectural object. This paper names that boundary the stochastic-deterministic boundary (SDB): a four-part contract among a proposer, verifier, commit step, and reject signal that specifies how an LLM output becomes a system action. We argue that the SDB is the load-bearing primitive of production agent runtimes. Around this primitive, we organize agent runtime design into three concerns: Coordination, State, and Control. We present a catalog of six runtime patterns that compose the SDB differently across conversational, autonomous, and long-horizon agents: hierarchical delegation, scatter-gather plus saga, event-driven sequencing, shared state machine, supervisor plus gate, and human in the loop. For each pattern, we trace its lineage to distributed-systems concepts and identify what changes when the worker is stochastic. The paper contributes a five-step methodology for selecting runtime patterns, a diagnostic procedure that maps production failures to pattern weaknesses, and a failure mode called replay divergence, in which LLM-based consumers of a deterministic event log produce different downstream outputs under model-version or prompt changes. A stylized reliability decomposition separates per-call model variance from architectural momentum, motivating the claim that as model variance decreases, pattern choice and SDB strength become increasingly important levers for long-run reliability. We apply the methodology to five workloads and provide one runnable reference implementation for a 90-day contract-renewal agent.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。