All lessons in AI Engineering: From Foundation Models to Evaluated Applications
Retrieval and Context Assembly
Design a retrieval pipeline and isolate the effects of chunking, reranking, and query changes.
60 minutes · Members lesson · preview
What you will learn
- Choose passage boundaries that preserve the rule and its exceptions.
- Design a hybrid retrieval and reranking pipeline with explicit budgets.
- Diagnose whether a query rewrite or context selection changed the evidence available to an answer.
Your search engine finds the standard returns rule, but the assistant misses the clearance exclusion printed in the next paragraph. The search result is related to the question and the generated answer sounds reasonable. The failure lies between document structure and the evidence actually delivered to the model.
T11 introduced lexical and embedding search. This core knowledge lesson connects them into a retrieval pipeline: split documents, select candidates, rank them, and assemble a bounded evidence packet. T13 evaluates whether that packet supports the answer. Required practice P06 implements and compares the complete system; the exercises here develop the design decisions before you change code.
The policies, passage sizes, scores, and timing figures below are invented teaching data. They illustrate calculations and tradeoffs without implying measured behavior from a particular model or search service.