Monday, October 26, 2026

AI Observability: You Can't Improve What You Can't See

 

Subtitle: Why monitoring AI applications in production requires more than checking whether the application is running

Introduction: The Demo Worked. What Happens Next?

Building an AI application has become easier. Developers can use large language models (LLMs), retrieval-augmented generation (RAG), APIs, and AI-assisted coding tools to create useful applications faster than ever.

But getting an AI application to work during a demonstration is only the beginning.

What happens when a user receives an incorrect answer? Why did one request take 20 seconds while another took two? Why did the AI retrieve irrelevant documents? Why did the application suddenly consume more tokens and increase its operating cost?

Traditional application monitoring alone may not answer these questions.

This is where AI observability becomes important.

What Is AI Observability?

AI observability is the practice of collecting and analysing information about an AI application's internal behaviour so developers can understand its performance, reliability, quality, and cost.

For a conventional web application, we commonly monitor server availability, response time, database performance, exceptions, and HTTP errors.

An AI application needs those same fundamentals, plus visibility into the AI-specific workflow.

For example, a RAG-based assistant might execute the following steps:

  1. Receive a user's question.

  2. Search a knowledge base for relevant information.

  3. Send the question and retrieved context to an LLM.

  4. Generate an answer.

  5. Return the answer to the user.

If the final answer is wrong, the problem could originate at several points. The search might have retrieved the wrong documents, the context might have been incomplete, or the model might have misunderstood the available information.

Without visibility into each stage, developers are left guessing.

Five Things Every AI Application Should Monitor

1. Response quality

A successful HTTP response does not necessarily mean a successful AI response.

An application can return status code 200 and still provide an inaccurate, irrelevant, incomplete, or unsupported answer.

Monitor quality using appropriate evaluation methods, such as:

  • Correctness against known reference answers.

  • Relevance to the user's question.

  • Whether claims are supported by retrieved sources.

  • Whether the response follows required formats and business rules.

  • User feedback and patterns in reported failures.

For high-impact applications, include human review and domain-specific validation rather than relying entirely on automated scores.

2. Latency and performance

AI responses often involve multiple operations: retrieval, model calls, external APIs, and tool execution.

Measuring only the total response time hides the real bottleneck.

Suppose a request takes 12 seconds. Tracing might reveal that retrieval took one second, the model call took eight seconds, and an external API took three seconds.

That information helps the team decide where optimisation will have the greatest impact.

Track total response time as well as the duration of individual operations, retries, and timeouts.

3. Token usage and cost

Model usage can affect operating costs, especially when applications process long conversations, large documents, or multi-step agent workflows.

Monitor input and output tokens, model usage, cost per request where available, and usage patterns across features or customers.

Look for unnecessary repeated calls, oversized prompts, excessive retrieved context, and retry loops.

The goal is not simply to minimise cost. It is to understand the cost of delivering a useful and reliable result.

4. Retrieval and tool execution

For RAG applications, inspect which documents were retrieved, how relevant they were, and whether the answer was grounded in those documents.

For agentic systems, track tool calls, execution results, failures, retries, and permission checks.

Consider an AI assistant that retrieves an outdated policy document. The model might produce a fluent answer based on that document, but the answer could still be wrong.

Observability helps distinguish a retrieval problem from a generation problem.

5. Errors, security, and unusual behaviour

AI applications can fail through ordinary software defects as well as AI-specific risks.

Monitor failed model calls, malformed outputs, rate limits, unexpected tool use, unusual usage spikes, and repeated errors.

Security also matters. OWASP's GenAI security guidance highlights risks such as prompt injection, sensitive information disclosure, and excessive agency. Monitoring can help detect suspicious patterns, but it must be combined with access controls, validation, and other preventive safeguards.

Do not log sensitive prompts, personal information, credentials, or confidential business data indiscriminately. Apply access restrictions, redaction, retention policies, and appropriate privacy safeguards to telemetry.

A Practical Example: Debugging a RAG Assistant

Imagine an employee asks an internal assistant:

"What is our current travel reimbursement limit?"

The application returns an outdated amount.

Without observability, a developer might change the prompt or switch models in the hope of fixing the issue.

With useful traces, the investigation can be more systematic:

  • Retrieval: Did the search return the current travel policy?

  • Context construction: Was the relevant section included in the prompt?

  • Model response: Did the answer accurately reflect the supplied information?

  • Validation: Did the system check whether the answer was supported by the source?

  • Final response: Was the correct answer returned to the user?

The actual root cause may be a stale document in the knowledge base rather than the LLM itself.

That distinction saves debugging time and prevents teams from applying the wrong fix.

How to Introduce AI Observability

You do not need a complicated monitoring platform on day one. Start with a practical foundation.

Step 1: Establish a baseline. Measure request volume, response latency, failures, usage, and cost where applicable.

Step 2: Add structured logging and tracing. Assign a request or trace ID and record the important stages of each AI workflow.

Step 3: Measure quality separately from availability. A service can be online while producing poor answers. Use test datasets, evaluation checks, user feedback, and human review as appropriate.

Step 4: Create useful alerts. Alert on meaningful changes, such as rising failure rates, unexpected latency, unusual usage, or quality regression.

Step 5: Turn findings into improvements. Use the evidence to improve retrieval, prompts, model selection, caching, validation, permissions, and fallback behaviour.

OpenTelemetry's GenAI observability work provides a useful direction for standardising telemetry across model calls and related operations. Teams can explore it as they build their monitoring approach.

The Engineering Principle: Observe, Diagnose, Improve

AI observability is not just about creating attractive dashboards. It is about making AI systems understandable enough to maintain and improve.

A dashboard showing average response time is useful. A trace that explains why one particular response was slow is often even more useful.

A count of successful requests is useful. Evidence that answers remain accurate, relevant, secure, and grounded in the right information is essential.

As AI applications become more integrated into business processes, teams must treat observability as part of system design—not as an afterthought added after deployment.

Final Thoughts

AI-assisted development can help us build applications faster. But speed of development does not remove the responsibility to operate those applications reliably.

The real engineering challenge begins when an AI application meets real users, real data, unexpected inputs, and changing requirements.

If we cannot see how our AI system behaves, we cannot reliably explain its failures or measure its improvement.

Build the application. Instrument it. Evaluate it. Learn from its behaviour. Then improve it continuously.

That is how we move from impressive AI demonstrations to dependable AI systems.


Further reading

No comments: