ODUONYE. / ENGINEERING NOTES
← All notes

Reliable AI Starts Where the Demo Ends

31 August 2026 · Daniel Oduonye

An AI demo asks one question:

Can the model produce a useful answer?

A real product has harder questions:

The interesting engineering work starts after the first successful model call.

1. Treat the workflow as a state machine

An AI workflow should have clear states. For example:

received -> processing -> succeeded
                    \-> retryable failure -> processing
                    \-> permanent failure

The state belongs in durable storage. This makes the workflow visible to the worker, the user, and the person operating the system.

It also gives us a safe place to record why a job stopped. “The AI failed” is not useful enough. We want to know whether the failure came from a timeout, a bad input, a tool error, a rate limit, or an invalid model response.

2. Retries need boundaries

Retries are useful, but an unbounded retry loop can turn one failure into a larger outage.

A safe retry path needs:

The idempotency key matters because queues can deliver the same message more than once. Repeating a request should not publish two videos, charge a user twice, or create two matching sessions.

3. Evaluate behavior before release

“It worked for my example” is not an evaluation set.

Start with a small versioned set of real-looking cases. Include normal inputs, empty inputs, confusing inputs, unsafe requests, and cases where the correct answer is to ask for help or refuse.

Track the behavior that matters for the product:

The goal is not to pretend that one score explains quality. The goal is to make a change easy to compare with the previous version. A prompt, model, or retrieval change should leave evidence behind.

4. Trace the whole path

The model call is only one part of an AI request. A useful trace connects:

HTTP request -> queue job -> retrieval -> model call -> tool call -> database

With that path, an operator can answer simple questions:

5. Keep a human failure path

Some problems should not be solved by another automatic retry. A protected question, an unclear user instruction, a security warning, or a possible false attestation needs a person who can make the decision.

Good automation knows when to stop. It records the visible problem, preserves the current state, and makes the next action clear.

The work I am applying this to

I am building and documenting public examples around this idea:

These are different systems, but the lesson is the same: reliable software needs visible state, bounded failure, and a way to inspect what happened.

Where I am discussing this

Add the failure path before adding the next clever feature.

I write more notes on oduonye.com/blog and keep the public code on GitHub.