RAG
Also called Retrieval-Augmented Generation
Hand the model a stack of your documents to read before it answers, so it stops making things up.
Think of it like
An open-book exam — instead of reciting from memory, it looks up the right page first.
Example
A support bot that quotes your actual help docs instead of confidently guessing is doing RAG.
How it actually works
Your docs get chopped into chunks, turned into embeddings, and stored in a vector database. At query time the system finds the closest chunks and stuffs them into the context window next to your question. Quality lives and dies on the retrieval step — bad chunks in, bad answer out.
For product teams
Ground the bot in your own docs so answers cite real sources — fewer escalations, no invented policies.
For engineers
Retrieve top-k relevant chunks via vector search and inject them into the prompt at inference time.
Related
- Fine-tuning — Often confused with fine-tuning — that changes the model itself; RAG just hands it notes.
- Embeddings — Runs on embeddings under the hood.
- Context window — Exists mostly to dodge the context window limit.
Read anything AI without the jargon
Look up any term in plain English, or save terms as you read with the free Chrome extension.
Open DecoderAdd to Chrome