When a workflow should stop asking a model
LLMs are useful where language and ambiguity matter. Once a workflow's rules are known, deterministic software is often easier to test, cheaper to run, and more predictable.
The discussion began with a useful boundary
On April 3, 2026, Jon Allie posted a rule of thumb on X: do not use an LLM for something a deterministic program can do. His distinction is practical: language models are flexible when inputs are ambiguous, while ordinary software is repeatable when the rule is known. The post is an engineering opinion, not a benchmark—but it captures a boundary worth making explicit. Read the original post.
This is not a claim that LLMs should only be used for chat. A model can interpret an email, extract a likely intent, or turn a loosely phrased request into structured data. But once the system has a defined rule—validate a field, calculate a threshold, apply permissions, or update a known record—the application should usually enforce that rule directly.
Separate interpretation from execution
A useful design is a narrow model-facing step followed by ordinary program logic:
- The model interprets unstructured input and proposes a structured intent.
- The application validates the proposed values against a schema and business rules.
- Deterministic code performs the permitted action.
- The system verifies the resulting state and reports uncertainty or failure honestly.
For example, a model may classify a support request and suggest a category. Code can check that the category is allowed for that account, apply the routing table, and record the result. The model helps where language is messy; it does not become the authority for access control or arithmetic.
Anthropic’s guide to building effective agents describes workflows as a spectrum from simple, predictable chains to more autonomous systems, and recommends starting with the simplest architecture that meets the need. That guidance supports a broader point: an agent loop has operational costs—model calls, latency, retries, and less predictable behavior. The guide explains the trade-offs.
“Deterministic” does not mean “correct”
A fixed program can consistently implement the wrong policy. It still needs tests, review, and a clear source of truth. The advantage is that once its intended behavior is specified, it can be tested against explicit cases and should behave consistently for the same inputs and state.
Likewise, a model may remain valuable inside a deterministic workflow. The choice is not “AI or no AI”; it is where interpretation is genuinely needed and where the system must guarantee a rule. A model can draft an explanation while code decides whether a request meets a threshold. An agent can propose an operation while a permission-checked service decides whether to execute it.
A practical decision test
Before adding a model call, ask:
- Is the input genuinely ambiguous, or can a schema, parser, or ordinary UI capture it?
- Is the desired output a judgment about language, or a rule that can be written down?
- What happens if the result changes across repeated runs?
- Can a deterministic check validate the action before it affects a user or an external system?
- Would a model materially improve the user outcome enough to justify its cost and failure modes?
My take: use probabilistic systems for the parts of a problem that are actually probabilistic—language, interpretation, and uncertain context. Do not make every later step probabilistic just because the first one needed a model. If a workflow becomes well understood, turn its stable rules into software and keep the model only where it still adds value.
Sources
Follow on Google Search
Add Bersaglio as a preferred source to prioritize our notes, research, and practical work in Search and AI Overviews.