Skip to content
Apixo
Blog
news· 3 min read· via Towards AI

Why Standard Monitoring Fails AI Agents: Building an Asynchronous Evaluation Engine

Traditional server monitoring shows if your AI is online, not if it's correct. Learn how one developer built an asynchronous architecture to evaluate production chats overnight.

Why Standard Monitoring Fails AI Agents: Building an Asynchronous Evaluation Engine

Deploying an artificial intelligence assistant to production brings a unique operational challenge: standard uptime monitors and server logs only indicate whether a system is responsive, not whether its outputs are accurate. When a developer named Arnav launched his team's first production AI assistant, a static pre-launch test dataset of 200 questions yielded a promising 92% success score. The monitoring dashboard remained entirely green with quick response times and zero error codes.

However, two weeks later, an upset client reported that the system had been providing incorrect policy information for days. Every single API request had returned an HTTP 200 OK status, proving that the application was fully operational while quietly generating confident hallucinations. Real users interacted in unpredictable ways—combining prompts, asking complex follow-up questions, and navigating edge cases that static test files never anticipated.

Designing an Asynchronous Evaluation Pipeline

To capture realistic usage data without introducing latency into active user sessions, Arnav transitioned evaluation out of the live request path entirely. Raw conversation logs were collected daily from cloud storage using an APScheduler job.

Because malformed log entries could easily break automated scripts, a strict YAML schema validator was introduced directly after ingestion. This step successfully filtered out broken payloads, ensuring that only standardized logs containing fields like conversation IDs, tenant IDs, user turns, assistant replies, and retrieved retrieval-augmented generation (RAG) documents moved forward. Lightweight job tickets were then dropped into an Amazon SQS Amazon queue to feed sequential background workers safely without causing memory spikes or hitting API rate limits.

The Pitfalls of LLM Judges and Metric Bleed

Relying on a single prompt sent to an LLM judge created new inconsistencies. Running identical conversations multiple times produced wildly varying scores, while metric bleed caused judges to conflate minor tone issues with relevance flaws. Furthermore, using expensive frontier models for basic validation tasks quickly drained the budget.

To solve this, a three-tier Evaluation Orchestrator was established:

  • Computational Metrics: Fast, free mathematical checks like Precision@k and Recall@k when ground truth was available.
  • Embedding Metrics: Rapid vector-similarity checks to evaluate semantic closeness.
  • LLM-as-a-Judge via DeepEval (GEval): Isolated, step-by-step rubrics using token probabilities to keep tone adjustments from polluting relevance scores.

Interestingly, high scores could still be misleading. An agent might achieve a 0.98 Faithfulness score by strictly summarizing retrieved documents without inventing facts, yet fail completely because the search engine pulled an outdated or irrelevant policy document in the first place. This proved that metrics must be analyzed in combination.

What it means for developers

Developers building production AI applications must look beyond basic uptime checks and static test suites. Exhaustive evaluation of 100% of production traffic is often counterproductive, burning through budgets and drowning out rare edge cases in a sea of routine FAQ interactions. Instead, configuring a smart, config-driven sampling pipeline using strong frontier judge models provides much sharper signals. Developers can try top AI models cheaply through one API at https://apixoai.online.

Scaling Visibility with Experiment Tracking

Monitoring thousands of raw JSON files in cloud storage proved unmanageable and hid critical performance dips behind company-wide averages. By synchronizing daily evaluation results into PostgreSQL and organizing them within MLflow, separate workspaces for development, QA, and production were established. Using interactive Plotly HTML dashboards attached directly to MLflow, developers can slice aggregated metrics by individual tenants.

When a minor dip in goal accuracy occurred later on, this granular tracking allowed the team to isolate the issue to a single client in under five minutes, revealing a localized retrieval problem rather than a systemic LLM failure. With automated A/B testing next on the roadmap, engineering teams can let real production data guide their next prompt or model updates.


Source: HTTP 200 OK, Yet Completely Wrong: How We Built an Observability Engine for AI Agents — Towards AI. Written by the Apixo team from that report.

#ai-news#ai-agents#observability#llm#mlflow#rag
Try it with your own tools

One key for Claude, GPT, GLM, DeepSeek and more. Pay per token with crypto.

Get your API key

Keep reading