Skip to content
Christian Monge

AI Agents

RAG vs Fine Tuning: How to Choose Correctly

RAG vs fine tuning explained by what each one actually fixes: knowledge, behaviour or cost, with the decision table and the order to try things in.

cmChristian Monge4 min read
A white ceramic sphere fed by a frosted glass library shelf, and the same sphere glowing electric blue from within

RAG vs fine tuning is usually framed as a technical choice and it is really a diagnostic one. Before picking either, name the problem: does the model lack knowledge, or does it behave wrong? Retrieval fixes the first. Tuning fixes the second. Choosing the wrong one produces an expensive project that does not move the failure you started with.

I ask clients one question before this conversation goes further: show me five outputs you are unhappy with. The answer is usually visible in them.

RAG vs fine tuning, the actual difference

Retrieval augmented generation finds the relevant pieces of your documents at question time and puts them into the prompt. The model then answers from material it can quote. Nothing about the model changes. Update a document and the next answer reflects it immediately.

Fine tuning continues training the model on your examples, adjusting its weights. It learns patterns of behaviour: your output format, your tone, how to classify things the way you classify them. It does not reliably learn facts, and facts learned this way cannot be corrected without training again.

The compressed version: RAG changes what is in front of the model. Fine tuning changes the model.

Diagnose before you build

SymptomLikely fix
Answers about your products are wrong or outdatedRAG
It cannot cite where an answer came fromRAG
Output format drifts between callsFine tuning, or a stricter schema
Tone is nearly right but never quite yoursFine tuning
It classifies your categories inconsistentlyFine tuning, at volume
It ignores half the instructionsBetter prompt first
It is too slow or too expensiveA smaller model, then fine tuning
It knows the facts but reasons poorly about themNeither. Rethink the task

That last row matters. Neither technique makes a model better at reasoning. If the task is genuinely hard, decompose it into steps rather than hoping training fixes it.

Why RAG is the default for company knowledge

Three reasons, and they are practical rather than theoretical.

Facts change. Prices, policies, documentation, staff. Retrieval reflects an edit the moment it is saved. Retraining does not.

Citations. A retrieval system can show which document an answer came from, which is the difference between a tool people trust and a tool they double-check. In regulated work it is not optional.

Permissions. You can filter retrieval by what the user is allowed to see. Weights have no concept of access control, so a fine tuned model that absorbed confidential material will happily repeat it to anyone.

The cost is real: you pay for retrieved context on every call. Claude API pricing covers how to keep that under control with caching and by retrieving three paragraphs rather than attaching the whole manual.

Where fine tuning genuinely earns its cost

Output format at scale. When every response must be the same structure and prompting gets you to 95%, tuning closes the gap and removes the retry logic.

Voice. A tone that prompts approximate but never nail, across thousands of outputs.

Narrow classification. Your categories, your edge cases, at volume. A small tuned model often beats a large prompted one here, and costs a fraction to run.

Latency and unit cost. If tuning lets you move from a large model to a small one for a high-volume step, the economics can be decisive.

The requirement people underestimate: you need good examples. Hundreds to thousands of them, consistent, representing what you actually want. Assembling that dataset is most of the work and most of the cost, and inconsistent examples produce a model that is confidently inconsistent.

The order to try things in

1. Improve the prompt and the context. A clear instruction, a worked example, an explicit schema. A day of work, and it resolves a surprising share of projects that had already budgeted for training. Prompt engineering examples and few-shot prompting cover the techniques.

2. Add retrieval. If the failure is knowledge, this is your answer. Start with the simplest version that works: chunk documents sensibly, retrieve a handful, include the source.

3. Constrain the output. Ask for JSON against a schema and validate it. This removes most format complaints without touching a model.

4. Fine tune. Only once you have examples of the behaviour you want, at volume, and a measurable gap that the first three did not close.

Most teams stop at step two and should.

Building the RAG version well

The naive version disappoints and people blame the technique. Four things fix most of it.

Chunk by meaning, not by character count. A chunk that cuts a table in half retrieves badly.

Keep metadata. Source, date, section, permission scope. You will need all four.

Retrieve fewer, better. Ten mediocre chunks are worse than three relevant ones, and cost more.

Evaluate retrieval separately from generation. When an answer is wrong, you need to know whether the right document was found and ignored, or never found at all. Those are different bugs with different fixes.

Context engineering covers the wider discipline of deciding what goes into the window.

The short version

Diagnose first: knowledge or behaviour. Use retrieval for facts, because they change and need citing. Use tuning for format, voice and narrow classification at volume, once you have the examples. Try a better prompt before either, and expect to use both eventually.

If you want this designed around your documents and your team trained to maintain it, that is what my AI training packages cover, and the AI automation agency page is where I do this work for clients.

Frequently asked questions

What is the difference between RAG and fine tuning?

RAG retrieves relevant documents at question time and puts them in the prompt, so the model answers from current sources it can cite. Fine tuning adjusts the model's weights on your examples, changing how it responds rather than what it knows. Knowledge problems want RAG; behaviour problems want fine tuning.

Which is cheaper?

RAG is cheaper to start and has an ongoing cost per query, because you pay for the retrieved context on every call. Fine tuning has a real upfront cost and then cheaper inference, especially if it lets you use a smaller model. At high volume with stable behaviour, fine tuning can win on total cost.

Can I use both?

Yes, and mature systems often do. Fine tune a small model to follow your output format and tone reliably, then use RAG to feed it current facts. The split is clean: the tuning handles how it speaks, the retrieval handles what is true today.

When should I not do either?

When a better prompt would fix it, which is more often than people expect. If the model has the knowledge and simply is not using it well, or the instructions are ambiguous, spend a day on the prompt and the context first. It is the cheapest experiment available.

Sources

  1. 01Anthropic: prompt caching
  2. 02OpenAI: fine-tuning guide
  3. 03Model Context Protocol
cm

Christian Monge

Builds AI second brains with Obsidian and Claude Code, co-founded the competitive-intelligence SaaS Pengu Insights, and trains teams in English and Spanish from Madrid.

More about me

Team Training

Bring this to your team.

Hands-on Claude training in English or Spanish, built around the tasks your people repeat every week.

Plan a team workshop

Keep reading