Skip to main content
Pillar 11 · Capability Doctrine

LLMs and Retrieval-Augmented Generation

A large language model (LLM) is a system trained to predict the next word in a sequence, which makes it fluent, general, and, crucially, confidently wrong when it lacks the facts. It does not look anything up; it generates plausible text from patterns, which is why it hallucinates. Retrieval-augmented generation (RAG) fixes this by retrieving relevant documents from your own data at query time and feeding them to the model as grounding, so the answer is based on your verified sources rather than the model's fuzzy memory. Well-implemented RAG cuts hallucinations by 70–90% and reaches 95–99% accuracy on domain questions (RAG systems research, 2025). Understanding the difference between the model and the grounding around it is the difference between a demo that impresses and a system you can trust in production.

70–90%reduction in hallucinations when a well-implemented RAG system grounds the model in verified source data instead of its training memory, RAG systems research, 2025
The short version
  • 01LLMs are probabilistic next-token predictors, they generate plausible text, not verified facts, which is why they confabulate when they lack grounding.
  • 02RAG retrieves relevant documents from your data at query time and feeds them to the model, cutting hallucinations 70–90% and reaching 95–99% domain accuracy (RAG research, 2025).
  • 03The number-one RAG failure is retrieval, not generation: if the system fetches the wrong chunk, even a perfect model answers wrongly.
  • 04RAG usually beats fine-tuning for knowledge that changes, because you update a document store instead of retraining a model, and the RAG market is growing at roughly 38% a year.
  • 05Roughly 70% of RAG systems lack systematic evaluation, so most teams cannot tell whether retrieval is actually working (RAG research, 2025).

How LLMs actually work

An LLM predicts the most likely next token given everything before it. It has no built-in notion of truth or lookup, it produces fluent text from statistical patterns, which is exactly why it can be eloquently and confidently wrong.

The mental model that gets teams in trouble is treating an LLM like a database that returns facts. It is not. It is a pattern engine that generates the next most-probable word, over and over, until it has produced an answer that reads well. When the training data contained the answer, it usually gets it right. When it did not, it does not say "I do not know", it generates something plausible. That behavior, confabulation, is a feature of how the model works, not a bug you can prompt away.

The operator's reframe

Do not ask "is the model smart enough?" Ask "does the model have access to the right facts at the moment it answers?" Most production failures are grounding failures, not intelligence failures.

What RAG adds

RAG retrieves relevant passages from your own data at query time and puts them in front of the model, so it answers from verified sources instead of memory. That grounding is what turns a fluent guesser into a reliable domain assistant.

A RAG pipeline has two halves: retrieval (find the right documents for this question) and generation (have the model answer using them). The generation half is largely solved by modern models; the retrieval half is where systems succeed or fail. When retrieval surfaces the right passages, accuracy on domain questions reaches 95–99% and hallucinations drop 70–90%. When it surfaces the wrong ones, the model faithfully answers from bad context. That is why retrieval quality, not model choice, is the dominant variable.

95–99%
accuracy on domain questions with well-implemented RAG
RAG research, 2025
#1
cause of RAG failure is retrieval (wrong chunks), not generation
RAG research, 2025
~70%
of RAG systems lack systematic evaluation of retrieval quality
RAG research, 2025

RAG vs fine-tuning

Use RAG for knowledge that changes and must be current; use fine-tuning to teach the model a style, format, or narrow skill. They solve different problems and are often combined, RAG supplies the facts, fine-tuning shapes the behavior.

Fine-tuning bakes patterns into the model by continued training; it is powerful for teaching tone, structure, or a specialized task, but it does not reliably inject fresh facts and must be redone when the knowledge changes. RAG injects facts at query time, so updating knowledge is as simple as updating a document store, no retraining. For most enterprise knowledge problems, where the answer must reflect this week's policy or price, RAG is the right default, which is part of why the RAG market is growing at roughly 38% annually.

  • RAG, best for current, changing, or proprietary knowledge; update the data, not the model.
  • Fine-tuning, best for teaching a consistent style, format, or narrow task the base model does poorly.
  • Hybrid, fine-tune for behavior, RAG for facts; the most capable enterprise systems use both.

Making RAG safe for the enterprise

Enterprise RAG must respect who is allowed to see what: retrieval has to enforce document-level access control, or the model will happily surface a restricted document to an unauthorized user. Security lives in the retrieval layer, not the prompt.

The moment RAG points at real company data, permissions become the hard problem. If the retriever can fetch any document, a well-phrased question can pull confidential information to a user who should never see it, and no prompt instruction reliably prevents this. The fix is role- or attribute-based access control at the retrieval layer, so a user only ever retrieves documents they are entitled to. Architectures have matured accordingly, from naive RAG to modular, GraphRAG, and agentic RAG, with the best-tuned agentic systems reaching 92–99% retrieval precision.

Permissions are a retrieval problem

You cannot instruct your way to security. If the retriever can reach a document, assume the model can surface it. Enforce access control where retrieval happens, and the confidentiality problem largely disappears.

RAG vs fine-tuning for enterprise knowledge

DimensionRAGFine-tuning
Best forCurrent, changing, proprietary factsStyle, format, narrow skills
Updating knowledgeUpdate the document storeRetrain the model
Hallucination controlStrong, grounds answers in sourcesWeak, does not add lookup
Cost to keep currentLow, no retrainingHigh, recurring training runs
RAG vs fine-tuning for enterprise knowledge
Questions

Frequently asked questions.

Why do LLMs hallucinate?

Because they predict plausible text rather than retrieving facts. When the model lacks the information, it generates a confident-sounding answer instead of admitting uncertainty. Grounding it with RAG is the most reliable fix.

Does RAG eliminate hallucinations completely?

No, but it reduces them 70–90% when implemented well. Residual errors usually come from retrieval fetching the wrong passage, which is why evaluating retrieval quality matters more than swapping models.

Should I use RAG or fine-tuning?

Use RAG for knowledge that changes or is proprietary, and fine-tuning to shape style or a narrow skill. Many production systems use both, fine-tuning for behavior, RAG for facts.

Is RAG secure for confidential data?

Only if the retrieval layer enforces document-level access control. Without it, the model can surface restricted documents to unauthorized users. Security belongs in retrieval, not in prompt instructions.

From principle to installed system.

We turn the ideas on this page into owned, working infrastructure inside your business. It starts with a diagnostic of where your operation leaks time and money.