liveBook · Manning

Chapter 1: AI reliability: Building LLMs for the real world

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

The introduction contrasts rapidly expanding LLM capabilities with their unreliable performance in production, then defines reliability and its three layers.

After this chapter you will be able to

Section by section

Introduction

The introduction contrasts rapidly expanding LLM capabilities with their unreliable performance in production, then defines reliability and its three layers.

Key terms: LLMs, hallucinations, flaky outputs, brittle tools, reliable outputs, reliable agents, reliable operations, grounded, monitoring

1.1 From benchmarks to the real world

The section contrasts impressive benchmark results with weaker performance on unfamiliar tasks and explains why increasingly capable models still need production reliability engineering.

Key terms: SWE-bench Verified, SWE-bench Pro, reliability gap, production reliability, frontier models, external tools, complex workflows

1.2 The tangible impact of LLMs in the real world

This section introduces the real-world reach of LLMs by linking four application areas to distinct reliability risks.

Key terms: fabricated outputs, incorrect policy information, insecure code, unsafe actions

1.2.1 Legal industry

This section shows how legal LLM tools are being used at scale while explaining why their outputs require citation checks and human validation.

Key terms: Harvey AI, Legora, nonbillable hours, fabricated case citation, legal RAG hallucinations, source grounding, automated citation verification, human review

1.2.2 Customer service

Customer-service assistants can resolve inquiries quickly and at scale, but their policy answers need reliable sources and human escalation.

Key terms: intelligent virtual assistants, resolution rate, policy response, retrieved, version-controlled policy document, escalate to humans

1.2.3 Programming and development

This section contrasts the rapid adoption and productivity gains of AI coding tools with the production defects that still make rigorous validation necessary.

Key terms: AI coding assistants, adopted, 30–55% faster, reliability gap, manual debugging, logic bugs, code review, automated testing, security validation

1.2.4 Enterprise AI

Enterprise AI is moving from text generation toward agents that act, creating opportunities for productivity while expanding what reliability must cover.

Key terms: agentic AI, Agentforce, AI agents, biased outputs, inaccurate outputs, hallucination, permissions, reversibility, tool robustness, failure containment

1.3 Understanding hallucinations and reliable AI

The section identifies hallucination as a fundamental, dangerous reliability challenge involving LLMs fabricating information.

Key terms: hallucination, reliable systems

1.3.1 When AI hallucinates convincingly

A legal-research example shows how convincing AI fabrications can be mistaken for facts and cause real-world harm.

Key terms: precedents, fabrications, legal research

1.3.2 What is a hallucination?

Defines LLM hallucinations, distinguishes their forms, and explains why plausible but false outputs arise.

Key terms: hallucination, intrinsic hallucination, extrinsic hallucination, invented citations, pattern-matching systems, probabilistically, ground truth, training data

1.3.3 What is reliable AI?

Defines reliable AI as more than avoiding hallucinations: it must produce trustworthy results, operate safely over time, and balance competing production requirements.

Key terms: reliable AI, grounded, fails gracefully, data drifts, traditional software reliability, semantic correctness, uptime, tradeoffs, production reliability, latency

1.4 The AI reliability framework

Introduces a three-layer framework for organizing AI reliability challenges and techniques, with details left to later sections.

1.4.1 Layer 1: Reliable outputs

This section explains why trustworthy outputs are the first layer of AI reliability and introduces the roles of prompting, RAG, semantic retrieval, fine-tuning, and distillation.

Key terms: reliable outputs, accurate, grounded answers, prompt engineering, hallucinations, RAG, knowledge base, retrieved content, semantic retrieval, embeddings, vector search

1.4.2 Layer 2: Reliable agents

This section explains why reliable agents need safeguards when they act, and introduces standardized tool integration and specialized agents as ways to support reliable action.

Key terms: reliable outputs, agents, errors cascade, standardized tool integration, Model Context Protocol (MCP), error handling, traceability, failure containment, multi-agent systems, specialized AI components

1.4.3 Layer 3: Reliable operations

This section explains why reliable operations require ongoing evaluation, AI-specific production monitoring, and attention to fairness and privacy.

Key terms: reliable operations, operational discipline, data drifts, reference-based metrics, ROUGE, BLEU, LLM-as-judge, red-teaming, human evaluation, production monitoring

1.5 The reliability toolbox

This section presents a simple-first way to choose reliability techniques while evaluating and monitoring the system from the start.

Key terms: reliability toolbox, prompt engineering, RAG, fine-tuning, agent capabilities, evaluation, monitoring

1.6 Why reliable AI systems matter now

This section explains why reliable AI must be engineered across the whole production system, not judged by model performance alone.

Key terms: production AI system, prompts, retrieval pipelines, agents, monitoring, production, benchmarks, user trust, model capability, system reliability

1.7 Requirements for following along

This section states the tools and background needed to follow the book’s projects and explains why most examples use API calls.

Key terms: Python 3, pip, OpenAI API key, API calls, local model hosting

1.8 Summary

Where this is used later

Concepts explained in this chapter

Chapter 2: Generating trustworthy responses with prompt engineering →

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.