← AI Glossary

What is RAG (retrieval-augmented generation)?

By · Updated · 3 min read

RAG, short for retrieval-augmented generation, is a way of making an AI answer from your own information: it looks up the most relevant documents first, then writes its answer using them.

On their own, AI models only know what they learned in training, which can be out of date and knows nothing about your business. Ask about your refund policy and a plain model will guess. With RAG, the system finds your actual policy and answers from it.

What RAG means (and why it matters)

Most business questions are about your specifics: prices, policies, product details, past orders. RAG connects an AI to that knowledge so it stops guessing. It is the method behind most customer support bots, internal "ask our docs" assistants, and voice agents that know your services.

How RAG works

StepWhat happens
1. PrepareYour documents are split into small chunks
2. IndexEach chunk is turned into an embedding and stored in a vector database
3. RetrieveA question is matched to the most similar chunks
4. GenerateThe LLM writes the answer using only those chunks
5. CiteGood systems show which document each answer came from

RAG vs fine-tuning

RAGFine-tuning
Best forFacts that change: prices, policies, docsStyle, tone, fixed formats
Update knowledgeEdit the documentsRetrain the model
Shows sourcesYesNo
Typical costLowerHigher

For most businesses, RAG is the right first step.

How to set up RAG, step by step

1. Gather the right documents

FAQs, policies, product sheets, help articles. Remove outdated versions first.

2. Clean and structure them

Clear headings and one topic per section make retrieval far more accurate.

3. Choose a platform

Many chatbot and voice platforms include a knowledge base feature that handles chunking and search for you.

4. Test with real questions

Ask the questions customers actually ask, and check every answer against the source.

5. Keep it current

Update the documents whenever prices or policies change.

A worked example

A home services company loads its price list, service areas and booking policy into its AI receptionist's knowledge base. When a caller asks whether they cover a certain town and what a call-out costs, the agent retrieves those two sections and answers correctly, instead of guessing.

Common mistakes

  • Loading everything. Old, duplicate or conflicting documents confuse retrieval.
  • No testing. Check answers against the source before you go live.
  • Huge chunks or tiny chunks. Both hurt accuracy; a few paragraphs per chunk is a common start.
  • Forgetting updates. A RAG system with last year's prices gives last year's answers.

FAQ

Does RAG stop AI hallucinations?

It reduces them a lot by grounding answers in your documents, but it does not remove them. Instruct the model to say "I don't know" when the documents do not cover a question.

Do I need a vector database?

Usually something like one, but many platforms include it, so you upload documents and never manage the database yourself.

Is my data used to train the model?

Not by RAG itself: your documents are looked up at question time. Check each provider's data terms for how they store and use content.

How much content can RAG handle?

From a few pages to millions of documents. Quality and organisation matter more than size.

Final verdict

If you want an AI that answers correctly about your business, RAG is the method to use. Spend your effort on clean, current documents and careful testing, and the AI part takes care of itself.

Want an assistant that knows your business?

We build custom AI systems and AI voice agents grounded in your own knowledge.

Keep exploring