What is RAG in plain words
Model alone
- Answers from training memory
- Can be outdated
- Knows nothing about your files
Model with RAG
- Looks up your documents first
- Writes from what it found
- Uses your current sources
A language model answers from what it learned in training. That knowledge can be outdated, and it knows nothing about your private files.
RAG fixes this by adding a lookup step. Before the model writes, the system searches your documents and hands the best matches to the model.
The model then writes its reply using those passages. Think of an open-book exam instead of answering from memory.
The retrieval augmented generation meaning is in the name: retrieve first, then generate.