What Is RAG
Answers from your documents.
RAG stands for retrieval augmented generation. It's a simple idea. Before a language model answers a question, we find the most useful pieces of our own documents, and hand them to the model with the question. The model then answers from those facts.

- Retrieval
- Augmented
- Generation
RAG in one picture
A customer asks a question. We search our documents for the parts that match. We pick the best few pieces. We give those pieces and the question to the model. And the model writes an answer, based on our own facts.
- Question
- Search docs
- Best pieces
- Model reads them
- Answer

Why people use RAG
RAG lets a model answer questions about things it was never trained on, like your company's policies. Answers can point to their sources, so people can check them. When a document changes, the answers change too, with no retraining. And it's cheap to build.
| key | value |
|---|---|
| Your own facts | private documents |
| Sources | answers you can check |
| Always fresh | edit a file, done |
| Cheap | no training needed |
Summary
RAG means finding the right pieces of your documents, and letting the model answer from them. Next, why models need this help.
Key takeaways- Retrieve the facts
- Add them to the prompt
- Generate the answer