Portfolio/ PromitDocument
Promit / Reference Library9 parts · 15,600 words
Document preface

The RAG Bible

A consolidated, end-to-end reference on Retrieval-Augmented Generation. It covers the five-stage pipeline, chunking strategy, retrieval and re-ranking, optimization, and evaluation (MRR, NDCG) — through to the hardening required to run RAG reliably and securely in the enterprise.

Written & compiled byPromit
PublishedJune 30, 2026

Most RAG failures are blamed on the model. Usually, the damage happened much earlier: a document was parsed badly, a boundary was cut in the wrong place, retrieval selected a plausible fragment, or permissions were treated as a prompt instead of an access rule.

This book treats RAG as what it really is—a pipeline of decisions. Retrieval decides what the model is allowed to know for one answer. Generation decides how faithfully it uses that knowledge. Engineering decides whether either of them survives contact with production.

It is written to work at three altitudes: a clean narrative for interviews, a design reference for solution architecture, and a go-live playbook for delivery teams. The mathematics is explained through behaviour and worked examples, because an idea is only useful when you can explain it under pressure.

A look inside

What this edition gives you

  1. 01

    Ingestion, retrieval, generation, and the contracts between them

  2. 02

    Golden-dataset evaluation with MRR, NDCG, and LLM-as-judge

  3. 03

    Security trimming, multi-tenancy, Azure, and day-two operations

Continue reading

Download it if you want RAG without the magic tricks: every layer visible, every failure attributable, and every design choice open to challenge.