What is a deterministic algorithm?
A deterministic algorithm is a procedure that produces the same output every time it receives the same input, because none of its steps involves a random choice. A payroll calculation, a sales tax lookup, a sorting routine, and a rules engine that applies a credit policy are all deterministic. Robotic process automation and traditional workflow tools behave the same way, since they follow a fixed script.
Many trained machine learning models are also deterministic once training ends. A decision tree, for example, returns the same score for the same record every time. Large language models usually are not, because they choose each word by sampling from likely candidates, which makes them probabilistic algorithms.
Why a deterministic algorithm matters
Determinism makes software testable and auditable. A test can check for an exact expected result, and an auditor can rerun a calculation and get the reported figure. A deterministic algorithm can still be wrong, but it is wrong the same way every time, so the error can be traced and fixed.
A well-designed AI system uses deterministic code for anything that must be exact and repeatable, and reserves the model for reading, classifying, and drafting. A municipal water utility that adds a language model to answer billing questions lets the model explain the charges, while the tiered rate calculation in the billing system produces the amount owed. An agent that needs a figure or a policy check should call a deterministic tool to get it.