Building With Retrieval
A Practical Guide to RAG Systems
- Pages
- 83
- Chapters
- 15
- Level
- Intermediate–Advanced
- Format
- E-book
About this book
Retrieval-augmented generation (RAG) is the most common way to make a language model answer questions about your own documents: manuals, policies, contracts, support articles or research. Done well, it gives accurate answers with sources. Done badly, it gives confident nonsense.
This guide walks through every stage of a production-quality RAG system: preparing and chunking documents, choosing embeddings, vector and hybrid search, reranking, writing prompts that keep answers grounded, and handling permissions, freshness and cost. A full chapter is devoted to evaluation, with metrics for retrieval and for answer quality and a method for building a test set from real questions.
The book closes with a reference architecture and a checklist you can use to review any RAG project.
What you will learn
- When retrieval is the right approach, and when it is not
- Chunking strategies and document preparation that improve answers
- How embeddings, vector search, hybrid search and reranking work together
- Prompt patterns that keep answers grounded and cited
- How to evaluate retrieval and answer quality with a real test set
- Production concerns: permissions, freshness, latency and cost
- How to handle tables, databases and multi-hop questions
- A step-by-step method for debugging failing answers
- Indexing operations, security, user experience and an end-to-end case study with measured results
Table of contents
- IntroductionIntroduction
- Chapter 1Why Retrieval?
- Chapter 2Preparing Documents and Chunking
- Chapter 3Embeddings and Vector Search
- Chapter 4Hybrid Search and Reranking
- Chapter 5Prompting With Retrieved Context
- Chapter 6Tables, Databases and Mixed Sources
- Chapter 7Advanced Retrieval Patterns
- Chapter 8Evaluating a RAG System
- Chapter 9Debugging a RAG System: A Field Guide
- Chapter 10Production Concerns
- IndexingIndexing Pipelines and Data Operations
- Chapter 11Security, Privacy and Governance
- Chapter 12Case Study: An HR Policy Assistant
- Chapter 13Designing the User Experience
- Chapter 14Choosing Components
- Chapter 15A Reference Architecture
- AppendixTemplates
- AppendixExercises
- GlossaryGlossary
Who this book is for
Developers, data engineers, technical product managers and architects building assistants or search over company knowledge. Some programming experience is helpful; examples use language-neutral pseudocode.
Details
| Format | PDF + web edition |
|---|---|
| Length | 83 pages (approx.) |
| Chapters | 15 |
| Level | Intermediate to Advanced |
| Language | English |
| Topic | AI Engineering |
| Author | Latent Library Editorial |
Keep reading