“AI with your own data” usually means RAG
The moment a company wants an AI that knows its own manuals, contracts or tickets, the word RAG comes up: retrieval-augmented generation. It is on every AI conference slide and in every sales pitch about “a chatbot on your documents”. Like AI agents, it sounds big, while the technique behind it is easy to follow.
The reason is a familiar problem. An LLM knows an enormous amount about the world in general and nothing at all about your business. Ask ChatGPT about your own price list, your delivery terms or the status of order 4815 and it can do two things: say it doesn’t know, or invent a plausible answer. Neither is something you can show a customer.
An LLM has read half the world and never seen your intranet. RAG is the simplest way to fix that: let it pick up the source before it answers.
RAG solves this without touching the model. You train nothing again. At the moment of the question you hand the model the right pieces from your data and let it answer from those.
Retrieval, augmented, generation: three steps
The name is literally the explanation. RAG does three things in a row.
Retrieval (looking up)
When a question comes in, the system first searches your sources for the pieces of text that matter most: the few passages that contain the answer, rather than the whole archive.
Augmented (adding)
It pastes those retrieved pieces next to the question in the prompt. The model gets the question and the relevant source served together in one go.
Generation (writing)
The LLM writes the answer from the source you handed it, rather than from its own memory. The material is sitting right there, and the model phrases it cleanly.
The comparison that makes it click: an open-book exam. Without RAG you have the model take the exam from memory and hope it still knows the material. With RAG you put exactly the right page in front of it and ask it to pull the answer from there. The model doesn’t get smarter. It gets the right material at the right moment.
Without RAG you ask the model to do it from memory. With RAG you slide the right page under its nose. Same AI, an entirely different level of trust.
How retrieval works: embeddings and the vector store
The magic is in step one. How does a system find, in thousands of pages, the three passages that match a question? A plain keyword search falls short, because the customer rarely types the exact words that appear in your document. So RAG searches on meaning, and that runs on embeddings.
An embedding is a piece of text translated into a row of numbers that captures its meaning. Texts about the same thing get numbers that sit close together, even when they share no words at all. “How do I cancel my subscription” and “terminate contract” end up next to each other without a single shared keyword. You store those rows of numbers in a vector database, built to quickly find what lies closest together.
Chunking
Your documents get split into bite-sized chunks, a few paragraphs each. Too coarse and you retrieve noise, too fine and the context falls away. This chunking shapes more of the quality than people expect.
Turning into embeddings
Each chunk goes through an embedding model and becomes a row of numbers that captures its meaning. Done once up front, and again whenever a document changes.
Storing in a vector store
All the number rows go into a vector database. It is built to find, at lightning speed, the chunks that lie closest to a question.
Searching at question time
The customer's question becomes a row of numbers the same way. The system grabs the few chunks closest to it and hands those to the model.
The first three steps you do up front, once, and you refresh them when your data changes. The fourth happens live on every question. That is the whole mechanism. No consciousness, no model that “learns your business”, just smart search on meaning with an LLM behind it that phrases the retrieved text cleanly.
RAG or fine-tuning the model?
This is the question that goes wrong most often. If you want an AI to know your data, “train the model on it” feels like the logical route. For almost every case that is the wrong tool. Fine-tuning and RAG solve different problems.
RAG gives the model knowledge
Do you want the AI to know your facts, documents and current figures? That is RAG. You add or replace a document and the answer is right immediately, without retraining anything.
Fine-tuning changes behaviour
Do you want the AI to hold a fixed tone, structure or language, or learn a very specific kind of task? That is fine-tuning. You shift the way the model answers; the facts it has at hand stay the same.
The difference is fresh versus fixed. RAG fetches the source at the moment itself, so keeping data current is a matter of updating the document. A fine-tuned model has the material baked in at training time and falls behind the moment your prices or terms change. For “the AI has to know our knowledge”, RAG is therefore almost always the starting point, and fine-tuning something you might layer on top only later.
Fine-tuning teaches the model a craft. RAG hands it the right folder. Most companies think they need the first and are actually looking for the second.
Where RAG goes wrong: retrieval is everything
RAG sounds simple and you build a demo in an afternoon. The gap between that demo and a system your customers rely on sits entirely in the retrieval. If step one pulls the wrong chunks, the model writes a fluent, convincing and wrong answer. The model is only as good as what you feed it.
Bad chunking
Chunks that cut a table or a sentence in half deliver context that is only half right. Half of the RAG problems in practice are really a chunking problem.
Stale index
The vector store lags behind your real documents. The model confidently retrieves last year's policy. Keeping it current is an ongoing job, not a one-off import.
Too much or too little retrieved
Too few chunks and the answer misses context. Too many and the real passage drowns in noise, so the model goes astray anyway.
No way to measure quality
Without a fixed set of test questions you can't tell whether a change made the answers better or worse. Measuring belongs to RAG, otherwise you steer blind.
That is why a proper source citation matters so much: a serious RAG system shows which document an answer came from, so a human can check it. That is exactly the difference with a bare LLM that guesses convincingly. The engineering sits in making the retrieval reliable and keeping it that way, and that is where we do the real work for clients.
A demo convinces anyone. The real question is whether your system still retrieves the right source a year later, while your documents change every week.
RAG, knowledge graphs and agents
RAG rarely stands alone. It is a building block in the larger AI landscape we wrote about before.
Classic RAG searches a vector store for separate text fragments that resemble the question. That works fine as long as the answer sits in one passage. When it is spread across multiple, connected facts, that approach stalls and you arrive at GraphRAG and knowledge graphs: there the system follows the relationships between facts instead of separate snippets of text. In practice you combine them: vector search to quickly find an entry point, the graph to expand the connections from there.
And in an agentic workflow, RAG is simply one of the tools an AI agent can call. Where one tool sends an email and another creates a ticket, the RAG tool answers the question “what do our own documents say about this?” The agent fetches the fact the moment it needs it, uses it in its next step and keeps its answers grounded that way.
When RAG is worth it
RAG pays off the moment the right answer sits in your text and the model just needs to reach it. The rule of thumb is about where the knowledge lives.
Choose RAG
You have a lot of your own text that matters: manuals, policies, contracts, a knowledge base, support tickets. And you want the AI to answer from it, with a source attached, even when those documents change tomorrow.
RAG is overkill
The answer already sits in general knowledge the model has anyway, or your question needs no source document at all. Then a retrieval step only adds complexity.
Start as simple as possible here too. A good chunking strategy and a clean source citation take you further than the newest vector database. Every layer you add is also one you have to build, measure and maintain.
Conclusion: let the model look it up instead of guessing
RAG becomes clear once you see it as an open-book exam for an AI. You look up the relevant pieces from your data, hand them to the model and let it answer from those. The model doesn’t get smarter. It gets the right material at the right moment.
Retrieve, augment, generate
Look up the relevant chunks from your sources, paste them next to the question and let the model answer from them. Three steps, no magic.
Your data without retraining
The model stays untouched. You update a document and the answer is right immediately, with a source you can check.
The win is in the retrieval
Chunking, refreshing and measuring make the difference between a nice demo and a system your customers can rely on.
Start small, get the retrieval right and give your AI a source to draw from. Then it stops guessing convincingly and starts looking things up.
What is RAG?
How does RAG work technically?
What is the difference between RAG and fine-tuning?
Why does an LLM hallucinate less with RAG?
What is the difference between RAG and GraphRAG?
When do I need RAG?
An AI that knows your own documents?
We build the layer underneath a reliable RAG system: the chunking, the embeddings, the source citation and the measurement that keep retrieval sharp as your data changes. From first setup to ongoing management.