What RAG is
RAG (Retrieval-Augmented Generation) gives the model, at the moment it answers, the relevant pieces of your documents. The model "retrieves" and then "generates" the answer backed by that data.
Why it matters
- Answers based on YOUR information (manuals, policies, catalogs), not only on what the model knows.
- No retraining and no fine-tuning costs.
- You update the knowledge by changing the documents, not the model.
How it works (simple)
- You split your documents into pieces.
- You store them as vectors in a database.
- When a question comes in, you look up the most similar pieces.
- You pass them to the model along with the question.
RAG vs fine-tuning
Use RAG for knowledge that changes or is specific (company docs). Use fine-tuning to teach a consistent style or format. Often RAG is enough and cheaper.