All writing

Article ยท Shipping AI to production

Five checks before an AI agent goes live

The questions I ask before an AI agent or feature ships: the failure path, exact outputs, cost at the tail, the eval set, and the human handoff.

By Ali Raza, Senior AI Engineer

When I review an AI agent before it ships, I ask five questions. If the team cannot answer one of them, the agent is not ready, however good the demo looked.

1. What happens when the model is wrong?

Not if, when. Who notices, how fast, and what does the user see in the meantime? An agent with no failure path is a demo. Write the failure path down before launch: the signal that something went wrong, the person who gets told, and what the agent says while they look.

2. Which outputs must be exact, and is code computing them?

Prices, rates, eligibility, dates, totals. If a wrong value has a cost, the model should not produce it. Let the model read, extract and explain, and let deterministic code calculate and decide. It is the design rule I rely on most.

3. What does one request cost at the tail?

Averages hide the expensive cases: the long conversation, the retry loop, the tool that returns a huge result. Look at the 95th percentile, not the mean, and put a hard cap per request and per key, so one runaway loop cannot surprise you at the end of the month.

4. Where is the eval set, and when did it last run?

A small set of real inputs with written checks, run on every prompt or model change, with a stored baseline to compare against. If nobody can say when it last ran, it did not run on the change you are about to ship.

5. How does a person take over?

Mid-conversation, with full context, without the user repeating themselves. And while you are at it: what user data leaves your network, and should it? Redact what the model does not need before the prompt goes out.

What is not on the list

None of these questions is about which model to use. That is usually the least important decision, and the easiest one to change later.

Building something like this?

I am open to remote AI engineering roles and contract work. Tell me about the system you need.