Available now · worldwide on Amazon
The RAG Engineer
Retrieval Systems That Agents Can Actually Trust in Production
Your RAG demo works. Production is where it breaks.
GRAIN moves retrieval-augmented generation past demos: chunking, hybrid search, reranking, grounding, freshness, evaluation, and operational drift.
Get the book
Reading from another country?Pick your own Amazon marketplace — same edition, your store.
Amazon links may include affiliate tags. That does not change the price you pay. Bol.com listings are third-party.
English & Dutch editions · Kindle, Paperback, Hardcover · free on Kindle Unlimited · Nederlandse editie →
- pages
- 514
- chapters
- 15
- hours of reading
- ± 8
- editions
- EN · NL
The editions
Choose your format
Same book, your format. You buy on Amazon, not on this site.
-
Kindle
Read now. Kindle Unlimited members get it at no extra cost.
Buy on Amazon -
Paperback
The working copy. Mark it up. Take it into the meeting.
Buy on Amazon -
Hardcover
The shelf edition. Dark full-art jacket, built to stay in the room.
Buy on Amazon
Available now
Retrieval Systems That Agents Can Actually Trust in Production
The demo passed because you controlled the questions. Two months in, a user asked the question nobody prepared, and your assistant quoted a refund window replaced fourteen months earlier. Confidently. The model stayed faithful to the wrong input.
Production retrieval breaks at five boundaries: ingest, rank, assemble, inspect, freshness. A newer embedding model fixes none of them; only domain adaptation moves the rank boundary, and only for jargon-heavy queries. Neither does fine-tuning on policy language when the index is what went stale. Nor does adopting someone’s published defaults: a starting grid, not a deployment config.
Long context gets a gate, not a dismissal. Small stable corpus, low freshness needs, per-query economics that work: preload it and skip search, sized on how your queries read rather than on an advertised window. Miss any of the three and you own an index.
The most damaging failures are silent. Plausible, consistent, acted on. Loud failures file tickets. Silent ones become decisions.
Retrieval is a product subsystem with measurable SLAs: accuracy, freshness, latency, debuggability. Five boundaries, five skills. GRAIN gives each an owner. Gather corpora. Rank and rerank. Assemble context. Inspect failures. Navigate freshness.
What you can do
What this book puts in your hands
- Name the boundary class before proposing a fix.
- Write a six-section corpus contract per source before embedding a byte.
- Run the boundary audit in order: assembly log, freshness, ingest, rank, assemble.
- Measure hybrid first. Budget reranker latency and write its fallback before the timeout.
- Put a hard gate on Recall@5. Set a TTL policy per corpus type.
The framework
GRAIN: the system behind the book
Gather, Rank, Assemble, Inspect, Navigate
-
Gather
Source selection, permissions, versioning, and the corpus contract that decides what belongs in the index.
-
Rank
First-stage retrieval (dense, sparse, or hybrid), then a reranker that orders candidates before assembly.
-
Assemble
Token budget, chunk order, deduplication, instruction layout, and citations that keep evidence usable.
-
Inspect
Failure traces, bad-chunk workflows, and eval suites that connect a wrong answer to a retrieval decision.
-
Navigate
TTL policy, re-ingest jobs, change detection, and signals that show operators how old an answer could be.

From the book
The GRAIN framework: five skills of a production RAG retrieval subsystem: Gather corpora, Rank and rerank, and Assemble context carry the
The RAG Engineer, printed page: The GRAIN framework: five skills of a production RAG retrieval subsystem: Gather corpora, Rank and rerank, and Assemble context carry the
Inspect more pagesLook inside
Pages from the print edition.
The GRAIN framework: five skills of a production RAG retrieval subsystem: Gather corpora, Rank and rerank, and Assemble context carry the
The index-architecture escalation ladder: rung 0, no retrieval with a preloaded context and KV cache; rung 1, the flat baseline of flat chunks,
The RAPTOR tree of summaries: verbatim leaf chunks of roughly 100 tokens are soft-clustered and summarized by an LLM into synthetic summary
Reciprocal Rank Fusion worked through once at k=60: the error documentation sits at BM25 rank 1 and dense rank 12, so 1/(60+1) + 1/(60+12) =
The context budget decomposed into four categories on one token scale: output reservation is fixed at 250 to 800 tokens and reserved first, system
The anatomy of a failure trace: five stages, Query parsing, First-stage retrieval candidates, Reranked ordering, Assembled context, and Answer and
CHAPTER
Step 4: Set deduplication parameters.
choice, the right freshness window for your domain), I say so, name the
Purchase takes place on Amazon, not on this website.
Buy the paperback on AmazonFrom the book
Read a page
Introduction
RAG Beyond the Demo
The demo is the easy part. It passes because you control the questions.
What you get
What you get
- The GRAIN protocol: Gather, Rank, Assemble, Inspect, Navigate
- Fix chunking, freshness, hybrid search, reranking and grounding
- Retrieval pipelines agents can trust in production
Who it's for
- Design ingestion with permissions, versioning, and a corpus contract
- Implement hybrid lexical plus dense retrieval with a reranker that earns its latency
- Assemble context within a token budget with citations you can open
- Run eval suites and trace a bad answer to a retrieval decision
- Operate freshness jobs so a replaced policy is not still the answer
Who it's for
Who this book was written for
You leave with five skills, four SLAs, one owner each. Failures have addresses. Regressions die at the gate. The GRAIN walkthrough is the design review.
For builders past the embed-a-PDF tutorial. Firm research is stated plainly; where mixed, you get variables and a way to measure. “Your mileage may vary” is banned here. Model names, benchmarks, and library interfaces carry a mid-2026 date.
Name the boundaries and they become yours.
The reader it was written for
Engineers and technical founders 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
ML-adjacent product leads who own agent UX and need to understand why answers drift when the model did not change.
What you will use it on
- Design ingestion with permissions, versioning, and a corpus contract
- Implement hybrid lexical plus dense retrieval with a reranker that earns its latency
- Assemble context within a token budget with citations you can open
- Run eval suites and trace a bad answer to a retrieval decision
- Operate freshness jobs so a replaced policy is not still the answer
Probably not for you if
- Readers who only want agent repository layout (see The Agentic Codebase)
- Strategic ML governance without implementation (see ML for Strategic Founders)
- Readers training custom models end-to-end (see ML for Agent Builders)
- Teams still at a one-off PDF-in-the-chat demo with no corpus to operate
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.
Introduction
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 a contract about what you decided to trust, not merely the database you query.
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.
Conclusion
Conclusion: Retrieval You Can Trust
The loop is never finished. That is a discipline to maintain rather than a problem to solve: run the one-line protocol every quarter and name an owner for every gap it finds.
Editions
Editions and specifications
| Edition | Formats | Chapters | Pages | Reading time | ISBN (paperback) |
|---|---|---|---|---|---|
| English The RAG Engineer | Kindle, Paperback, Hardcover | 15 | 514 | ± 8 hours | 9798192483626 |
| Dutch De RAG-engineer | Kindle, Paperback, Hardcover | 15 | 548 | ± 8 hours | 9798192498149 |
Both editions are written natively. The Dutch text is not a machine translation of the English. · Trim size: 6x9″
Get the book
One title, every Amazon marketplace. Pick your format and your store.
Get the book
Reading from another country?Pick your own Amazon marketplace — same edition, your store.
Amazon links may include affiliate tags. That does not change the price you pay. Bol.com listings are third-party.
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
In which formats is The RAG Engineer available?
The RAG Engineer ships as Kindle, Paperback and Hardcover, on every Amazon marketplace worldwide. The Kindle edition is enrolled in Kindle Unlimited, so KU members read it free.
Is there a Dutch edition?
Yes. The Dutch edition is De RAG-engineer, written as a native edition rather than a machine translation. It is available on Amazon too.
How long is The RAG Engineer?
This edition runs 15 chapters, 514 pages in print and roughly 8 hours of reading.
Who is The RAG Engineer for?
Name the boundaries and they become yours.
Our demo works. Production is a later problem.
The demo passed because you controlled the questions. Production fails at ingest, rank, assemble, inspect, and freshness. A newer embedding model fixes none of those boundaries.
Rerankers add too much latency.
Budget the latency and write the fallback before the timeout. The book treats the reranker as a cost you earn, not a default you bolt on.
We do not have eval data.
Five questions that feel right measure your confidence, not the system. GRAIN puts a hard gate on Recall@5 and a trace that names the chunk.
Freshness is ops’ problem.
A perfectly indexed corpus is already going stale. Navigate is an owner, a TTL policy, and a job, not a ticket you file after a customer quotes last year’s refund window.
Is this just another vector-database walkthrough?
No. It is operator-grade retrieval: five skills, four SLAs, one owner each. Paperback, hardcover, and Kindle are live in English and Dutch.
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
Books