CandyWrite
HomeBlogs
CandyWrite

An independent publishing platform for essays on technology, design, and creative work. Free to read, free to write.

Explore

  • Home
  • All Blogs
  • Most Read
  • Most Liked

Get Updates

© 2026 CandyWrite Media Inc. All rights reserved.

Privacy PolicyTerms of Service
  1. Home
  2. Blogs
  3. AI & Engineering
  4. Observability for Nondeterministic Systems
AI & Engineering

Observability for Nondeterministic Systems

Traditional logs answer what happened. With probabilistic components you also need to answer why this run differed from the last one, which requires capturing inputs you probably are not storing.

M
Muhammad Umer

26 August 2026•3 min read

0 views
Observability for Nondeterministic Systems

Debugging classical software is a search for the line where behaviour diverged from intent. Debugging a system with a model in it is different: the code is identical, the inputs differ slightly, and the output changed completely. Standard application logging is close to useless here, because it captures the control flow and discards the thing that actually determined the result.

Capture the full call, not a summary

For every model call, store the rendered prompt exactly as sent, the model identifier including version, the sampling parameters, the tools offered, the raw response, token counts, and latency. Teams routinely log a truncated prompt and then find themselves unable to reproduce an incident, because the truncated part was where the problem lived.

Storage is the objection and it is usually wrong. Compressed text is cheap, a thirty-day retention window is enough for almost all debugging, and the alternative is engineers reconstructing prompts by hand during an outage.

One trace per user intent

A single user action can produce a dozen model calls, several retrievals, and multiple tool invocations. These belong in one trace with a shared identifier, ordered, with parent-child relationships intact. The question you will actually ask during an incident is "show me everything that happened for this user's request at this time", and if that requires joining four log sources by timestamp, you will not ask it.

Track distributions, not averages

  • Output length distribution catches a prompt regression faster than any quality metric; a sudden shift usually means an instruction stopped being followed.
  • Tool call frequency reveals loops and avoidance, both of which are silent failures.
  • Abstention rate tells you when retrieval quality moved without anyone touching retrieval.
  • Retry and escalation rate is your leading indicator of a degraded provider.

Averages hide all four. Watch percentiles and histograms, and alert on shape changes rather than thresholds.

Give users a feedback channel that produces data

A thumbs-down with no context is nearly worthless. A thumbs-down that captures the trace identifier turns a complaint into a reproducible case you can add to your evaluation set the same day. This one link, from user feedback to stored trace to test case, is the highest-leverage piece of tooling most AI teams are missing.

If a user reports a bad answer and you cannot see the exact prompt that produced it, you do not have a quality problem. You have an instrumentation problem wearing a quality problem's clothes.

Sampling without lying

At volume you will sample. Sample by trace rather than by call so you never store half a conversation, always keep one hundred percent of errors, escalations, and negative feedback, and record the sampling rate alongside the data so nobody misreads a downsampled chart as reality.

On this page
M

Written by Muhammad Umer

@umarrafique923

Author and writer at CandyWrite. Sharing knowledge, tutorials, and reflections on technology, design, and ideas.

Enjoyed this perspective?

Join 12,000+ readers getting our Saturday morning editorial dispatch with our top essays and reading recommendations.

Related articles

AI & Engineering

6 Sept 2026•4 min read

The React Compiler Ended the Memoization Debate. Now What?

AI & Engineering

3 Sept 2026•3 min read

Small Models, Big Systems: The Case for Routing Instead of Scaling

AI & Engineering

5 Sept 2026•4 min read

Retrieval Is a Data Problem, Not a Vector Problem

AI & Engineering

8 Sept 2026•5 min read

Agents Are Not Chatbots: What Changes When Software Takes Actions

Discussion (0)

Real-time updates enabled

Join the conversation. Sign in to leave a response or reply to comments.

Sign InCreate Account
No responses yet. Be the first to share your thoughts!