Skip to content

Stage 3 · Expert · L6

Grounding Models

The model does not know your data. Give it eyes.

13 lessons · 124 minSteady

About this chapter

Retrieval is a search engine bolted to a writer. Get the search right and the writing mostly takes care of itself, which is why this chapter is about chunking, indexes and ranking rather than about prompts. You will rank passages by meaning, cut documents in the place that keeps a rule whole, measure what an approximate index gives away, and merge a word search with a vector one. Then you will separate retrieval failures from writing failures, which is the skill the rest of it rests on, and work out whether any of it beats pasting the whole handbook into the window.

What you will be able to do

  1. 1

    Why the Model Does Not Know Your Data

    Explain the gap between training text and your own documents.

    8 min
  2. 2

    Search by Meaning

    Turn a question and a set of passages into points, and rank them by angle.

    10 min
  3. 3

    Chunking Decides Everything

    Choose a chunk size and an overlap for a document, and say why.

    11 min
  4. 4

    Vector Indexes

    Explain approximate search and name the recall it trades away for speed.

    10 min
  5. 5

    Keywords Still Matter

    Run a word search beside a meaning search and merge the two ranked lists.

    10 min
  6. 6

    Read the Shortlist Properly

    Add a second pass over the top results and measure what it buys.

    9 min
  7. 7

    Answers With Receipts

    Design an answer format whose every claim points at a passage you can open.

    9 min
  8. 8

    Retrieval in Arabic

    Fold spellings on both sides of a search and name what folding costs.

    10 min
  9. 9

    Measuring the Two Halves

    Score retrieval and answering separately, and find which one failed.

    11 min
  10. 10

    Four Ways It Fails

    Name the failure mode from the symptom, and pick its repair.

    10 min
  11. 11

    Paste It All, or Go and Find It

    Work out the cost of both approaches for a real workload and choose.

    9 min
  12. 12

    Teach It, or Show It

    Choose between changing the weights and changing the window, with a reason.

    9 min
  13. 13

    Every Tool Is a Retriever

    Treat a tool call as grounding, and treat its result as untrusted data.

    8 min

Before you start

Keep going

All chapters