Skip to content

Grounding AI in your own data: RAG explained in plain English

Retrieval-augmented generation lets AI answer from your documents instead of guessing. How it works, when to use it, and the mistakes that make it fail.

3 min read

The fastest way to lose trust in an AI tool is to watch it confidently make something up. Ask a general-purpose chatbot about your refund policy or last quarter's pricing and it will either admit it doesn't know or, worse, invent a plausible answer.

Retrieval-augmented generation, usually shortened to RAG, is the most common fix. It's behind most useful business AI tools today: internal knowledge assistants, support bots, document Q&A and proposal generators.

The idea in one paragraph

Instead of relying on what the model learned during training, a RAG system first searches your own content for the passages most relevant to the question, then gives those passages to the model along with the question and instructs it to answer using only that material. The model does the reading and writing; your documents supply the facts.

Think of it as the difference between asking someone to answer from memory and handing them the right file first.

How a RAG system is built

  1. Collect the sources. Policies, help articles, contracts, product specs, past proposals: whatever the AI should know.
  2. Split and index them. Documents are broken into passages and stored in a search index, usually combining keyword search with "semantic" search that matches meaning rather than exact words.
  3. Retrieve. When a question comes in, the system finds the most relevant passages.
  4. Generate. The model answers using those passages and, ideally, cites which ones it used.
  5. Evaluate. A set of test questions with known answers checks that quality holds as content and models change.

When RAG is the right tool

  • Your answers live in documents that change regularly.
  • You need answers traceable to a source, for compliance or trust.
  • Different users should only see content they're allowed to see.
  • You want to keep using the latest models without retraining anything.

When people ask whether they should "train a model on our data", RAG is usually the better first answer. It's cheaper, faster to update and easier to audit. Fine-tuning has its place, mostly for teaching style, format or a narrow skill, but it's a poor way to teach facts that change.

Why RAG projects disappoint

Most RAG failures have nothing to do with the language model. They come from the retrieval step:

  • Messy sources. Outdated, duplicated or contradictory documents produce contradictory answers. Cleaning content is often the highest-value work in the project.
  • Bad chunking. Splitting documents in the wrong places separates a rule from its exceptions. Respecting headings and tables makes a big difference.
  • Keyword-blind search. Pure semantic search can miss exact terms like product codes and clause numbers. Hybrid search fixes this.
  • No permissions model. If the index ignores access rights, the assistant may show someone a document they shouldn't see.
  • No evaluation. Without a test set, nobody notices when a content change breaks twenty answers.

What good looks like

A solid business RAG assistant answers in your terminology, cites its sources, says "I don't know" when the documents don't cover something, respects permissions and gets measurably better as you fix content. It should also log questions it couldn't answer, which doubles as a list of gaps in your documentation.

A sensible first project

Pick one team and one body of knowledge, such as support macros or the sales team's product information. Write fifty real questions with the correct answers. Build the assistant, measure it against that list, and only then widen the scope. A focused version like this typically reaches production in six to ten weeks, and the evaluation set you build along the way is what keeps it reliable afterwards.

RAG isn't magic. It's search plus a very good writer. Get the search right and the writing takes care of itself.

Keep reading

More from the blog

Available for new projects

Let's build what's next.

Tell us what you're building. The first consultation is on us, and we'll come back within one working day.