Skip to content
Instant download · PDF + web edition · Free sample of every book · 30-day refund promise
Latent Library Browse books
AI Engineering

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

  1. IntroductionIntroduction
  2. Chapter 1Why Retrieval?
  3. Chapter 2Preparing Documents and Chunking
  4. Chapter 3Embeddings and Vector Search
  5. Chapter 4Hybrid Search and Reranking
  6. Chapter 5Prompting With Retrieved Context
  7. Chapter 6Tables, Databases and Mixed Sources
  8. Chapter 7Advanced Retrieval Patterns
  9. Chapter 8Evaluating a RAG System
  10. Chapter 9Debugging a RAG System: A Field Guide
  11. Chapter 10Production Concerns
  12. IndexingIndexing Pipelines and Data Operations
  13. Chapter 11Security, Privacy and Governance
  14. Chapter 12Case Study: An HR Policy Assistant
  15. Chapter 13Designing the User Experience
  16. Chapter 14Choosing Components
  17. Chapter 15A Reference Architecture
  18. AppendixTemplates
  19. AppendixExercises
  20. 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

FormatPDF + web edition
Length83 pages (approx.)
Chapters15
LevelIntermediate to Advanced
LanguageEnglish
TopicAI Engineering
AuthorLatent Library Editorial

Keep reading

You may also like

All books
$12.00
Details