liveBook · Manning

Chapter 10: Deploying and monitoring

What you will learn in chapter 10 of Building Reliable AI Systems

This introduction explains why an LLM that succeeds in testing can still fail in production and why evaluation must be backed by operational infrastructure.

After this chapter you will be able to

What it builds on

Section by section

Introduction

This introduction explains why an LLM that succeeds in testing can still fail in production and why evaluation must be backed by operational infrastructure.

Key terms: nondeterministic, production, context quality, evaluation, deployment architectures, monitoring systems, quality-assurance pipelines

10.1 Introducing large language model operations

This section defines LLMOps, explains why production reliability requires more than uptime, and introduces an architecture that uses monitoring to drive improvement.

Key terms: LLMOps, MLOps, prompt management, RAG pipeline evaluation, latency, uptime, quality, safety, user trust, input processing

10.2 Serving LLMs: Hosted APIs vs. open source models

Introduces the choice between hosted APIs and self-hosted open source models as a foundational production decision with consequences beyond implementation.

Key terms: hosted API, open source model, own infrastructure, compliance requirements

10.2.1 Using hosted APIs

This section explains why teams often start with hosted LLM APIs and what cost, data-handling, and model-control trade-offs emerge in production.

Key terms: hosted APIs, fast time to market, zero infrastructure, per token, use-based pricing, input, output, third party, compliance, data segregation

10.2.2 The open source alternative

This section explains the control gained by self-hosting an open source LLM, the infrastructure that control requires, and why improving model quality makes the option increasingly practical.

Key terms: open source models, self-hosting, serving stack, observability, GPU infrastructure, load balancing, model management, monitoring, scaling logic, well-tuned Mistral 7B

10.2.3 The hybrid solution: Best of both worlds

The section explains how a hybrid LLM service routes queries between local and hosted models, and why production routing must be more adaptable than keyword matching.

Key terms: hybrid approach, local model, hosted LLM, fall back, keyword-matching, semantic routing, topic clusters, classify intent

10.3 Building LLM-native monitoring systems

A refund-policy failure shows why healthy service metrics are not enough to monitor an LLM that advises customers.

Key terms: traditional monitoring metrics, LLM monitoring

10.3.1 What really matters: The four questions

This section frames production LLM monitoring around four daily questions: speed and availability, answer quality, customer satisfaction, and cost.

Key terms: response times, system availability, answer quality, user behavior, LLM costs

10.3.2 Logging what matters

This section shows how request logs that expose where an LLM application spends time and money lead to better optimization decisions.

Key terms: request logging, technical performance, business effect, LLM inference, response streaming, model optimization, token generation, output token length, prompt efficiency, intelligent model routing

10.3.3 Setting up alerts that help

This section shows how LLM alerting can reduce false positives by tracking meaningful patterns and efficiency instead of isolated threshold breaches.

Key terms: absolute thresholds, tokens per second, errors cluster by user type or question topic, cost per token, baseline

10.3.4 Catching cost explosions before they hurt

The section shows how cost monitoring can catch different sources of rising LLM costs and make alerts useful for investigation.

Key terms: cost monitoring, model mix, root-cause investigation

10.3.5 Building dashboards that drive action

This section shows how a production LLM dashboard helps a team spot problems, investigate alerts, and connect technical performance to customer and business outcomes.

Key terms: real-time request volume, success rates, business impact, cost per satisfied customer, questions resolved without escalation, customer success, sustainable unit economics, recent deployments, correlated metrics, historical context

10.3.6 Output-quality monitoring

This section shows how to detect declining output quality through automated checks, statistical patterns, and customer-support signals.

Key terms: automated content filters, rule-based systems, LLM-as-a-judge, statistical quality monitoring, quality drift, refusal-rate tracking, repetition detection, language consistency, user satisfaction scores, follow-up question rates

10.4 User experience and feedback monitoring

This section explains why production monitoring must look beyond technical performance to whether users find an AI system helpful.

Key terms: user satisfaction, technical metrics, explicit feedback, implicit behavioral signals

10.4.1 Explicit feedback collection

This section explains how voluntary feedback options capture different kinds of user input and how changes in feedback participation can warn of declining satisfaction.

Key terms: thumbs-up/thumbs-down, 1–5 star ratings, optional comment fields, forced feedback, feedback rates, participation rates, leading indicators, user satisfaction scores

10.4.2 Implicit feedback signals

This section shows how user behavior can provide implicit feedback about satisfaction with an AI system.

Key terms: implicit feedback, session abandonment, rapid query refinement, copy-paste behavior, return use patterns, session frequency, implicit signals, explicit feedback

10.4.3 Building actionable feedback loops

This section shows how to turn recurring user feedback into prioritized system changes and verify their effect on customer and business outcomes.

Key terms: feedback triage, business effect, prompt adjustment, knowledge-base gap, task-completion tracking, support-ticket reduction, customer-retention correlation, billing complexity, specialized prompts, user-initiated billing escalations

10.5 Ensuring high-quality outputs in production

This section explains why production LLM output quality is difficult to assure: plausible-looking answers can be wrong, and failures are not necessarily consistent or obvious.

Key terms: convincingly wrong, user trust, traditional software quality-assurance, nondeterministic failures, context-dependent quality, gradual degradation

10.5.1 The three-pillar quality framework

This section defines prevention, detection, and correction as three complementary pillars for maintaining LLM output quality.

Key terms: prevention, detection, correction, LLM quality

10.5.2 Prompt engineering for consistent quality

This section explains how specific prompts act as quality contracts for consistent LLM behavior in production.

Key terms: quality contracts, quality-control mechanisms, ambiguity, consistency, reliability, predictable outputs, escalation paths

10.5.3 Continuous quality monitoring with automated testing

This section explains how continuous tests, response scoring, and shadow testing detect LLM quality regressions and inform model-switching decisions.

Key terms: quality assurance, drift, quality regressions, golden dataset, known-good response characteristics, automated quality scoring, real-time quality metrics, alerts, shadow testing, candidate models

10.6 Observability in practice: Introducing Langfuse

The section introduces Langfuse as a way to observe LLM behavior in production and uses Huntr’s résumé builder to show how that visibility supports debugging and improvement.

Key terms: Langfuse, observability, production, end-to-end interactions, token counts, latency, prompt versioning, output-quality scores, trace-level details, Huntr

10.7 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 9: Evaluation and performance for LLMs and agents Chapter 11: Bias, privacy, and responsible AI →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.