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 RAG Engineer — front cover
The RAG Engineer — back cover

The editions

Choose your format

Same book, your format. You buy on Amazon, not on this site.

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

  1. Gather

    Source selection, permissions, versioning, and the corpus contract that decides what belongs in the index.

  2. Rank

    First-stage retrieval (dense, sparse, or hybrid), then a reranker that orders candidates before assembly.

  3. Assemble

    Token budget, chunk order, deduplication, instruction layout, and citations that keep evidence usable.

  4. Inspect

    Failure traces, bad-chunk workflows, and eval suites that connect a wrong answer to a retrieval decision.

  5. Navigate

    TTL policy, re-ingest jobs, change detection, and signals that show operators how old an answer could be.

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
The GRAIN framework: five skills of a production RAG retrieval subsystem: Gather corpora, Rank and rerank, and Assemble context carry the

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 pages

From 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

15 chapters

Every chapter of The RAG Engineer with its printed epigraph, what you can do afterwards, and the moment it is built for.

  1. Introduction

    RAG Beyond the Demo

    The demo is the easy part. It passes because you control the questions.

  2. 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.

  3. Chapter 2

    GRAIN Overview

    Five skills. One pipeline. Every retrieval failure lands somewhere inside it.

  4. Chapter 3

    Gather Corpora

    The index is a contract about what you decided to trust, not merely the database you query.

  5. 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.

  6. Chapter 5

    Hybrid Retrieval

    The query that breaks your dense-only pipeline is not exotic. Your users typed it on the third day.

  7. Chapter 6

    Rerankers

    First-stage retrieval is a net. The reranker is the hand that picks the fish.

  8. Chapter 7

    Assemble Context

    The context window is real estate. Most teams dump furniture into it and hope the model can navigate.

  9. 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.

  10. Chapter 9

    Inspect Failures

    Every bad answer is a question about your retrieval pipeline, and the trace already knows the answer.

  11. Chapter 10

    Eval Suites for RAG

    If your eval is five questions that feel right, you are measuring your confidence, not your system.

  12. Chapter 11

    Navigate Freshness

    A perfectly indexed corpus is already getting stale. The only question is whether you find out before your users do.

  13. Chapter 12

    Agent + RAG Architecture

    The agent controls when retrieval is called. It does not control the SLA it inherits.

  14. Chapter 13

    Case Studies

    The framework only proves its value when it meets the specifics. Three archetypes, one discipline.

  15. 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
Read the system in The Agentic Author

Terminology

The production system

In this system

To Amazon
Markdown for LLMs