Glossary

What is RAG (Retrieval-Augmented Generation)?

Definition

Retrieval-augmented generation (RAG) is a technique in which an AI system first searches a chosen set of documents for relevant passages, then gives those passages to a large language model so it can answer using that source material rather than its general training alone.

Last updated 2026-10-18 · Flowmatix

How RAG works

A RAG system runs in two stages.

Preparation. Your documents (policies, product sheets, help articles, past proposals) are split into small chunks. Each chunk is converted into an embedding, a list of numbers that represents its meaning, and stored in a searchable index, often a vector database.

Answering. When someone asks a question, the system turns the question into an embedding too, finds the chunks with the closest meaning, and passes those chunks to the language model with an instruction such as "Answer using only the sources below and cite them."

Example: an insurance brokerage loads 400 pages of policy wordings into a RAG assistant. A broker asks, "Does the Gold home policy cover sewer backup, and what is the limit?" The system retrieves the two relevant clauses, and the model answers in plain English with links to the exact sections, so the broker can check before quoting the client.

Because retrieval happens at the moment of the question, updating the knowledge is as simple as replacing a document. No retraining is needed.

Why it matters for your business

A general AI model knows nothing about your prices, procedures or contracts, and will guess if asked. RAG grounds answers in your own approved material, which makes AI chat, internal search and AI chatbots far more accurate and auditable.

It also keeps control in your hands. You decide which documents are included, who can query them and how answers are cited, which is essential for regulated or client-sensitive work.

Common mistakes

  • Loading outdated, duplicated or contradictory documents, then wondering why answers conflict.
  • Splitting documents in awkward places so that a rule and its exception land in different chunks.
  • Skipping citations, which makes answers impossible to verify.
  • Ignoring permissions, so staff can retrieve files they should not see.
  • Never testing with real questions from customers or staff before launch.

Frequently asked questions

Is RAG the same as training a model on my data?

No. Training (or fine-tuning) changes the model itself. RAG leaves the model unchanged and supplies relevant information each time it answers, which is usually cheaper and easier to keep current.

Does RAG stop AI from making things up?

It reduces the problem a great deal but does not remove it. Clear instructions, citations and a fallback ("I couldn't find that; here is how to reach a person") are still needed.

Where can I learn more?

Our article What is RAG? How AI answers from your documents instead of guessing covers costs and set-up choices in more detail.

How Flowmatix can help

Our AI agent development work puts this into practice for businesses in Toronto and around the world. Get a personalised quote in about 3 minutes.

Related terms

See all 50 terms

Have an idea?

Ready to see what your project costs?

Answer a few questions and get a personalised plan, a comparison with typical market prices, and a clear next step. No obligation, no sales pressure.

Contact us