What is RAG?
Retrieval-augmented generation is a way to make an AI answer from a specific collection of information—your handbook, contracts, support docs, research notes, or product catalog—instead of relying only on what the model absorbed during training.
The key word is retrieval. Before the model writes an answer, the system searches your knowledge base for the passages most relevant to the question. Those passages are placed into the model’s context, and the model generates an answer grounded in that evidence.
It is the automated version of pasting a document into Claude and saying, “Answer only from this file, and show me where you found it.”
The RAG workflow
- PrepareYour documents are split into useful chunks and converted into searchable representations.
- RetrieveA question triggers a search for the chunks whose meaning most closely matches the request.
- GenerateThe model receives those passages, answers from them, and can cite the exact source used.
Traditional keyword search looks for matching words. A typical RAG system also uses embeddings—numeric representations of meaning—so a question about “time off after having a child” can still retrieve a section titled “parental leave.” The retrieved evidence matters more than the jargon: the model gets the right text before it responds.
Three reasons RAG is useful
It reduces confident inventions. If the answer must come from retrieved evidence, the system has less room to manufacture a plausible policy or number. A well-designed system should also admit when the source set does not contain an answer.
It can use private and current information. A model’s training data will not contain the contract signed this morning or the wiki page edited ten minutes ago. A RAG index can be refreshed when those files change.
It makes verification practical. The answer can include the document, page, or passage it used. That turns “trust the chatbot” into “check the source in ten seconds.”



