With RAG, the AI first looks up matching passages in your documents and answers based on them. It relies on your facts rather than only its training.
Illustration: AI-generated · AI Compare Ninja · CC BY 4.0
Example
A company assistant answers questions about the holiday policy and shows the passage in the handbook.
For pros
Documents are split into chunks, stored as embeddings and retrieved by similarity search for each question. Quality depends heavily on chunking, retrieval and citations.