AI Glossary Term
What does “RAG (Retrieval-Augmented Generation)” mean?
A method that retrieves external knowledge and feeds it into generation at inference time.
How RAG (Retrieval-Augmented Generation) works
Example
A company chatbot answers staff questions about HR policy. It first searches the policy documents for relevant paragraphs, hands them to the model, and the model answers based on those paragraphs and can point to the source.
Why it matters
RAG lets a model use current or private information without retraining and makes answers easier to check. It reduces, but does not eliminate, made-up answers.
Common questions
RAG vs fine-tuning?
RAG supplies knowledge at answer time and is easy to update. Fine-tuning changes the model's behavior or style.
What can go wrong?
If retrieval finds the wrong passages, the answer may be wrong, and the model may still add unsupported details.
What does RAG need?
A document collection, a way to search it, often using embeddings and a vector database, and a model to write the answer.