1 ยท Chunk
The documents are cut into passages. Everything downstream can only ever see one of these pieces.
Chunks
A fact split across two chunks may be found in neither. A chunk holding two subjects gets a vector that sits between them.
2 ยท Embed
An embedding model turns a whole chunk into one list of numbers. Chunks about the same thing land near each other, whatever words they use.
Choose a chunk
Embedded chunks
No chunks embedded yet.
3 ยท Retrieve
The question becomes a vector too. The chunks closest to it are the ones the model will be shown.
Closest chunks
4 ยท Answer
The retrieved passages are pasted into the prompt, with an instruction to use only those and to cite them.