No. 07 · Manuscript complete · AI & agents · GRAIN
The RAG Engineer
Retrieval Systems That Agents Can Actually Trust in Production
Your RAG demo works. Production is where it breaks.
Embedding a PDF is a demo; surviving production is engineering. The RAG Engineer takes you past the tutorials into the failure modes that actually break retrieval — chunking, freshness, reranking, grounding, and silent drift — with a protocol for pipelines agents can depend on.
- pages
- 452
- chapters
- 16
- hours of reading
- ± 6
- editions
- EN · NL
- Design
- Drafting
- Manuscript
- Production
- Launched
The book
Retrieval Systems That Agents Can Actually Trust in Production
The demo retrieved perfectly. Then production arrived: the user asked the same question three ways, the embeddings shrugged, and your agent cited a paragraph that confidently said the opposite of the truth. Now you debug a black box one bad answer at a time, and the part of the stack you trust least is the part the whole product stands on.
The reflex is to swap the embedding model, bump top-k, and chunk smaller. That tunes the symptom and ships the disease: one similarity score was never going to tell you whether a passage is relevant, recent, or right.
The RAG Engineer treats retrieval as an engineering discipline, not a vibe. It hands you GRAIN (Grounding, Retrieval, Augmentation, Indexing, and Negative-feedback response), five stages that turn a brittle vector lookup into a pipeline you can measure, defend, and trust an agent to call without a human reading every result.
What you learn
What this book puts in your hands
- The GRAIN protocol: Gather, Rank, Assemble, Inspect, Navigate
- Fix chunking, freshness, hybrid search, reranking and grounding
- Retrieval pipelines agents can trust in production
The framework
GRAIN, step by step
Gather, Rank, Assemble, Inspect, Navigate
-
Gather
-
Rank
-
Assemble
-
Inspect
-
Navigate
Look inside
The strongest pages — frameworks, figures, and worksheets from the print edition.
The contents
Chapter by chapter
Every chapter of The RAG Engineer with its printed epigraph, what you can do afterwards, and the moment it is built for.
Chapter 0
RAG Beyond the Demo
The demo is the easy part. It passes because you control the questions.
Chapter 1
Where RAG Breaks in Production
The system passed the demo. The failure came from a boundary you had not yet thought to audit.
Chapter 2
GRAIN Overview
Five skills. One pipeline. Every retrieval failure lands somewhere inside it.
Chapter 3
Gather Corpora
The index is not the database you query: it is a contract about what you decided to trust.
Chapter 4
Chunking and Normalization
The library does not care how you cut the books. The catalog does. Every card points to a page, and if the pages are wrong, no reference system saves you.
Chapter 5
Hybrid Retrieval
The query that breaks your dense-only pipeline is not exotic. Your users typed it on the third day.
Chapter 6
Rerankers
First-stage retrieval is a net. The reranker is the hand that picks the fish.
Chapter 7
Assemble Context
The context window is real estate. Most teams dump furniture into it and hope the model can navigate.
Chapter 8
Grounding and Citations
An answer without a source is a claim without a witness. The user cannot verify it. You cannot defend it. The model cannot know it was wrong.
Chapter 9
Inspect Failures
Every bad answer is a question about your retrieval pipeline, and the trace already knows the answer.
Chapter 10
Eval Suites for RAG
If your eval is five questions that feel right, you are measuring your confidence, not your system.
Chapter 11
Navigate Freshness
A perfectly indexed corpus is already getting stale. The only question is whether you find out before your users do.
Chapter 12
Agent + RAG Architecture
The agent controls when retrieval is called. It does not control the SLA it inherits.
Chapter 13
Case Studies
The framework only proves its value when it meets the specifics. Three archetypes, one discipline.
Chapter 99
Conclusion: Retrieval You Can Trust
The loop is never finished. That is not a problem to solve. It is a discipline to maintain.
Chapter 100
Evidence ledger
Who it is for
Who this book was written for
This is not a vector-database walkthrough or a course in transformer internals. It is operator-grade retrieval: protocols you run when the corpus is messy, the latency budget bites, and an agent acts on whatever your pipeline returns.
The result is concrete. You stop shipping confident wrong answers and start shipping a retrieval layer you can test, monitor, and hand to an agent without crossing your fingers.
If you build the retrieval an agent depends on and refuse to call "good enough" a system you cannot measure, start here.
The reader it was written for
The retrieval builder. Engineer or technical founder shipping agent products with RAG — past the embed-a-PDF tutorial, hitting production failures on chunking, hybrid search, reranking, grounding, and staleness.
Also a fit for
The ML-adjacent product lead. Owns agent UX and must understand why answers drift when the LLM didn't change.
What you will use it on
- Design ingestion with permissions, versioning, and normalization
- Implement hybrid BM25 + vector with reranking
- Assemble context within token budget with citations
- Run eval suites and trace bad retrievals
- Operate freshness jobs and staleness response
Probably not for you if
- Readers wanting only agent repo layout
- Strategic ML governance without implementation
- Readers training custom models end-to-end
Editions
Editions and specifications
| Edition | Formats | Chapters | Pages | Reading time | ISBN (paperback) |
|---|---|---|---|---|---|
| English The RAG Engineer | In production | 16 | 452 | ± 6 hours | — |
| Dutch De RAG-Engineer | In production | 15 | 490 | ± 6 hours | — |
Both editions are written natively. The Dutch text is not a machine translation of the English. · Trim size: 6x9″
Frequently asked
What readers usually want to know
What is The RAG Engineer about?
GRAIN moves retrieval-augmented generation past demos: chunking, hybrid search, reranking, grounding, freshness, evaluation, and operational drift. The subtitle is: Retrieval Systems That Agents Can Actually Trust in Production.
What is the GRAIN framework?
GRAIN: Gather, Rank, Assemble, Inspect and Navigate. Gather, Rank, Assemble, Inspect, Navigate
Is there a Dutch edition?
Yes. The Dutch edition is De RAG-Engineer, written as a native edition rather than a machine translation. It moves through the same production line.
How long is The RAG Engineer?
This edition runs 16 chapters, 452 pages in print and roughly 6 hours of reading.
Who is The RAG Engineer for?
If you build the retrieval an agent depends on and refuse to call "good enough" a system you cannot measure, start here.
The production system
How this book was made
Every title moves through the same gated production line: sourced research, a claim-level evidence ledger, structural review, fact-checking, red-team critique, and a bilingual final edit. AI agents do specialist work inside those gates; judgment, voice, and accountability stay human.
- Claims enter an evidence ledger with a source and a confidence grade before they reach the page
- English and Dutch are two native editions, not a translation of one another
- Every chapter clears readability, rhythm, and style gates before it is typeset
The series