# Probabilistic vs deterministic

Concept · [Building with AI](https://ecosystem.samcarlton.com/ai)

Also called: probabilistic, deterministic, non-deterministic, stochastic, Non-determinism, randomness

Deterministic software gives the same output for the same input every time. [AI models](https://ecosystem.samcarlton.com/model) are probabilistic: they pick likely words with some randomness, so the same question can get different answers. This is why AI products need [checks](https://ecosystem.samcarlton.com/automated-check).

**For example:** A calculator always says 2 + 2 = 4. Ask an [LLM](https://ecosystem.samcarlton.com/llm) to write a product description twice and you get two different versions.

## Connects to (8)

- [Sampling](https://ecosystem.samcarlton.com/sampling): How a model chooses each next token from its list of likely options.
- [Temperature](https://ecosystem.samcarlton.com/temperature): A setting that controls how random an AI model's word choices are.
- [Evals](https://ecosystem.samcarlton.com/evals): Tests that check whether the outputs of a model or an AI product meet the criteria its builders set.
- [Hallucination](https://ecosystem.samcarlton.com/hallucination): When an AI model states something false or invented as though it were true.
- [Next-token prediction](https://ecosystem.samcarlton.com/next-token-prediction): The one job a language model performs.
- [Automated check](https://ecosystem.samcarlton.com/automated-check): A test or rule a computer runs to catch problems without a person looking, such as tests, type checkers and style checkers.
- [Testing](https://ecosystem.samcarlton.com/testing): Checking that software does what it should, before your users find the problems for you.
- [Inference](https://ecosystem.samcarlton.com/inference): An AI model producing an answer to a request.

Map view: https://ecosystem.samcarlton.com/probabilistic-vs-deterministic
