liveBook · Manning

Chapter 1: How RAG research prevents disasters

What you will learn in chapter 1 of Retrieval Augmented Generation, The Foundational Ideas

The introduction defines RAG, shows why access to a correct source does not guarantee a grounded answer, and frames reliability as an engineering problem.

After this chapter you will be able to

Section by section

Introduction

The introduction defines RAG, shows why access to a correct source does not guarantee a grounded answer, and frames reliability as an engineering problem.

Key terms: Retrieval-Augmented Generation (RAG), external knowledge sources, grounded, Air Canada, bereavement fares, failure modes, Corrective RAG (CRAG), retrieve-then-audit

1.1 How this book teaches RAG

The section explains why the book approaches RAG through enduring research principles, failure prevention, measurement before added complexity, and cost control.

Key terms: research literacy, persistent architectural patterns, failure modes, failure patterns, progressive complexity, accuracy bar, measured failure, faithfulness, answer relevance, context relevance

1.2 How do RAG systems work?

The section explains how RAG prepares a searchable knowledge base, retrieves and ranks evidence for a question, and uses that evidence to generate a grounded answer.

Key terms: RAG, parametric knowledge, source knowledge, source attribution, indexing pipeline, chunking, searchable representations, specialized database, query processing, retrieval

1.3 How RAG research addresses failure points

The section uses the Air Canada failure to identify three production risks that motivate RAG research.

Key terms: knowledge boundary, hallucination challenge, private knowledge gap, grounded

1.3.1 The knowledge boundary problem

This section explains why a trained LLM cannot know newer information and why retrieving current knowledge improves its decisions.

Key terms: knowledge boundary, training cutoff, external retrieval, parametric knowledge, frozen weights or parameters

1.3.2 The hallucination challenge

This section explains why plausible but ungrounded LLM answers are dangerous, distinguishes types of hallucination, and introduces evidence checking as an incomplete safeguard.

Key terms: hallucination, unverifiable synthesis, factual hallucination, citation hallucination, logical hallucination, intrinsic, extrinsic, temporal hallucination, false consensus, Red Flagging

1.3.3 The private knowledge access problem

This section explains why enterprise AI needs access to changing private knowledge while respecting limits on policy reasoning and data access.

Key terms: private knowledge, proprietary, specialized and curated information, fine-tuning, historical logs, RAG systems, knowledge bases, spatiotemporal reasoning, retroactive dates, precise discount calculations

1.3.4 RAG is an enduring architectural pattern

This section explains why RAG remains useful as longer context windows, fine-tuning, and caching improve: it selects relevant external information for a model rather than replacing those techniques.

Key terms: architectural pattern, external data, knowledge boundaries, hallucination risks, private knowledge, longer context windows, retrieval-first approach, precision, lost in the middle, context engineering

1.3.5 Why RAG justifies infrastructure investment

This section gives practical reasons to invest in RAG infrastructure, identifies cases where retrieval may not be worth it, and cautions against taking reported results at face value.

Key terms: knowledge boundary, weights, retrieval, fine-tuning, grounding, context engineering, provenance, attribution, checkability, private knowledge

1.4 Failure points within RAG systems

This section introduces a taxonomy of RAG failures and shows how it can guide diagnosis and testing.

Key terms: retrieval, augmentation, generation, three-layer taxonomy, seven failure modes, failure points, systematic diagnosis, FP2: Missed the Top Rank, systematic evaluation, measurement frameworks

1.4.1 RAG failure examples

This section uses public and hypothetical RAG failures to show why plausible answers and functioning components are not enough: reliability also requires detecting ungrounded answers and remaining reliable after index changes.

Key terms: corpus, retrieval, Missed the Top Rank, Incorrect Specificity, 6-Month Fast-Track, Factually Inconsistent Hallucination, grounding, source material, Missing Content, Not in Context

1.4.2 Research-backed solutions

The section links recurring RAG failures to research-backed architectural responses rather than treating them as reasons to abandon RAG.

Key terms: failure points, architectural challenges, CRAG, Self-RAG, evaluator, supported, HyDE, RAPTOR, compression, failure point 2

1.5 Naive, advanced, modular, and agentic RAG

This section introduces RAG architectures as stages of increasing complexity and explains the boundary between modular and agentic RAG.

Key terms: modular RAG, agentic RAG, routers, retries, critique steps, architectural patterns, four stages, upgrade triggers

1.5.1 Naive RAG: Establishing the foundation

Introduces naive RAG’s retrieve-then-generate pipeline, where it is useful, and why its simple retrieval can fail.

Key terms: Naive RAG, retrieve-then-generate, chunks, embeddings, retrieved context, Rapid prototyping, Less complexity, Low cost, Clear evaluation, top k

1.5.2 Advanced RAG: Optimizing the components

This section explains how advanced RAG improves a basic pipeline through targeted component optimizations without changing its fundamental architecture.

Key terms: Advanced RAG, basic pipeline, preprocessing optimization, semantic coherence, metadata, multimodal content, query expansion, HyDE, hybrid search, dense retrieval

1.5.3 Modular RAG: Adaptive and composable systems

This section explains how modular RAG combines specialized components for different needs, and why that flexibility requires investment in interfaces and routing.

Key terms: modular RAG, component modularity, composable frameworks, flexible configuration, route queries, query time, modular architecture, standardized interfaces, extensible frameworks, plugin architectures

1.5.4 Agentic RAG: Autonomous information-seeking systems

This section explains why agentic RAG controls retrieval during generation, what that autonomy enables, and why production systems often constrain it.

Key terms: Agentic RAG, runtime, retrieval, timing mismatch, dynamic retrieval triggering, autonomous query formulation, self-monitoring and correction, multi-step reasoning coordination, bounded autonomy, token costs

1.5.5 RAG evolution

This section frames the choice among four RAG approaches as a business decision and cautions that its suggested thresholds are rules of thumb.

Key terms: naive RAG, advanced RAG, modular RAG, agentic RAG, business constraints, thresholds, rules of thumb

1.6 Summary

Where this is used later

Concepts explained in this chapter

Chapter 2: Revolutions in semantics, scale, and similarity →

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.