Short answer
Deterministic agent execution follows fixed code or rules, so the same input always produces the same result, while probabilistic execution uses a language model whose output can vary from run to run. Most production AI agents combine the two.- Deterministic
- Same input, same output, every time
- Probabilistic
- Output generated by a model, so it can vary between runs
- Deterministic suits
- Permissions, limits, calculations and actions that change data
- Probabilistic suits
- Reading messages, choosing a path, writing replies
- Tested by
- Unit tests for rules; many runs on real conversations for models
An AI agent does two kinds of work. It reads and writes language, which no fixed rule can do well, and it takes actions, which need to happen exactly the same way every time. The first is probabilistic; the second should be deterministic. Most agent failures come from mixing them up.
The difference at a glance
The test is what happens when you run the same input twice.
| Deterministic execution | Probabilistic execution | |
|---|---|---|
| How it decides | Code, rules or a decision tree | A language model predicting the likeliest output |
| Same input twice | Same result | Possibly a different result |
| New wording | Fails unless someone wrote a rule for it | Handles phrasing nobody anticipated |
| How you test it | Each case once, pass or fail | Many runs, measured as how often it is right |
| Typical failure | Breaks on the unexpected | Confident and wrong |
Where each belongs in an AI agent
A good agent uses the model to understand and write, and fixed code for everything that has to hold. A refund request in a Shopify store shows the split:
- Reading "I want my money back for the blue one" is probabilistic. The model works out the request and which item.
- Finding the order is deterministic: a lookup by email or order number.
- Checking the order belongs to this customer is deterministic. It passes or fails.
- Capping the refund at what the order can still refund is deterministic arithmetic.
- Deciding whether a person must approve it is a deterministic rule.
- Writing the reply is probabilistic, based on what the steps above returned.
The model chooses the path. The steps that touch money and data run the same way every time.
Why the same prompt gives different answers
Language models generate text by choosing among likely next words, with some randomness built in. Lowering the temperature setting reduces that randomness, but small differences can still appear between runs, and a model update can change answers that used to be stable.
That is why a probabilistic agent is judged by how often it gets something right across many conversations, not by one good demo.
How to test a probabilistic agent
Testing a probabilistic system means measuring a rate, not checking a single result.
- Build test cases from real past conversations, including messy and unusual ones.
- Run each case several times and compare the results.
- Grade replies against a written definition of an acceptable answer.
- Test the deterministic limits separately, with ordinary unit tests: the refund cap, the ownership check, the approval rule.
- Keep every confirmed failure as a test case for the next change.
In Aide, a draft procedure can be replayed against a single past conversation before it goes live, and the agent's Preview states what each answer is drawn from, so a team checks the reply and its source together.
Common mistakes
Most problems come from putting a job on the wrong side of the line.
- Business rules in the prompt. "Never refund more than $100" in an instruction is guidance the model usually follows. A deterministic check in code is a rule it cannot break.
- Scripting everything. A decision tree for every message is fully deterministic and fails the moment a customer phrases something new.
- Trusting one run. A probabilistic agent that handled a test well once has shown it can, not that it will.
A deterministic check, in this sense, is any test that returns the same pass or fail for the same input: an ownership match, an amount limit, a status that must be "unfulfilled". The practice this page rejects is writing those checks into a prompt and calling the agent controlled.
With Aide, a rule such as "only for orders shipping to Canada" does not have to live in a prompt: a procedure's Only if conditions check the Shopify order itself, such as its tags, destination country or shipment status, before the procedure may run at all.
Where Aide fits
Aide uses a language model to read each message, pick the procedure that fits and write the reply. The limits around it are fixed: order actions are only for shoppers who prove the order is theirs, refunds are capped at what the order can still refund and wait for a teammate by default, and each topic's AI level decides whether Aide acts, drafts or does neither. Every reply is checked before it is sent, and a procedure's trigger can be checked on recent real conversations before it goes live. See procedures in Aide.