Skip to content
AgenticAIWiki

← Chapter 23. Advanced RAG

Upgrading a naive RAG pipeline

Upgrades to slot inDocumentsIndexfixed-size chunksQuestionSearchvectors, top 20Prompt + model20 loose chunksQuery rewritingHybrid BM25RerankingContextual chunks

Swipe to change step

Step 1 of 8. Here is the naive pipeline from chapter 21: fixed-size chunks, one vector search, and twenty loosely related chunks in the prompt. It works, but misses often. We will improve it one upgrade at a time. Documents. Index (fixed-size chunks). Question. Search (vectors, top 20). Prompt + model (20 loose chunks). Query rewriting. Hybrid BM25. Reranking. Contextual chunks. arrow from Documents to Index. arrow from Index to Search. arrow from Question to Search. arrow from Search to Prompt + model. a question moving along e-qs, then e-sl.

Keys: → or J next, ← or K back, Home and End jump, Space toggles auto-play when the diagram has focus.