Nondeterminism
Nondeterminism is the property of a system or computation in which the same inputs and conditions can produce different possible behaviors or outcomes.
Machine Learning Platform Engineering
Nondeterminism is behavior in which identical inputs can produce different valid outputs across executions.
- How it is used
- Reframes LLM testing and production quality assurance around variable but valid outputs.
- How deep it goes
- Explains probabilistic variation through sampling parameters and stops short of detailed model internals.
- Examples
- Uses temperature, top-k, and top-p settings to demonstrate deterministic and increasingly varied outputs.
- What you can do after
- Evaluate LLM responses semantically and tune sampling settings instead of relying on exact string matches.
Read how Machine Learning Platform Engineering explains nondeterminism →
Machine Learning System Design
Nondeterminism is the property that identical apparent inputs may produce different outcomes because of uncontrolled state, data, timing, or randomness.
- How it is used
- Frames API design around making every factor affecting an ML prediction visible and controllable.
- How deep it goes
- Explains hidden time and random state through contrasting predict-function designs, without developing algorithmic internals.
- Examples
- Uses stochastic text generation, Python predict functions, current time, random seeds, and explicit random state as examples.
- What you can do after
- Diagnose irreproducible predictions by identifying implicit inputs and exposing time, seeds, and other output-controlling parameters.
Read how Machine Learning System Design explains nondeterminism →
Generative AI in Action
Nondeterminism is the property that repeated executions with the same apparent inputs can produce different outputs rather than a single fixed result.
- How it is used
- Guides temperature and evaluation choices for creative, automation, prompting, and image-generation workflows.
- How deep it goes
- Defines repeated-run variation and demonstrates temperature effects, but does not derive the underlying generation mathematics.
- Examples
- Uses repeated text completions at temperatures 0.8, 0.2, and 1.8, plus image prompts producing varied generated images.
- What you can do after
- Apply temperature and sampling-count settings, then evaluate generated text or images for consistency, quality, and risk.
Build High Value Software Systems
The property of behavior that can produce different outcomes for the same input because of probabilistic processes or varying execution conditions.
- How it is used
- Uses nondeterminism to explain why shared standards matter when AI generates code across features.
- How deep it goes
- Contrasts inconsistent patterns with standards-driven consistency, without explaining the system's underlying mechanisms.
- Examples
- Compares error handling in payment and refund flows and cites differing logging and validation patterns.
- What you can do after
- Apply team standards in AI prompts to make repeated feature work produce more consistent patterns.
Read how Build High Value Software Systems explains nondeterminism →
Data-Oriented Programming in Java
Non-determinism is the property that identical inputs can produce different outputs because of hidden mutable state or other varying conditions.
- How it is used
- Organizes application dependencies by separating deterministic domain transformations from non-deterministic effects and service interactions.
- How deep it goes
- Explains causes, testing consequences, refactoring steps, and architectural boundaries, while allowing practically negligible theoretical nondeterminism.
- Examples
- Uses current dates, database lookups, service calls, mutable person state, parallel reduction, and late-fee processing as examples.
- What you can do after
- Diagnose/debug with it by locating hidden dependencies, extracting deterministic functions, and testing them without extensive mocks.
Read how Data-Oriented Programming in Java explains nondeterminism →
Also covered in
- Learn AI-Assisted Python Programming, Second Edition
- The Art of AI Product Development
- Software Testing with Generative AI
- Tiny Python Projects: Learn coding and testing with puzzles and games
- Grokking AI Applications
- Learn AI Data EngineeringIn early access (MEAP)
- Investing for Programmers
- Spring AI in Action
- Context EngineeringIn early access (MEAP)
- Microservices Patterns, Second EditionIn early access (MEAP)
- Digital Twins in Action
- Data Pipelines with Apache Airflow, Second Edition
What to know first
- language modelA language model is a computational model that represents patterns in linguistic sequences to assign probabilities, predict, generate, or evaluate language.
- contractA contract is an agreed specification of the conditions, expectations, rights, or obligations that govern behavior or interactions between parties or software components.
- loopA loop is a programming-language control-flow construct that repeatedly executes a block of instructions according to an iteration rule or continuation condition.
- generative modelingGenerative modeling is a machine-learning approach that learns patterns or a data distribution to generate new samples resembling the data.
Related concepts
- conversational aicontrasts with · Conversational AI is artificial intelligence that enables software systems to interpret user input and interact with users through natural-language dialogue.
- determinismcontrasts with · Determinism is the property that the same relevant inputs, state, and conditions uniquely determine the same outcome or behavior.
- temperatureconfigured by · A temperature parameter controls the spread of a probability distribution or the likelihood of selecting less-favored alternatives in stochastic sampling or search.
- assertioncontrasts with · A software assertion is an executable check of an expected condition or property that signals failure when the check does not hold.
- mockingaddressed by · Mocking is a testing technique that replaces a dependency or collaborator with a controlled substitute to simulate behavior, isolate code, or inspect interactions.
Questions about nondeterminism
What is nondeterminism?
Nondeterminism is the property of a system or computation in which the same inputs and conditions can produce different possible behaviors or outcomes.
Which Manning books explain nondeterminism?
Machine Learning Platform Engineering, Machine Learning System Design, Generative AI in Action, Build High Value Software Systems and Data-Oriented Programming in Java.
What should I know before learning nondeterminism?
Manning books that teach nondeterminism usually introduce language model, contract, loop and generative modeling first.
What is the difference between nondeterminism and conversational ai?
Nondeterminism is the property of a system or computation in which the same inputs and conditions can produce different possible behaviors or outcomes. Conversational AI is artificial intelligence that enables software systems to interpret user input and interact with users through natural-language dialogue.
What is nondeterminism also called?
Nondeterminism is also called non-determinism or nondeterministic.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




