Why Your RAG Answer Is Wrong (Even With the Right Docs)

Most "RAG" tutorials stop at "embed your docs, do a vector search, stuff the top-k into the prompt." That's the version that quietly returns confident, cited, wrong answers. This is RAG end to end — as one evidence pipeline you can actually debug: chunking, query planning, hybrid retrieval, reranking, context packing, and grounding. One running example (an enterprise refund-policy assistant), two genuinely counterintuitive results, and a mental model that survives contact with production. You'll learn: • Why a boring 1990s keyword algorithm (BM25) can beat a state-of-the-art embedding model on enterprise docs — and when to use both. • "Lost in the middle": why more evidence isn't a better answer, and where on the context window you place a fact changes whether the model even uses it. • Why citation ≠ proof — and how grounding (a separate check with support lines) is the real fix. Chapters: 0:00 A cited answer that's still wrong 1:11 What RAG actually is — a second, live memory 2:42 Chunking — the fact that loses its passport 4:48 The question is not the query (planning + permissions) 6:02 Retrieval is a funnel — the BM25-beats-dense surprise 7:52 Reranking — reading together, not just distance 9:44 Context packing — "lost in the middle" 11:34 Grounding — citation is not proof 13:38 Recap — RAG is the discipline of controlling evidence #systemdesign #rag #llm #softwareengineering #machinelearning #ai The Hot Path — system design, explained in depth. New videos weekly. 🔔 Subscribe:    / @thehotpath   #systemdesign #softwareengineering #distributedsystems