Mehdi Akiki
Writing / Series

Reliable AI Systems in Production

Evals, retrieval, tools, and observability

A software-engineering view of AI-enabled products: where models help, where deterministic boundaries remain necessary, and how to operate the whole system responsibly.

The model behind the series

A useful AI feature is still a production system. It depends on permissions, identity, current data, tool contracts, latency budgets, evaluation, and a recovery path when a probabilistic component behaves differently than expected.

This series focuses on those engineering boundaries. The model is important, but it is one component inside a system that still needs clear invariants and evidence that it works.

Core principles

01

Keep deterministic boundaries explicit

Use models for useful ambiguity, while permissions, state transitions, money, and irreversible actions remain enforceable in code.

02

Evaluate the real workflow

Measure retrieval, tool selection, outputs, latency, and cost against representative tasks instead of judging a demo by feel.

03

Make failure inspectable

Record the inputs, versions, sources, tool calls, and decisions needed to explain and improve a production result.

Start here

Entry points into this subject, ordered as a reading path.

Articles

Measurement

A Record-and-Replay Harness for Agent Tests

A working record-and-replay harness for agent tests: a JSON cassette of decisions and tool results, deterministic replay with zero live calls, and a readable diff when the trajectory changes.

Measurement

Red-Team the Workflow, Not Only the Prompt

A strong system prompt cannot secure retrieval, tools, authorization, retries, or side effects. Red-team the complete AI workflow and its recovery paths.

Shorter pieces and reference

Older, introductory or narrower pieces on the same subject.

Engineering context

AI capability with ordinary engineering discipline

I help teams turn AI-enabled workflows into maintainable products with clear data, evaluation, permission, and failure boundaries.