CoursesBuilding AI Applications

Retrieval and Context

Give the model the right few pages instead of the whole library: when to retrieve, how chunks and embeddings work, how to assemble a context the model can cite, and how to tell when retrieval is the wrong tool.

Lessons
5
Exercises
29
Minutes
32

Start Why Retrieve

  1. 1

    Why Retrieve

    After this lesson you can say when a question needs retrieval, what the retrieve-then-answer loop does, and why it is a grounding technique before it is a search technique.

    Code orderMultiple choiceTap
    5 exercises
    5 min
  2. 2

    Chunks and Embeddings

    After this lesson you can explain what a chunk and an embedding are, why chunk size and boundaries decide retrieval quality, and why similar is not the same as relevant.

    DebugFill blankMultiple choice
    5 exercises
    6 min
  3. 3

    Assembling the Context

    After this lesson you can build the request from retrieved chunks: how many, in what order, under what budget, labelled so the model can cite, and what to do when nothing relevant came back.

    DebugMultiple choiceTrace
    5 exercises
    6 min
  4. 4

    Checkpoint: The Right PageCheckpoint

    Retrieval decisions in fresh situations.

    Fill blankMultiple choice
    6 exercises
    6 min
  5. 5

    Boss: The Docs AssistantBoss

    One retrieval product from indexing to a wrong citation: chunking, hybrid search, assembly, empty results, stale versions, and the injection hiding in a page.

    DebugFill blankMultiple choiceTrace
    8 exercises
    9 min