How RAG Works
RAG lets an AI retrieve useful information from your documents before it writes the answer.
Why retrieval matters
A language model does not automatically know the contents of your private files. RAG adds a retrieval step so the model can answer using selected source material instead of relying only on its general model knowledge.
Question: What is our refund policy?
Retrieval: Find the policy paragraph in the company handbook.
Generation: Give the model the retrieved paragraph together with the question.
Five parts to remember
RAG is not the same thing as training the model.
RAG supplies retrieved context at answer time. Fine-tuning changes model behavior through training.
RAG is a retrieval pipeline: find useful source material first, then give that context to the model so it can answer more usefully.