What is RAG?
How AI can answer questions about your own documents, and be more accurate, without being retrained.
An LLM only knows what it learned during training. It doesn’t know your company’s policies, your product docs, or yesterday’s news. RAG is the most common way to fix that.
Give the model information it doesn’t have. Search for the right documents first, then let the AI answer using them.
A good support agent doesn’t answer from memory. They check the help centre, find the right article, and then reply. RAG makes AI work the same way.
The three steps
- 1Retrieve — search your documents for the parts that match the question
- 2Augment — add those parts to the prompt, alongside the question
- 3Generate — the AI writes an answer based on that material
- Refunds are available within 14 days of purchase.
- After 14 days, store credit can be offered case by case.
- Shipping takes 3 to 5 business days.
- Passwords must be at least 12 characters.
- The office is closed on public holidays.
- Answer using only the notes below.
- Refunds are available within 14 days of purchase.
- After 14 days, store credit can be offered case by case.
- Can I get a refund after 30 days?
The search step usually uses embeddings, so it finds matches by meaning, not just exact words.
Why people use it
- Private or company knowledgeThe model can't know it otherwise
- Up-to-date informationChange the docs, not the model
- Fewer made-up answersIt has real material to work from
- Showing sourcesAnswers can point to the document used
Its limits
- Only as good as the documents. Outdated or wrong docs lead to outdated or wrong answers.
- Search can miss. If the right passage isn’t found, the AI can’t use it.
- Still check. It greatly reduces hallucinations, but doesn’t remove them completely.
A common misunderstanding
“RAG retrains the model.” It doesn’t change the model at all. It just hands the model the right notes at the right moment. Changing the model itself is fine-tuning.
Perplexity, an AI search engine, searches the web first, then writes its answer from what it found and shows numbered links to the sources.