Crossing the AI Reliability Chasm
Building reliable production AI agents is about making agents do less
Many teams quickly find out the AI agents they've built for demos can't seem to cross the gap into production, because they just aren't reliable enough.
Having built the security for a $4T banking payment system, where mistakes impact the whole country, and building a banking AI system where you deal with probabilities, I've thought a lot about how to make AI agents reliable.
Surprisingly, the two have a lot in common.
Identifying failure points
Building reliable agents means getting clear on where all the failure points are, because everything is downstream of this.
Agents introduce new failure points that didn't exist in regular software, so you need to either eliminate them or mitigate against them.
Here's a simple refund agent example of what these failure points would look like.
We already have four failure points with just one agent and one tool. Now imagine how this scales for more complicated agents.
Agent Decision Load
One of the main reasons agent systems aren't reliable is because they handle too much. Too many tools, too many steps and too much information to process.
I call this the Agent Decision Load.
Simply put:
The goal is to reduce the agent decision load as much as possible while still making it possible to achieve the outcome.

The more steps and decisions it has to take, the more chance of being wrong, and therefore less likely the task will be done correctly.
| Agent steps | 1 | 3 | 5 | 10 | 20 | 30 |
|---|---|---|---|---|---|---|
| Overall task success | 98.0% | 94.1% | 90.4% | 81.7% | 66.8% | 54.5% |
Even with 98% accuracy at every step, a 10-step agent succeeds only 81.7% of the time.
Note: there might be cases where adding extra steps increases accuracy, such as a research agent verifying sources, but all things equal, a more reliable agent tends to have lower agent decision load
Extract Chaos
I like to picture each agent decision in an AI system as particles, where each one adds a bit more randomness into the system.

The left is what most AI solutions look like where the agent handles every little decision. But agent systems that make it into production look closer to the right.
We want to extract chaos from the system and let the agent handle the bare minimum.
Not only does this increase reliability, but your cost will go down and your agents will work faster.
Get your application code to handle as much as possible: security checks, conditional logic, math, graphs and dates. Combine tools and reduce chatter between agents. Classification problem? Use classical machine learning.
Use every technique under the sun before allowing your agents to handle it.
Most people stop here, but you want to go beyond this.
Extract chaos with UX.
For example, for a chatbot, instead of getting the agent to respond with free-text for everything, for some scenarios it's better for the agent to select a predefined set of options to show to the user.
This way, both the output from the agent is more reliable and the input back into the system is easier to process. And you potentially can bypass using the agent altogether on the second pass, reducing the agent decision load.
Make the agent only worry about the core ambiguous cases and planning out steps that can't be predefined.
Salesforce made this mistake themselves when they treated the LLM as the universe.
the initial proof-of-concept design relied heavily on the large language model (LLM) for tasks demanding deterministic precision. The model handled JSON parsing, hierarchical decisioning, and conditional evaluation. These areas, however, introduced small inconsistencies, which created downstream variability.
Abstract away the details
Beyond reducing the number of steps, we also should reduce the number of unnecessary details exposed to the agent. This includes internal IDs, raw API payloads and how your application logic works.
One common narrative being parroted in the AI community is, if you want to make your agents reliable, make sure agent retries work and are idempotent.
Because if an agent can keep on retrying when things fail, this means our system would be more reliable, right?
But this is backwards.
Trying to make an agent more reliable by retrying is going down a wrong path.
Instead, hide all the retry logic in the tool or application layer itself. This way the agent is blind about if it should retry or how many times, and only understands if it worked or not.
If it didn't work, return an error, and ideally this is also just deterministic code that sends the response, bypassing another LLM call.
Guarding against failures
For the decisions the agent is left with, there's a chance it is going to be wrong so we need to guard against this.
For example, add max number of loops for the agent. It'll limit how many times an agent can spin around in circles and you can exit early.
Another example is say, we're extracting income data from a document. Add guardrails checking if the expected values are way outside of normal range. You can use regular code, classical machine learning to detect outliers if you have enough historical data, or a second LLM (LLM-as-a-Judge). But if you're using second LLM, try to approach verifying details differently to see if it comes to the same conclusion.
These could still fail so you want to add human-in-the-loop for review when there's low confidence or high risk, and the cost of getting things wrong is meaningful.
Conclusion
A reliable AI system is about making agents do as little as possible.

Apply these when building reliable agents:
- Identify failure points - Find where things can go wrong
- Reduce Agent Decision Load - Extract chaos into deterministic code and UX
- Guard against failures - Verify LLM results and limit impact of mistakes
- Evaluate & Monitor - Measure reliability and detect regression
Once live, treat reliability as a continuous feedback loop rather than something you do once. Track failures and run regression evals whenever you change any details.