arXiv:2606.08998cs.AIcs.CY2026-06

解释AI代理行为不一致的根源,揭示随机采样如何影响决策路径。

The Token Not Taken: Sampling, State, and the Stochasticity of AI Agents

  • 区分内在随机性(如令牌采样)与外在变量(环境、数据等)
  • 小的采样差异可导致工具调用、代码路径等显著不同
  • 适合关注AI可重复性与部署稳定性的研究者

智能代理系统在多次运行中可能表现出不同行为:相同请求可能导致不同的计划、工具调用、代码修改或最终答案。这种变异性源于多个常被混淆的层面。当前多数代理的核心是基础模型——一个可适应多种下游任务的大规模预训练模型,并嵌入于规划、调用工具、观察结果并更新状态的协调循环中。其中显式的内在随机源是令牌生成:模型计算下一个可能令牌的得分,转换为概率,解码器使用伪随机数生成器采样令牌。微小的采样差异可能在下游引发不同的工具调用、代码路径、搜索查询或代理状态。其他变异性来源则源自令牌采样之外,包括动态环境、实时数据、服务基础设施、批处理效应和数值细节。通过分离这些层次,本文澄清了称代理系统为‘随机’的含义,在匹配条件下何时可重现,以及为何确定性执行并不意味着部署环境中行为完全一致。

原文摘要 · Abstract (English)

Agentic AI systems can behave differently across runs: the same request may produce a different plan, a different tool call, a different code edit, or a different final answer. Such variability arises from several layers that are often conflated. At the core of many current agents is a foundation model, a large pretrained model adaptable to many downstream tasks, embedded in an orchestration loop that plans, calls tools, observes results, and updates state. One explicit intrinsic source of variability in such systems is token generation: the model computes scores over possible next tokens, the scores are converted into probabilities, and a decoder may sample tokens using a pseudo-random number generator. A small sampled token difference can then cascade downstream into a different tool call, code path, search query, or agent state. Other sources of variability are extrinsic to token sampling, including changing environments, live data, serving infrastructure, batch effects, and numerical details. By separating these layers, this tutorial clarifies what it means to call agentic AI systems stochastic, when such variability can be reproduced under matched conditions, and why deterministic execution need not imply identical behavior in deployed settings.

AI代理随机性可复现性

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