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

Muhammad Zia Hydari, Raja Iqbal
6/8/2026
cs.AIcs.CYecon.GN

No confident code implementation found for this paper.

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{hydari2026token,
  title  = {The Token Not Taken: Sampling, State, and the Stochasticity of AI Agents},
  author = {Muhammad Zia Hydari and Raja Iqbal},
  year   = {2026},
  eprint = {2606.08998},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.08998v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.08998.svg)](https://codeofpaper.com/paper/2606.08998)

Discussion