RAG works in two steps. First it retrieves: it searches a curated body of knowledge for material relevant to the question. Then it generates: it builds an answer using that retrieved material as its factual base.
The benefit is grounding with attribution. Because the model was handed specific sources, those sources can be cited and checked. RAG also keeps answers current without retraining, since the knowledge source can be updated on its own.
Done well, RAG turns a general model into a domain expert bounded by verified knowledge.