Retrieval-augmented generation (RAG) is a method where a system retrieves relevant documents first, then gives them to a language model to answer from.
The model's training data is fixed and general. Your documents are current and specific. RAG bridges the two. A question comes in, the system searches an index of your content (usually semantic search over chunks), picks the top matches, and places them in the prompt with the question. The model then answers using that material and, ideally, cites it. The model is not retrained; the knowledge arrives at request time.
RAG quality is mostly retrieval quality. Bad chunking, a weak embedding model or a stale index will produce confident answers from the wrong passage. Two safeguards help. Keep the source with every retrieved chunk so answers can be checked. Refresh the index when files change, not on a schedule that lets it drift. RAG over a personal file library and RAG over a hosted enterprise corpus follow the same steps; they differ in where the index lives.