AgentCrafts

What is RAG? A plain explanation for business owners

Retrieval augmented generation gives a model your own documents. What it actually does, where it helps, and where plain search is enough.


RAG stands for retrieval augmented generation. It sounds technical and it is not hard to explain. It means a language model is given the answer at the moment it writes, by looking up your own documents first, instead of answering from memory.

Most business owners meet the idea through a demo. A chatbot appears to know the business inside out: the refund policy, the warranty terms, the price list. Some of those demos are genuinely useful. Others are wired to a document folder nobody has updated since last year, and the bot answers confidently from the wrong file.

Here is the plain version, including the parts that go wrong.

What the model knows, and what it does not

A language model stores patterns from a huge amount of text. It does not hold your price list, your policies or the notes from last week's sales call. It has never seen any of it. You cannot paste it all into the prompt either, because prompts have a size limit and most businesses hold more reference material than a model can read in one go.

Retrieval augmented generation is the workaround. The system finds the relevant part of your material first, gives only that to the model, and the model writes the answer from it.

What happens under the hood

Five steps sit between the question and the answer.

  1. Chunking. Your documents are split into pieces. Too large and the model gets noise. Too small and it loses the context that makes a rule meaningful.
  2. Indexing. Each chunk is turned into a list of numbers, called an embedding, and stored. A vector database such as Pinecone does this job, and database extensions do the same thing inside Postgres.
  3. Search. The question is turned into a list of numbers too, and the closest chunks are pulled back. Good systems mix this with keyword search, because part numbers need exact matching.
  4. Generation. The question and the retrieved chunks go to the model, with instructions to answer only from the supplied material and to say so when the answer is not in the documents.
  5. Citing. The system returns the source passage. This is not decoration. It is the difference between an answer you can check and one you have to take on faith.

Why the retrieval part is the hard part

The model is the easy part. Modern models write clean answers from supplied text.

Retrieval is where systems go wrong. A question about the warranty for model B can pull the paragraph about model A, because the two documents share most of their wording. The model then answers confidently from the wrong chunk. No amount of prompt writing fixes a chunk that was never the right one.

Where RAG earns its place

In my experience it pays off in a narrow set of cases.

  • An internal assistant. Staff ask a question whose answer is written down somewhere, and getting it means searching a wiki, two drives and a colleague.
  • Support. Answers come from past tickets, product manuals and policy notes, and a person approves anything that reaches a customer.
  • Sales and consulting. A colleague asks what to say when a client raises a particular point, and the answer comes from your own proposals and call notes.
  • Compliance and audit. Staff need the current policy text and the source of it, not a summary written from memory.

The common feature is that the answer exists in writing, and finding it is the slow part.

Where it goes wrong

I would rather say this than sell the idea.

Stale documents. Retrieval is very good at finding old guidance. If your procedure changed and the files did not, you have built a fast way to give the wrong answer.

Questions the material cannot answer. If the answer is not in the documents, a good system says so. A lazy one invents it. You need to test that case deliberately.

Permission blindness. A naive index holds every document in one pile, including the ones a given person must not see. Access rules belong in the retrieval layer, not in the prompt.

No evaluation. A system with no test set cannot tell you when it gets worse. I keep a set of real questions and check them after any change to the chunking, the search or the prompt.

When a normal search box is enough

If people can already find the document, RAG is decoration. A well organised knowledge base with good titles, sensible folders and links between pages often beats a chatbot, and it never gives a confident wrong answer.

Before building anything, I ask for the real questions. If most are answered by finding the right page, the fix is better internal links, not a language model.

A sensible way to start

Pick one set of questions that people ask repeatedly and that have written answers.

  1. Collect fifty real questions from the team.
  2. Find the documents that answer them.
  3. Build the smallest version: chunk, index, search, answer, cite.
  4. Test against the fifty questions, including the awkward ones.

Keep a human in the loop for anything that reaches a customer.

What I would look at first

If you want a straight read on whether RAG fits your setup, the AI agent development service explains how I build and hand over the parts around the model. I have also written up how the projects on this site were built, and you can ask for a free project review to look at your own documents first. My pricing page sets out how this work is scoped and priced.

If you want the commercial side of it, the AI agents service covers how I build and hand them over.

The AI agents service covers how I build this, and the pricing page explains what decides the cost.

For the commercial side of it, the AI agents service covers how I build and hand over this, and the pricing page explains what decides the cost.


AI agents

All blogs

Common questions

Common questions about RAG

What is RAG in AI?

Retrieval augmented generation. The system searches your own documents for the parts that match the question, puts those passages into the prompt, and asks the model to answer from them. The model gets your business context at the moment it replies, instead of guessing from its general training.

How does RAG work?

Your documents are split into chunks and indexed. A question becomes a search, the closest matching chunks are pulled back, and the model writes an answer using only those chunks. Most good systems also return the source passage so a person can check what was said.

Is RAG better than fine tuning?

They solve different problems. RAG gives the model information you can update today and shows where an answer came from. Fine tuning changes how the model behaves, which is harder to undo and harder to trace. Most business cases need RAG rather than fine tuning.

Do I need RAG for my business documents?

Only if the answers are written down and finding them is the slow part. If a policy exists but takes ten minutes to track down, RAG earns its place. If the task is fixed rules that never change, a normal automation is the better answer.

How accurate is RAG?

It depends on your documents and your questions, not on the marketing. A good build answers most real questions and cites the passage. It still fails in predictable ways: the right document is not found, the document is out of date, or the question is not covered at all.

What is a vector database?

A store that keeps text as a list of numbers, so passages with similar meaning sit close together and can be found by meaning rather than by exact wording. It is the storage layer under most RAG systems, and there are database extensions that do the same job inside Postgres.

Where this fits

An agent that takes a goal, works out the steps, calls your tools and keeps going until the job is done or a person needs to step in.

AI agents

Keep reading

5 min read

What is LLM application development?

Building software on a language model is a different job from calling an API. The parts that matter beyond the prompt and what separates a demo from a product.

Let's build

Let's discuss your workflow

Tell me what your team does by hand every week. I'll tell you honestly whether an agent or automation is the right answer, what it would take, and what it needs to keep running.