Evaluation and Observability for LLM Agent Infrastructure (Part 5 of 5)
This is the final part of a five-part series on designing infrastructure for LLM agents, covering evaluation and observability. Agents can fail without raising an error, for example by giving a plausible but wrong answer, repeating unneeded steps, or sharply increasing cost after a one-line prompt change. The article proposes recording each run as one trace, with a separate span[1] for each model call, tool call and retrieval step, following the GenAI semantic conventions of OpenTelemetry, which were still at the Development stage on 14 November 2026. Telemetry is sent asynchronously over OTLP so that a slow monitoring system does not affect user requests.
Cost is calculated from the usage data returned by the API and a versioned price table, with budgets per run and per tenant per day. The article recommends keeping every failed, cancelled, slow, costly or low-rated run, and only a fixed share of normal runs (tail-based sampling[2]). Latency should be reported as p50 / p95 / p99[3] rather than as averages. The storage estimates are hypothetical design values: about 600 GB per day with full prompt and output text, and under 20 GB per day without it, which the article says can all be stored.
Answer quality is checked before release on a golden dataset, using LLM-as-judge[4] and human review, and in production through user ratings and indirect signals such as retries and handoffs to human staff. Prompts, models and tool definitions are versioned, released gradually through canary releases or A/B tests, and can be rolled back separately from code. The article closes the series with a cycle: find poor traces in production, add them to the golden dataset, fix prompts, tools or retrieval, check offline, then release and monitor.
Sources
-
JPZenn JA
LLMエージェント基盤のシステム設計 #5 評価と可観測性(トレース・トークンコスト・レイテンシ・回答品質)


