← Edge Notes
AI-Native10 min read
Essay · ai-native

The RAG architecture explained for non-engineers

Retrieval-Augmented Generation is the architecture behind most serious enterprise AI deployments. Your engineers understand it. You probably do not. That gap is costing you good decisions — and occasionally, a lot of money spent on the wrong thing.

What the model actually knows — and what it does not.

A large language model is trained on a massive corpus of text: books, articles, websites, code, and more. During training, the model learns patterns, relationships, and a compressed representation of the knowledge in that corpus. When you ask it a question, it draws on that compressed knowledge to generate an answer.

This works remarkably well for general knowledge — history, science, writing conventions, common reasoning patterns. It fails reliably for anything that is specific to your business: your current pricing, your internal policies, the contents of contracts you signed last quarter, the support cases your team handled last week. None of that was in the training data. The model does not know it. When asked, it will either say it does not know (good) or confabulate something that sounds plausible (bad). Both happen.

The other limitation is time. Training data has a cutoff. A model does not know what happened after its training data was collected. It does not know about your product update from last month. It does not know your pricing changed six weeks ago. For business applications, this staleness problem is not a minor inconvenience — it is a fundamental constraint on what the model can reliably answer without additional information.

RAG is the architecture that addresses both of these problems. It gives the model access to current, specific, proprietary information at the moment of answering — without retraining the model.

The mechanic, in plain language.

Imagine a research assistant who has read everything ever published on a topic, but who cannot access the specific documents on your desk. RAG solves this by giving the assistant a filing cabinet of your documents and teaching them to look something up before they answer.

Here is what happens in a RAG system when a user asks a question. First, the question is converted into a mathematical representation called an embedding — a set of numbers that captures the semantic meaning of the query. Second, that embedding is used to search a vector database containing embeddings of all your documents. The search returns the most semantically similar passages, regardless of whether they share exact keywords with the query. Third, those retrieved passages are inserted into the prompt alongside the original question. The model now has the question plus the relevant source material. Fourth, the model generates an answer grounded in that retrieved context.

The result is an answer that is specific to your documents, current as of the last time you updated your knowledge base, and — if the system is built correctly — citable back to the source passage it used. This last property is important: unlike a model answering from training knowledge alone, a RAG system can tell you which document it drew from, which makes errors traceable and trust possible.

The engineering complexity here is real, but the conceptual model is not. You are building a smarter search system that hands its results to a language model instead of displaying them directly. The language model's job is to synthesise those search results into a coherent, natural-language answer.

RAG versus fine-tuning: the decision most teams get wrong.

When founders and operators learn about the limitations of base models, the instinctive response is often to fine-tune. "If the model does not know our products, we will train it on our products." This reasoning is understandable and usually wrong.

Fine-tuning modifies the model's internal parameters by exposing it to new training examples. It is the right tool when you want to change how the model behaves — its tone, its output format, its reasoning style on a narrow class of problems. It is the wrong tool when you want the model to know specific facts.

Facts encoded through fine-tuning are static. Once you fine-tune a model on your current pricing and that pricing changes, the model is wrong until you fine-tune it again. Each fine-tuning run costs money, takes days to complete, and requires evaluation to confirm the new behaviour has not degraded the old behaviour. For a business with pricing that updates quarterly, this is manageable. For a business with a dynamic knowledge base — a support team, a legal department, a product that ships weekly — it is operationally untenable.

RAG, by contrast, is a live connection. Update your documents, rebuild the search index, and the model's answers reflect the new information immediately. No retraining. No evaluation cycle. No deployment. This is why RAG is the dominant architecture for enterprise knowledge applications: customer support, internal search, document Q&A, compliance assistants, sales enablement. In all of these cases, the knowledge changes. RAG keeps the model current without the cost and latency of retraining.

There is a genuine case for fine-tuning, which is covered in a separate essay on when to fine-tune. But if your team is reaching for fine-tuning because the model does not know your business, try RAG first. It is faster, cheaper to maintain, and more debuggable when something goes wrong.

The model's training knowledge is the ocean. Your documents are the fishing net. RAG is the act of casting the net before you cook the meal.

What actually fails in the retrieval layer.

RAG systems fail in production more often than most teams expect, and the failures are usually in the retrieval layer, not the generation layer. When a RAG system gives a wrong answer, the instinct is to blame the language model. More often, the language model did exactly what it was supposed to do — it just received the wrong context to work from.

The most common retrieval failure is chunking. Documents in a RAG system are split into chunks before being indexed — because the model cannot process an entire 200-page policy document at once, and because semantic search works better on focused passages than on sprawling documents. The chunking strategy determines which passages the retrieval layer surfaces. Chunk too small and you surface fragments that lack enough context to be useful. Chunk too large and you surface passages that contain the relevant section but bury it in surrounding noise, diluting its weight in the model's attention.

The second failure is query-document language mismatch. A customer might ask "what is your cancellation policy" while your policy document uses the phrase "subscription termination terms." Simple keyword search would fail to connect these. Semantic search handles this better — that is the whole point of embedding-based retrieval — but semantic search has its own failure modes when domain vocabulary is unusual, when documents use technical jargon that the embedding model has not seen frequently, or when the query is ambiguous enough that multiple document types are equally plausible matches.

The third failure is stale index content. A RAG system is only as current as its last index update. If your policy changed last week but the index has not been rebuilt, the model will retrieve the old policy and answer from it. This failure is invisible in the generated output — the model produces a confident, well-written answer based on outdated content. You need monitoring that tracks document freshness and alerts when source content changes without a corresponding index update.

The fourth failure is retrieval confidence without retrieval accuracy. Most retrieval systems return results with a similarity score indicating how closely the retrieved passage matches the query. A high similarity score means the retrieved passage is semantically close to the query — it does not mean the passage answers the query. These are different things. "Our refund policy does not apply to promotional items" has high semantic similarity to "what is your refund policy" but answers a narrower version of the question. Without re-ranking and validation layers, the system will feed this incomplete context to the model and get an incomplete answer.

When RAG is the right architecture — and when it is not.

RAG is the right architecture when your use case requires current, specific, traceable knowledge. Customer support bots. Internal search tools. Compliance and regulatory assistants. Sales enablement where the product catalogue changes. Legal document Q&A where every answer needs a citation. In all of these cases, the knowledge is your competitive asset, it changes, and users need to trust it.

RAG starts to struggle when the knowledge base is extremely large and heterogeneous — thousands of documents in dozens of formats with inconsistent language — and when the queries are ambiguous enough that the right retrieval result depends on understanding the user's intent at a level the retrieval layer cannot access. In these cases, you need more sophisticated architectures: hybrid retrieval combining semantic and keyword search, query rewriting to clarify intent before retrieval, or agentic systems that can iteratively search and refine.

RAG is not the right architecture when the problem is not a knowledge problem. If users are getting wrong answers because the model's reasoning is flawed, not because it lacks the right information, adding more documents will not fix it. If the problem is output format — the model writes too formally, uses the wrong template, produces responses in the wrong structure — better prompting or fine-tuning is the right tool, not RAG.

The diagnostic question is always: does this answer fail because the model did not have the right information, or because it could not use the information it had? RAG addresses the first category. Everything else addresses the second.

Frequently asked questions.

What is RAG in plain English?

RAG stands for Retrieval-Augmented Generation. It is a way of connecting a language model to a collection of your own documents so it can look up relevant information before writing its answer. Instead of relying only on what it learned during training, the model searches your knowledge base first, pulls in the relevant passages, and uses those as the basis for its response. This makes the model's answers specific to your business and keeps them current when your documents are updated.

How is RAG different from fine-tuning?

Fine-tuning changes the model's internal weights by training it on new examples — it is expensive, slow, and the result is static until you retrain. RAG leaves the base model untouched and instead gives it access to a searchable collection of documents at query time. RAG is better when your knowledge changes frequently or when you need to trace every answer back to a source document. Fine-tuning is better when you need the model to adopt a consistent tone or style that cannot be achieved through instructions alone.

What goes wrong in the retrieval layer?

The most common failure is retrieving the wrong chunks — documents that are topically related but do not actually answer the question asked. This happens when documents are chunked too aggressively, when the search index has not been updated after content changes, or when the query phrasing does not match the language used in the source documents. The model then produces a confident-sounding answer based on the wrong source material. This is harder to detect than a hallucination because the answer looks grounded.

Do I need a vector database to implement RAG?

For most business applications under a few thousand documents, a managed vector search service such as Pinecone, Weaviate Cloud, or the built-in vector capabilities in Supabase or PostgreSQL is sufficient. You do not need to run your own vector database infrastructure. The complexity of your retrieval architecture should match the scale of your knowledge base — over-engineering the retrieval layer before you understand your query patterns is a common and expensive mistake.

Working on this?

If this is the problem on your desk, a 30-minute intro is the fastest way to find out whether I can help.

Request an intro →