How does RAG work?
- Prepare: split documents into passages and index them (often as embeddings in a vector database).
- Retrieve: find the passages most relevant to the question.
- Generate: the model answers using those passages, ideally citing them.
Why do businesses use RAG?
- Answers based on your policies, products and documents.
- Easy to update — change the document, not the model.
- Fewer invented answers, because the model is grounded in sources.
- Access control — retrieve only what a user is allowed to see.
RAG vs fine-tuning
| RAG | Fine-tuning | |
|---|---|---|
| Best for | Facts that change, large document sets | Style, format, narrow skills |
| Updating | Edit the documents | Retrain the model |
| Traceability | Can cite sources | Hard to trace |
Frequently asked questions
Does RAG stop AI hallucinations?
It reduces them a lot when retrieval is good, but answers should still be tested and the model told to say when the sources do not cover a question.
Can RAG use data from my CRM or database?
Yes. Retrieval can query structured systems as well as documents, with the same access rules.