RAG stands for retrieval-augmented generation. Stripped of the acronym it means: look something up first, then write the answer using what you found. That is it.
Why it exists
A language model on its own knows a lot about the world and nothing about your business. Ask it your opening hours and it will produce something that looks like opening hours, because producing plausible text is what it does. That is the origin of most “the chatbot lied to my customer” stories.
RAG puts a search step in front of the model. The question is used to find the relevant passages from your own content, those passages are handed to the model, and the model is instructed to answer only from them.
What happens per question
- Your content is indexed. Pages are split into passages and each one is converted into a vector — a numerical fingerprint of its meaning.
- The question is converted the same way, and the closest passages are found. Good systems combine this with ordinary keyword search, because meaning-search alone is bad at exact things like phone numbers.
- The passages go into the prompt with an instruction: answer from these, and if they do not cover it, say so.
- The model writes the answer — in the visitor’s language, in your tone, but constrained by the passages.
What RAG fixes
- Answers about your business are grounded in your actual pages.
- Updating an answer means editing a page, not retraining anything.
- The system can tell you which passages it used, so a wrong answer is diagnosable.
- “I do not know” becomes possible, because the absence of a matching passage is a signal.
What RAG does not fix
- Bad content. If your pricing page is vague, the answers about pricing will be vague. RAG is a mirror.
- Contradictions. If an old page says one thing and a new one says another, retrieval may find either. This is why canonical facts — your phone number, your hours — should be stated in one authoritative place.
- Reasoning. It finds and phrases; it does not deduce your policy from first principles.
The parts that separate good RAG from bad
Almost every vendor now says “RAG”. The differences that matter are in the details: whether keyword and meaning search are combined, whether long pages keep their section structure, whether duplicates are collapsed, whether the system can distinguish a service page from a blog post, and whether it refuses to answer rather than guessing. Those details are the difference between a chatbot you can trust in front of customers and one you cannot.
Questions
Is RAG the same as training or fine-tuning?
No. Fine-tuning changes the model’s weights and is slow, expensive and hard to update. RAG changes what the model is shown at question time, so updating your knowledge is as fast as editing a page.
Does my content get sent to the AI provider?
The passages relevant to each question do, along with the question. Your whole site is not uploaded, and with a self-hosted plugin the index itself stays in your database.