Advanced Patterns
Parent-child retrieval, summaries, multi-vector, graphs, SQL, images and search as a tool: when plain chunks and top-k are not enough, and what each costs.
A plain RAG pipeline cuts documents into chunks, searches them, and pastes the best few into a prompt. It carries you a long way. This phase is about the questions it cannot answer well: the answer needs the paragraph around the match, the question is about a whole document, the facts sit in a table or a database, the answer needs two or three searches in a row, or the corpus is small enough that you should not be searching at all.
Each pattern here is a fix for a measured symptom, never an upgrade to apply by default. You will build each one by hand at small scale (parents and children with ids, a summary index, several vectors per passage including late interaction scored by hand, a graph of facts you extract and walk, a validator for model-written SQL, a loop that searches again and stops itself) and count what it costs in storage, calls and ways to fail. Named techniques (ColBERT, GraphRAG, RAPTOR, HyDE, CLIP) are introduced by what they do, with the papers that introduced them, and never as a recipe to copy blindly.
The phase ends with the AskDocs build: small-to-big retrieval added behind the same retrieve interface and compared with whole-section search, and a playbook that maps symptoms to patterns. Agents that plan, use many tools and keep memory belong to the coming AI Agents course. This phase covers only the part where the tool is search.
Practise this phase
Hands-on exercises: write the code, run it, and press Check to have it tested automatically.