Skip to content
Monitoring & Observability

Monitoring & Observability

An observability framework for tracking the quality, performance, and cost of AI systems in real time.

The three pillars of observability

    flowchart LR
    A["AI System<br/>Observability"] --> B["Metrics"]
    A --> C["Logs"]
    A --> D["Traces"]

    B --> E["Performance KPIs<br/>Latency, cost, throughput"]
    C --> F["Requests & responses<br/>Error records"]
    D --> G["LLM call tracing<br/>Tool execution flow"]

    style A fill:#0891B2,stroke:#0E7490,color:#fff
    style B fill:#2563EB,stroke:#1D4ED8,color:#fff
    style C fill:#7C3AED,stroke:#6D28D9,color:#fff
    style D fill:#EA580C,stroke:#C2410C,color:#fff
  

Key monitoring metrics

Quality metrics

MetricDescriptionTarget
FaithfulnessDegree to which the output is grounded in context> 0.85
Answer RelevancyRelevance of the answer to the question> 0.85
Hallucination RateShare of outputs that are factually incorrect< 5%

Performance metrics

MetricDescriptionTarget
TTFTTime To First Token< 1s
TPSTokens Per Second (generation speed)> 30 TPS
P95 Latency95th-percentile response time< 3s

Cost metrics

MetricDescription
Cost per requestAverage LLM cost per request
Monthly token usageToken consumption trend by model
Cache hit ratePrompt-caching efficiency

LLM monitoring tools

ToolCharacteristicsBest suited for
LangSmithIntegrated with the LangChain ecosystemLangChain-based apps
LangfuseOpen source, self-hostedCost-sensitive, security-conscious teams
Arize PhoenixModel performance & drift detectionTeams with an MLOps stack
HeliconeSimple proxy-based approachFast adoption

Recommended alerting setup

alerts:
  - name: high_hallucination_rate
    condition: hallucination_rate > 0.10
    severity: critical
    action: page_on_call

  - name: cost_spike
    condition: hourly_cost > budget_threshold * 1.5
    severity: warning
    action: slack_notification

  - name: latency_degradation
    condition: p95_latency > 5000ms
    severity: warning
    action: slack_notification