What is RAG? Retrieval-Augmented Generation explained
RAG gives LLMs accurate answers from your own documents. A simple, technical, and practical explanation.
Definition
Retrieval-Augmented Generation (RAG) is an architecture that supplies a large language model with relevant information retrieved from an external knowledge base before generating an answer.
Simple explanation
Instead of asking the model to remember everything, RAG lets it look things up. You ask a question, the system searches your documents, then the model writes an answer using what it found.
Technical explanation
The RAG pipeline has two phases: