Retrieval-augmented generation, or RAG, is a pattern for giving a language model access to specific information at the moment it answers. Rather than relying on what the model learned in training, the system first finds relevant passages in your documents and supplies them as context.
The practical benefit is traceability. A well-built system can show which sources informed an answer, so people can verify it.
Quality depends less on the model than many expect. How documents are cleaned and divided, how search is tuned and whether permissions are respected often matter more.
A RAG system should also be evaluated like any other software. Build a set of real questions with known good answers, and test against it whenever content or configuration changes.
