生产 LLM 代理将随机模型输出与确定性软件系统, 相结合,但两者之间的边界很少被视为一流的体系结构对象。本文将随机确定性边界 (SDB): 命名为提议者, 验证者, 提交步骤, 和拒绝信号之间的四部分合同,该信号指定 LLM 输出如何成为系统操作。我们认为 SDB 是生产代理运行时的承载原语。围绕这个原语,,我们将代理运行时设计组织为三个关注点:协调,状态,和控制。我们提出了六种运行时模式的目录,这些模式以不同的方式组成了会话,自主,和长视野代理:分层委托,分散-聚集加上saga,事件驱动排序,共享状态机,监管者加上门,和循环中的人。对于每个模式,,我们追踪其与分布式系统概念的血统,并确定当工作线程是随机的时会发生什么变化。本文提供了一种用于选择运行时模式, 的五步方法,一种将生产故障映射到模式弱点, 的诊断程序,以及一种称为重播分歧, 的故障模式,其中确定性事件日志的基于 LLM 的使用者在模型版本或提示更改下产生不同的下游输出。程式化的可靠性分解将每次调用的模型方差与架构动量, 分开,这促使人们声称,随着模型方差的减少,,模式选择和 SDB 强度成为长期可靠性越来越重要的杠杆。我们将该方法应用于五种工作负载,并为 90 天合同续订代理提供一个可运行的参考实现。
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.
科目: 人工智能 (cs.AI); 软件工程 (cs.SE)
Subjects: Artificial Intelligence (cs.AI); Software Engineering (cs.SE)