By Abhijith N M · Reviewed 24 October 2026 · Editorial standards
A vending machine is deterministic. Press B4, get the same chocolate bar, every time, forever. If you get crisps instead, something is broken and you can prove it.
A chef is probabilistic. Order 'the pasta' three nights running and you get three slightly different plates. All three can be excellent. One can be terrible. Nobody would call the restaurant broken because Tuesday's plate had more chilli — but everybody would call it broken if a plate arrived with no pasta at all.
Traditional software is the vending machine. LLM-powered software is the chef. This is not a metaphor for how it feels; it is the mechanical reason your existing test techniques stop working.
When you call an LLM you are not running a function. You are sampling from a probability distribution over the next token, one token at a time. The model assigns a likelihood to every possible next chunk of text, then picks one. Change the sampling settings, the model version, or even just the wording of the prompt, and the distribution shifts.
| Test style | Traditional system | AI system | Verdict |
|---|---|---|---|
| Exact equality | Passes forever, catches real bugs | Fails on harmless rewording | Unusable |
| Substring check | Pretty good | Passes when the answer is wrong but mentions the right words | Weak |
| Schema / format check | Good | Excellent — output shape is still deterministic-ish | Keep it |
| Rubric scoring | Overkill | The workhorse: score the answer against criteria | Core technique |
| Behavioural property | Rarely needed | Best fit: 'must cite a source', 'must not promise a refund' | Core technique |
Notice the pattern. The tests that survive are the ones that describe properties an acceptable answer must have, not the exact characters it must contain. 'Mentions order 4521', 'cites a help-centre article', 'does not promise a refund', 'is under 60 words' — these are assertions you can automate and that do not shatter on a synonym.
Take this prompt for Nova and run it five times with the temperature left at its default of 1.0:
You are Nova, the support assistant for Acme Outfitters.
Answer this customer question: Can I return a sale item?You will typically get something like:
1. 'Sale items can be returned within 14 days if unused.'
2. 'Unfortunately, sale items are final sale and cannot be returned.'
3. 'Sale items are returnable within 14 days, but only for store credit.'One of those is the store's actual policy. The other two are fluent, confident, plausible, and wrong. Nothing in the text signals which is which. A human tester reading one answer cannot tell either — which is exactly why 'read it and see if it sounds right' is not a test.
Key takeaways
LLM output is sampled from a distribution, so identical input can produce different output.
Exact-match tests break on harmless rewording and still miss real failures.
'Set temperature to 0' reduces variance but does not remove it.
Assert on properties and rubric scores, not on exact strings.
Written and edited by the nexGenCoders team. Spotted a mistake? Tell us and we will fix it.
Don't lose this lesson
Create a free account to save your progress, keep your streak, and work toward a shareable certificate.