RAG: AI with your own data, explained in plain English

If you want an AI to answer with your business information —your prices, your policies, your products— you don't need to train a model. Almost always, what you're after is called RAG. Here's what it is and when to use it.

RAG: AI with your own data, explained in plain English

Language models know a lot about the world, but they know nothing about your business: they don't know your prices, your opening hours or your terms. There are two ways to fix that, and mixing them up costs time and money.

Retraining vs. giving context

Retraining (or fine-tuning) changes the model itself using a lot of examples. It's expensive, it's slow, and you have to redo it every time your data changes. For most cases it's a sledgehammer to crack a nut.

The alternative is RAGRetrieval-Augmented Generation—. Instead of putting the data inside the model, we hand it over as context at the moment of answering: the system finds the relevant chunks of your documentation and passes them to the model along with the question. The technique was formally described in a 2020 research paper and today it's the standard pattern for AI over your own data.

How it works, step by step

  • Your documentation (websites, PDFs, catalogues) is split into chunks and indexed.
  • When someone asks a question, the system retrieves the most relevant chunks.
  • Those chunks are passed to the model as context, and it writes the answer based on them.

The practical upside: when you change a price, you only update the document —nothing has to be retrained—. And because the answer leans on your own text, it's much easier to stop the model making things up.

When it makes sense

RAG is the default option for support chatbots, internal search and assistants that have to answer with your own, up-to-date information. Fine-tuning is kept for specific cases of very particular style or format. For getting AI to answer with my company's data, the answer is almost always RAG.

In our AI agents we use exactly this approach: the agent knows your business because we give it your information as context, and if something isn't in there, it takes a message instead of making one up. If you want one that talks to your data, let's talk.

Sources

  1. Lewis et al. (2020) — Retrieval-Augmented Generation (original paper, arXiv)
  2. Anthropic — documentation on using context and retrieval
  3. OpenAI — guide to embeddings and retrieval
Back to blog

Shall we talk aboutyour project?