Observability for AI Systems: Debugging Software That Won't Repeat Itself
AI observability for production systems: why non-deterministic AI needs different debugging, and what to log when it fails for one user and nobody else.
The bug you can't reproduce
The first time a production AI system fails for one user and nobody else, you learn how different this work is from the software you're used to.
A traditional bug is a logic error. Same input, same wrong output, every time. You reproduce it, you fix it, you move on.
An AI system doesn't give you that courtesy. The same question, asked twice, can take two different paths. A call that worked a thousand times fails on the thousand-and-first because the caller phrased something in a way the model had never quite seen. The output is wrong, the logs say "200 OK", and there's nothing to step through.
We build AI systems for finance, property, and professional services — the kind of work where a wrong answer isn't a cosmetic glitch, it's a client who got told the wrong thing. Observability isn't a nice-to-have on those systems. It's the only thing standing between you and a failure you can't explain.
Logs tell you it ran. They don't tell you why
Standard application logging assumes determinism. You log the entry, the exit, and the errors, because the path between them is fixed. For an AI system the path between them is the whole problem.
If all you've logged is "request received" and "response sent", you've recorded that something happened and thrown away the only part that mattered. When a model produces a bad answer, the answer is rarely the bug. The bug is upstream — in what the model was given, not what it did with it.
So we stopped logging AI systems like deterministic ones and started recording the decision, not just the result.
Log the full input, not a summary
The exact prompt. The retrieved context. The system instructions as they were at that moment, including any that changed between the version you're reading now and the version that actually ran. The model and its settings. If you can't reconstruct the complete input the model saw, you can't reproduce anything, because you no longer know what it saw.
Log the retrieval, separately
Most AI failures in our systems aren't the model — they're retrieval. The model answered perfectly well given the three documents it was handed; the problem is those were the wrong three documents. If you only log the final answer, every retrieval failure looks like a model failure, and you'll spend a week tuning a prompt that was never broken.
Log the path, not just the endpoint
Modern AI systems aren't one call. They're a chain: classify the request, retrieve, call a tool, generate, check the result, maybe escalate. When the output is wrong, the question is which step went wrong — and you can only answer that if each step left a record of what it received and what it decided.
Traces beat logs once there's more than one step
A log line is a point in time. A trace is the whole journey, stitched together under one ID.
The moment an AI system does more than a single model call, flat logs stop being enough. You end up with a dozen disconnected entries and no way to tell which belong to the request that failed. A trace ties them together: this request, these retrievals, this tool call that timed out, this escalation that didn't fire. You read it top to bottom and the failure is usually obvious within seconds.
This is borrowed straight from distributed systems, and it's the single highest-leverage thing you can add. One trace ID, propagated through every step, turns "something went wrong somewhere" into "the retrieval returned empty and nothing caught it".
Evals are observability, not a launch gate
Most teams treat evaluation as something you do once, before launch, to earn the right to ship. Then the system goes live and the measuring stops.
That's backwards. The eval suite you built to decide whether something was good enough to ship is the same instrument you need to tell whether it's still good enough next month. Models get swapped. Prompts get edited. The data underneath shifts. Any one of those can quietly degrade a system that passed every test on day one.
We run evals continuously against sampled production traffic, not just against a frozen test set. The frozen set tells you nothing changed in the lab. Sampled production tells you whether anything changed in the world.
You can't read every transcript, so sample on purpose
A system handling real volume produces more transcripts than any human can read. The instinct is to read none of them until something breaks. The discipline is to read a deliberate sample before anything breaks.
We sample three ways: a small random slice to catch the unknown-unknowns, every interaction the system flagged as low-confidence or escalated, and everything a user gave negative feedback on. The random slice is the one teams skip and the one that earns its keep — it's where you find the failures nobody reported, because the user never realised the answer was wrong.
Low-confidence and negative-feedback samples tell you about failures you already suspected. The random sample tells you about the ones you didn't.
What it costs, and why it's not optional
Logging full inputs, retrieval context, and complete traces isn't free. You store more, you pay for the storage, and in regulated work you take on the obligation to protect everything you've captured — some of it sensitive, all of it retained under a policy you now actually have to have.
None of that is a reason to skip it. It's a reason to design it properly: redact at capture, set retention deliberately, keep the sensitive fields out of anything you don't strictly need. The alternative is a system you can't debug, which in finance or professional services is a system you shouldn't be running.
The cost of observability is visible on an invoice. The cost of not having it shows up the first time a client asks why your system told them what it did, and your honest answer is that you have no idea.
The takeaway
Deterministic software fails the same way twice, so you debug it by reproducing it. AI systems don't, so you debug them by recording them. Log the full input, trace every step, keep your evals running after launch, and sample production on purpose. Build that in from the start and most incidents become a trace you read in a minute. Leave it out and every incident becomes an archaeology project on a system that has already moved on.
Context Windows Aren't Memory: Architecting State for Long-Running AI Agents
Why a bigger context window won't fix a long-running AI agent, and how we architect external state for AI systems that run operations for weeks, not minutes.
Small-Model Economics: Why the Frontier Model Isn't Always the Right Call
When a smaller model beats the frontier model in production. Cost, latency and failure-mode trade-offs from applied AI R&D in Australia, finance to voice.
Reading the Paperwork: Document AI for Financial and Property Workflows
Why document extraction is the hardest unglamorous problem in custom AI for financial services, and the pipeline design that makes it reliable in production.