RAG
Retrieval-augmented generation: the pipeline, chunking, answer rules, common failures, permissions and when long context is enough.
7 notes · 15 min total
- 1What and WhyWhat retrieval-augmented generation is and the two problems it solves: a frozen, public-only model and answers with no sources.2 min
- 2PipelineThe two phases of a RAG pipeline: offline indexing (load, chunk, embed, store) and retrieval at question time (embed, search, prompt).2 min
- 3ChunkingWhy chunk size is one of the biggest RAG decisions, how overlap helps, and the splitting strategies from fixed-size to semantic.3 min
- 4Answer RulesThe three system prompt rules that turn retrieved chunks into grounded answers: answer only from context, cite sources, say I don't know.2 min
- 5Common FailuresThe four buckets most RAG failures fall into, the fix for each, and why the first check is whether the right chunk was retrieved.2 min
- 6PermissionsWhy access control in RAG must filter chunks at retrieval time, never after, and the per-tenant versus shared-index patterns.2 min
- 7RAG vs Long ContextWhen to skip RAG and put documents in the prompt, when RAG wins, and why RAG reduces hallucination without removing it.2 min