What problem does retrieval-augmented generation (RAG) solve?
Options
- It retrains the model's weights on every question
- It removes the context window limit
- It gives the model relevant, current or private information at question time by retrieving it and adding it to the prompt (Correct option)
- It makes prompts unnecessary
Answer
It gives the model relevant, current or private information at question time by retrieving it and adding it to the prompt
Why
A model only knows what was in its training data, which is old and does not include your private documents.
RAG searches your documents for the passages related to the question and puts them in the prompt, so the model can answer from them and cite them.
The model is not changed: updating the knowledge means updating the documents and the index.
Remember
RAG = retrieve first, then generate from what was found.