Stochastic LLM Agent vs. Deterministic Coded System
Stochastic LLM Agent vs. Deterministic Coded System: Comparative Failure Mode Analysis on Identical Unvalidated Inputs
- Stochastic multi-step Large Language Model systems are more likely than deterministic coded systems to continue operating after an invalid or attacker-shaped input while silently shifting toward a semantically wrong task state, because external text can be reinterpreted as instructions instead of rejected as malformed inputAnthropic (2026)Abdelnabi et al. (2023)Yi et al. (2025)Microsoft (2025)
- Deterministic coded systems usually expose the same bogus-input failure through explicit reject, exception, timeout, or replayable wrong-state behavior, which makes the local failure path easier to reproduce and inspect even when the wider service graph is complexAvizienis et al. (2004)Ewaschuk (n.d.)Mitchell (2026)
- Repeated-run evidence shows that supposedly deterministic Large Language Model settings still produce materially different outputs and assessment paths on identical prompts, which weakens exact replay of one invalid-input failure path relative to deterministic softwareAtil et al. (2025)Denisov-Blanch et al. (2025)Mitchell (2026)
- The most distinctive agent-only failure mechanisms in the reviewed evidence are semantic drift, same-model verifier collapse, and tool or memory-mediated error propagation, because the system can keep acting on a corrupted latent task representation instead of stopping at the original boundary violationHuang et al. (2024)Mitchell (2026)Abdelnabi et al. (2023)Yi et al. (2025)
- Production incident evidence from Large Language Model serving and recent agent-observability research together support an inferential conclusion that stochastic systems need richer observability than conventional service monitoring aloneRanganathan et al. (2026)Dong et al. (2024)
- Both deterministic and stochastic systems fit the same abstract fault, error, and failure chain, but the practical asymmetry is where failure becomes visible: deterministic systems more often fail at the execution boundary, while stochastic systems more often fail later at the semantic interpretation layerAvizienis et al. (2004)Heim et al. (2025)Abdelnabi et al. (2023)Yi et al. (2025)
- Large deterministic systems can still become globally opaque at scale, but current evidence does not support collapsing the two classes into the same failure model, because local replayability remains stronger on the deterministic side even when global explanation remains hardEwaschuk (n.d.)Mitchell (2026)
Research Question
How do the failure modes of a stochastic multi-step Large Language Model (LLM) agent, meaning a tool-using system whose action path can vary across runs, differ fundamentally from the failure modes of a deterministic coded system when both process the same unvalidated input?
Findings
(Populated from §6 Synthesis above.)
Executive Summary
Stochastic multi-step Large Language Model agents fail differently from deterministic coded systems because the same unvalidated input can be absorbed as plausible context, branch differently across runs, and propagate a semantically wrong task state without an immediate hard failure. Deterministic coded systems can still be wrong or become globally opaque at production scale, but their local bogus-input failures are more often explicit, replayable, and classifiable through conventional fault-error-failure models and monitoring signals. Production evidence from Large Language Model serving shows that even when incidents are detected automatically, mitigation remains manual and slow, which is consistent with stochastic systems needing richer observability because ordinary operational telemetry does not fully capture their failure mechanisms. Current evidence supports a narrower asymmetry: stochastic systems are more likely to fail silently and variably at the semantic layer, while deterministic systems are more likely to fail loudly or at least reproducibly at the execution boundary.
Key Findings
- Stochastic multi-step Large Language Model systems are more likely than deterministic coded systems to continue operating after an invalid or attacker-shaped input while silently shifting toward a semantically wrong task state, because external text can be reinterpreted as instructions instead of rejected as malformed input.
- Deterministic coded systems usually expose the same bogus-input failure through explicit reject, exception, timeout, or replayable wrong-state behavior, which makes the local failure path easier to reproduce and inspect even when the wider service graph is complex.
- Repeated-run evidence shows that supposedly deterministic Large Language Model settings still produce materially different outputs and assessment paths on identical prompts, which weakens exact replay of one invalid-input failure path relative to deterministic software.
- The most distinctive agent-only failure mechanisms in the reviewed evidence are semantic drift, same-model verifier collapse, and tool or memory-mediated error propagation, because the system can keep acting on a corrupted latent task representation instead of stopping at the original boundary violation.
- Production incident evidence from Large Language Model serving and recent agent-observability research together support an inferential conclusion that stochastic systems need richer observability than conventional service monitoring alone.
- Both deterministic and stochastic systems fit the same abstract fault, error, and failure chain, but the practical asymmetry is where failure becomes visible: deterministic systems more often fail at the execution boundary, while stochastic systems more often fail later at the semantic interpretation layer.
- Large deterministic systems can still become globally opaque at scale, but current evidence does not support collapsing the two classes into the same failure model, because local replayability remains stronger on the deterministic side even when global explanation remains hard.
Assumptions
- No reviewed source provides a controlled head-to-head experiment in which the exact same unvalidated inputs are fed into both a deterministic workflow and a stochastic agent, so this item assumes that comparing formal failure properties plus production studies is a defensible proxy.
- The deterministic comparison assumes fixed code, configuration, and initial state, because distributed concurrency and deployment churn can create additional complexity that is operationally important but not identical to intrinsic stochastic branching.
- "Unvalidated input" covers both syntactically malformed payloads and semantically misleading but locally plausible content, because both kinds of input are relevant to where each system class exposes or hides failure.
Analysis
The most strongly supported parts of the evidence base are repeated-run Large Language Model nondeterminism, prompt-injection and indirect prompt-injection vulnerability, and conventional software-operations expectations that bogus-input failures surface through explicit monitoring and root-cause repair. The comparative conclusion therefore rests less on one direct benchmark and more on how these evidence families fit together: stochastic agents add path variance and a tendency to absorb semantically misleading input as plausible context on top of ordinary software failure, while deterministic systems keep stronger local replayability even when they become globally hard to understand. A plausible rival interpretation is that large deterministic distributed systems are already so opaque that the comparison gap disappears in practice. The reviewed evidence does not support that stronger claim, because the operational difficulty of understanding the whole deterministic system is not the same as having one input induce different failure paths across identical reruns or being silently reinterpreted as instructions.
Risks, Gaps, and Uncertainties
- There is no direct controlled benchmark in the reviewed evidence that feeds the same corpus of unvalidated inputs into matched deterministic and stochastic production systems, so the comparison remains a synthesis rather than a single-study verdict.
- The strongest production telemetry source is about Large Language Model serving rather than full autonomous tool-using agents, so the observability conclusion is stronger for model operations than for every possible agent architecture.
- The deterministic side is grounded in formal taxonomy and Site Reliability Engineering practice more than in a modern benchmark dedicated specifically to bogus-input failure visibility across microservice stacks.
Open Questions
- Which fraction of real production agent incidents begin as explicit hard failures versus silent semantic degradations?
- What trace schema is minimally sufficient to reconstruct a stochastic agent's branch path after an incident?
- Under what constraints can structured outputs or deterministic harness layers convert a stochastic semantic failure into a deterministic reject path?
- How should the next item, Research Question 5.2, model the loss of formal verifiability as branch variance increases?
sources
Consulted:
- [x] Avizienis et al. (2004) Basic Concepts and Taxonomy of Dependable and Secure Computing
- [x] Ewaschuk (n.d.) Monitoring Distributed Systems
- [x] Anthropic (2026) Trustworthy agents
- [x] Abdelnabi et al. (2023) Not what you've signed up for: Compromising Real-World Large Language Model-Integrated Applications with Indirect Prompt Injection
- [x] Yi et al. (2025) Benchmarking and Defending Against Indirect Prompt Injection Attacks on Large Language Models
- [x] Huang et al. (2024) Large Language Models Cannot Self-Correct Reasoning Yet
- [x] Atil et al. (2025) Non-Determinism of "Deterministic" LLM Settings
- [x] Denisov-Blanch et al. (2025) Measuring Determinism in Large Language Models for Software Code Review
- [x] Heim et al. (2025) A Guide to Failure in Machine Learning: Reliability and Robustness from Traditional Software to Modern Foundation Models
- [x] Dong et al. (2024) AgentOps: Enabling Observability of Large Language Model Agents
- [x] Ranganathan et al. (2026) An Empirical Study of Automation Gaps in Large Language Model Serving Systems
- [x] Microsoft (2025) How Microsoft defends against indirect prompt injection attacks
- [x] Mitchell (2026) Research Question 4.2: Adversarial inputs and error propagation through multi-step tool-using verification and strategy phases
- [x] Mitchell (2026) Research Question 4.3: Formal bounds on generalisation outside the training distribution for tool-using Large Language Model systems under non-deterministic tool outputs
- [x] Mitchell (2026) Practical Limits of Large Language Model Determinism: Temperature Zero, Fixed Seeds, and Constrained Prompts
- [x] Mitchell (2026) Are Multi-Step Large Language Model-Based Systems Inherently Less Explainable Than Equivalently Scoped Deterministic Software Systems?
Identified but not consulted:
- [ ] Dijkstra (1989) On the Cruelty of Really Teaching Computer Science
- [ ] Bernstein and Sequin (1988) Sequoia: A Fault-Tolerant Tightly Coupled Multiprocessor for Transaction Processing