Part II · Retrieval
Chapter 06
Chat with PDF, End to End
RAG is the most built and least engineered pattern in the field — the demo takes an afternoon; the version that survives documents you did not choose takes a quarter.
Deliverable: A chat-with-PDF system with an ingestion contract, grounded and cited answers, an abstain path, and deletion that deletes.
What's inside
11 topics
- 6.1What RAG Is Actually Solving
- 6.2Document Extraction and Layout Parsing
- 6.3Local Vector DB Setup with Docker Compose
- 6.4Document Loaders and the Ingestion Contract
- 6.5Chunking: Fixed, Recursive and Structural
- 6.6Embedding, Upserting and Idempotent Re-Ingestion
- 6.7Vector Stores as Retrievers
- 6.8Assembling the Prompt and Citing Sources
- 6.9Grounding Verification and the Abstain Path
- 6.10Multi-Tenancy, Versioning and Deletion
- 6.11Three Architectures Compared
Preparing PDF viewer…
A note on this content
The book and its chapters are my personal learning notes — compiled from online research and hands-on practice, with most of the content AI-generated from that research and learning. It is not a peer-reviewed publication, and I make no claim that it is 100% error-free. If you spot a mistake, I'd genuinely appreciate hearing about it — contact me.