AI application engineering · Chapter 2
Embeddings and retrieval
About this chapter
A help assistant that has been told nothing about the business cannot answer questions about it. This chapter shows how to fetch the right help page at question time: how text becomes a list of numbers that places similar meanings close together, how searching those numbers differs from keyword search, how the work splits between preparing the pages and answering a question, and why a retrieved page still does not guarantee a correct answer.
Who it is for: Developers who have called a language model and now need to give it the right material to answer from, without pasting everything into the prompt.
You will be able to
- Explain what an embedding is and why similar meanings end up close together.
- Describe why keyword search misses a question that a nearest-neighbour search finds.
- Separate the work done once in advance from the work done at each question.
- Build a prompt that hands the model numbered sources so its answer can point to one.
- Say what retrieval does not guarantee and why an answer can still be wrong.
The key idea: Retrieval changes what the model is shown, not how carefully it reads. A good match makes a grounded answer possible, and a poor match leaves the model guessing. So the search step and the answer step each need their own check.
In this chapter
- The question the keyword misses
- Embeddings: meaning as a position
- Two phases on two clocks
- The prompt with numbered sources
- What retrieval gives, and what it does not
Locked: needs a plan
You can read chapter 1 free. Chapter 2 is the next one.
What you can do now, free: re-read chapter 1 and try its problems.
What a plan gives you: all chapters of the track you pick and their checks. Professional, one role is ₹329 a month or ₹2,299 a year. It renews until you cancel, and you can cancel any time. Paid plans open at launch.
Why is this locked?
Chapter 1 of every track is free, so you can see how the track reads. The rest of a track and its checks come with a plan, or open as you pass each chapter's check.
The price is for one period, a month or a year. A plan renews until you cancel.