Retrieval-Augmented Generation (RAG)
Give a model the right pages at question time by searching your documents first, then answering from what was found.
Why retrieval
A model only knows what was in its training data, which has a cutoff date and never included your private documents. Asking it about your refund policy gets a confident guess.
RAG (Retrieval-Augmented Generation) fixes this by searching your documents at question time and pasting the best matches into the prompt. The model then answers from text it can see.
| Approach | Good for | Weak at |
|---|---|---|
| RAG | Facts that change, private data, citing sources | Needs a search system you must maintain |
| Fine-tuning (next lessons) | Style, format, narrow skills | Poor at adding facts; stale after training |
| Long context (paste everything) | Small corpora, one-off tasks | Cost and latency grow with every call |
1 of 8