AI & Engineering

Your LLM knows a lot. It just doesn't know your stuff.

31 August 2026·5 min read

Your LLM knows a lot. It just doesn't know your stuff.

Why Retrieval-Augmented Generation exists, why retraining isn't the answer, and what's really happening under the hood when an LLM "reads" your documents.

Ask an LLM to explain quantum entanglement or write a Python script, and it's excellent. Ask it a specific question about your own documents, your company wiki, your research folder, last quarter's contracts, and it goes quiet.

Not because it's unintelligent. Because it's never seen your documents. They didn't exist when it was trained, or they were never public, or they simply weren't part of what it learned from.

The instinct is: let's just train it on our data. Reasonable, and usually wrong.

Why not just retrain the model?

Training reshapes an LLM's internal parameters and produces a static snapshot. Once training ends, that snapshot stops changing. Meanwhile, real knowledge bases never stop moving:

  • A new document gets added today
  • Twenty more next week
  • An old one turns out to be outdated and gets replaced

Retraining the whole model every time any of that happens is:

  • Slow, not a quick update
  • Expensive, real compute cost each time
  • Never quite current, outdated the moment something new is added

Here's the actual insight: you don't want the model to memorize your library. You want it to use the right part of it, on demand. If someone handed you 500 books and one question, you wouldn't memorize all 500, you'd search, read the relevant section, and answer from that.

That's Retrieval-Augmented Generation.

RAG architecture, in one sentence

Instead of changing the model every time your information changes, give the model the relevant information at the moment you ask.

Normal LLM:

Question → LLM → Answer

RAG:

Question → Find relevant info → Give it to the LLM → Answer

That one extra step, retrieval, is the whole trick. RAG architecture breaks down into two distinct processes: indexing (getting your documents ready) and retrieval (using them to answer a question).

RAG architecture diagram showing indexing and retrieval phases

Phase 1: Indexing, preparing the library

Raw documents aren't structured for search. Before anyone asks a single question, three things happen to them:

  • Chunking, break large documents into smaller, meaningful pieces (an intro here, a methodology section there). Small enough to retrieve precisely, large enough to still make sense alone.
  • Embedding, convert each chunk into a numerical representation of its meaning, not just its words. This is what lets two differently-worded questions with the same meaning end up close together in the system.
  • Storage, save every embedding in a vector database built for fast similarity search across millions of these fingerprints.
Documents → Chunking → Embeddings → Vector Database

At this point, the library isn't just stored, it's searchable by meaning.

Phase 2: Retrieval, the moment someone asks a question

  1. The question itself gets embedded, same process as the document chunks
  2. The system compares that embedding against everything in the vector database
  3. It pulls out the closest matches, maybe a paragraph criticizing a theory, a passage on experimental results, a section proposing an alternative
  4. Those fragments, not the whole library, just the relevant slice, become context for the LLM
Question → Retrieval → Relevant Chunks → LLM + Context → Answer

The model hasn't been retrained. Its parameters haven't moved. It's simply been handed exactly what it needs, exactly when it needs it.

The idea worth remembering

An LLM isn't a database of facts sitting in rows. What it actually has is learned patterns of reasoning and language from training, not a live, editable store of information.

RAG works with that reality instead of against it. The knowledge lives outside the model, in a system you control:

  • New document, index it
  • Updated document, re-index it
  • Outdated document, remove it

None of that touches the model. RAG decouples what the model knows from what it can access, so you can update the second one constantly without ever touching the first.

"Isn't this just search with extra steps?"

Half true. Retrieval genuinely is search. But plain search stops at finding documents, it doesn't reason about them.

  • Plain search for "compare these three authors' explanations" gives you three documents, you do the reading and comparing yourself
  • RAG retrieves the relevant passages from all three and has the LLM compare, contrast, and explain the disagreement in plain language

So the value is the combination:

  • Retrieval finds the right information
  • The LLM reasons over it

Neither does much alone.

Where the real engineering begins

The four-box diagram makes RAG look simple. In practice, every box hides a real problem:

  • What if the answer needs information spread across five documents, not one?
  • How many chunks should you retrieve, too few misses context, too many drowns the model in noise
  • Vector search alone, or combined with keyword search for exact names, codes, and figures that embeddings tend to blur?
  • Should results get re-ranked before reaching the model?
  • The big one: how do you know the information you retrieved was actually the right information?

That last question is where RAG stops being a diagram and becomes a real engineering problem, and where the interesting design decisions (chunking strategy, hybrid search, re-ranking, evaluation) start to matter more than the diagram ever suggested.

Summary

  • LLMs don't automatically know your private or recent documents, they only know what they were trained on
  • Retraining every time your data changes is slow, expensive, and always a step behind
  • RAG solves this by keeping the model unchanged and instead retrieving relevant information at question time
  • Phase 1, Indexing: documents get chunked, embedded, and stored in a vector database, ahead of any question
  • Phase 2, Retrieval: a question gets embedded, matched against that database, and the most relevant chunks are handed to the LLM as context
  • RAG is more than search, search finds documents, RAG's LLM half actually reasons over them and produces an answer
  • The remaining hard part isn't the architecture diagram, it's making sure retrieval consistently surfaces the right context, which is where chunking strategy, hybrid search, re-ranking, and evaluation come in