RAG vs Fine-Tuning: Knowledge or Behaviour
The question is nearly always asked as a choice between two techniques, and nearly always the answer is that they address different failures. Getting the diagnosis right first makes the choice trivial.
- The model does not know something. A fact, a document, a policy, today’s price. That is a knowledge problem.
- The model knows, but responds wrongly. Wrong format, wrong register, too verbose, refuses when it shouldn’t. That is a behaviour problem.
Retrieval fixes knowledge. Fine-tuning fixes behaviour. Most of the expensive mistakes come from using the second on the first.
What retrieval actually does
Nothing is changed about the model. At request time you search a corpus, take the most relevant passages, and put them in the prompt with the question. The model reads them like any other input.
[system rules]
[retrieved: policy-v4.md §3, refunds-eu.md §1]
[user] Can a customer in Germany return this after 20 days?
That indirection buys four things fine-tuning cannot:
- Citations. You know which documents went in, so the answer can link them and a reader can check.
- Freshness. Update the document, and the next request uses it. No training.
- Permissions. Retrieval runs as the asking user, so it can filter to what they may see. Weights have no notion of who is asking.
- Removal. Delete a document and it is gone. Removing a fact from weights means retraining.
That third point deserves emphasis: a model fine-tuned on all your customer data will happily recite one customer’s details to another, and there is no configuration that prevents it. Access control has to live in the retrieval step or it does not exist.
What fine-tuning actually does
You continue training on input/output pairs, adjusting weights (or a low-rank adapter over them). The model does not gain a lookup table; it shifts its distribution toward the behaviour your examples demonstrate.
That is genuinely valuable when the target is a behaviour:
- Rigid output structure, especially where prompt instructions keep drifting across long conversations.
- Voice and register that would take a thousand tokens of instruction to describe and still be applied inconsistently.
- Narrow classification or extraction, where a fine-tuned small model beats a large prompted one and costs a fraction as much.
- Cost and latency reduction — moving a solved task from a large model to a small fine-tuned one is often the cheapest big win available.
The requirement is examples. Hundreds at minimum, and their quality sets your ceiling: a fine-tune reproduces the inconsistencies in its training data faithfully.
The comparison
| Retrieval | Fine-tuning | |
|---|---|---|
| Changes | the prompt | the weights |
| Good for | facts, documents, anything current | format, tone, narrow tasks |
| Update cost | edit a document | another training run |
| Citations | yes | no |
| Per-user permissions | yes | no |
| Setup cost | index + retrieval quality work | labelled examples + training |
| Per-request cost | more input tokens | fewer tokens, cheaper model |
| Latency | + retrieval, + longer prompt | often lower |
| Fails by | retrieving the wrong passage | confidently generalising wrong |
Try prompting properly first
Before either: a large fraction of “we need to fine-tune” turns out to be an under-specified prompt. Few-shot examples in the prompt get you a surprising amount of what a fine-tune would, with no training run and no version to maintain. It is also the only option that takes an afternoon.
The honest escalation order is prompt → retrieval → fine-tune, and you should be able to say what specifically failed at each step before moving on.
When your RAG is bad, it is usually retrieval
Teams conclude “RAG doesn’t work for us” and reach for fine-tuning, when the generation step was never the problem. Check the retrieval in isolation: for a set of real questions, did the passage containing the answer come back at all?
If it did not, no model can save the answer, and fine-tuning is irrelevant. Usual culprits are chunking that splits an answer across boundaries, pure vector search on queries containing exact identifiers that keyword search would nail, and no reranking of the top candidates. Fix those and the same model gets dramatically better — which is why retrieval deserves its own eval set, separate from the end-to-end one.
What you have actually chosen
Not a technique. You have chosen where your truth lives.
Retrieval keeps it in documents you can edit, cite, permission and delete — outside the model, where it can be governed. Fine-tuning moves behaviour inside the weights, where it is fast and consistent and no longer inspectable.
Put facts outside. Put manners inside. Most systems that work well do both, and almost none of them needed to fine-tune to answer a question about a document.
Quick answers
- What is the difference between RAG and fine-tuning?
- RAG retrieves relevant documents at request time and puts them in the prompt, so the model reasons over facts it is shown. Fine-tuning continues training on examples so the model's weights change, altering how it responds rather than what it knows about your data.
- Should I fine-tune a model on my company documents?
- Usually not. Facts baked into weights cannot be cited, updated without retraining, or access-controlled per user, and the model will still confidently answer about documents it half-remembers. Retrieval handles changing, citable, permissioned knowledge far better.
- When is fine-tuning actually worth it?
- When you need consistent behaviour rather than new facts: a rigid output format, a specific tone, a classification task with many examples, or matching a narrow domain style. It is also how you make a smaller, cheaper model match a larger one on a narrow task.
- Can you use RAG and fine-tuning together?
- Yes, and it is often the right answer. Fine-tune for how to respond — format, style, refusals — and retrieve for what is true right now. They operate on different parts of the problem and do not conflict.
References
Related Discoveries
Lumi's weekly note
A short email when we publish something useful. No spam, unsubscribe anytime.