Lesson 49
Retrieval
Build an LLM From Scratch, 53 lessons
Lesson 49: Retrieval
Build an LLM From Scratch, Lesson 49 of 53

An agent cannot read everything on every lap, so it searches a store and pastes only the best few chunks. Search this course's own notes by keyword and by meaning, find where each fails, cut a note into chunks, and follow one note from storage to the prompt.
The question for this lesson: how can an agent use far more knowledge than it should hold at once?
Lesson 48 ended on a ceiling. The context window is the most the model can read on one lap, and each lap pays for it, with lesson 48’s discount when the start matches a cached request. Dropping, summarising and note-taking decide what to leave out of a list the agent already has.
The rest of this lesson is in Premium
Premium includes every lesson, with its notes, practice and progress.