Skip to content

When RAG, When Fine-Tune, When Neither ​

Tell apart the two problems people confuse, missing facts and the wrong style, and pick the cheapest fix for the one you have.

In this chapter: facts versus form · the four options ranked by cost · what fine-tuning actually buys · why "neither" wins more often than expected · the hybrid case

💡 The Core Idea ​

Almost every "should we fine-tune?" conversation is really two questions mixed into one.

Retrieval supplies facts. Fine-tuning shapes behaviour. A model that does not know your refund policy has a knowledge problem, and no amount of training on your tone fixes it. A model that answers correctly but in six rambling paragraphs has a form problem, and stuffing more documents into the window does not fix that either.

Get that split right and the decision usually makes itself. Get it wrong and you spend a month fine-tuning a model that will still not know what changed in the policy last Tuesday.

If the answer changes when the data changes, retrieve it. If the answer changes when your taste changes, train it. Far more often, just prompt it.

How It Works ​

Four options, cheapest first ​

OptionSolvesCost to buildCost to change
Prompt onlyForm, simple behaviour, small fixed knowledgeHoursEdit a string
Prompt + context in the windowFacts, when the corpus is smallHoursChange the file
Retrieval (RAG)Facts, when the corpus is large or changesWeeksRe-index
Fine-tuningForm, format, domain register, latency and cost at scaleWeeks, plus dataRetrain

Work down that list and stop at the first row that solves the problem. Most teams start three rows too low, because retrieval is more interesting to build than a prompt is to write.

The decision ​

Two questions decide almost every case. The branch most teams skip is the one on the right.

The window that ate the small corpus ​

A corpus of a few hundred pages fits in a large context window. If your whole knowledge base is a handbook, a set of API docs and a changelog, there may be no retrieval system to build. Put the documents in the prompt, cache that fixed opening part (the prefix), and answer.

That is a real architecture, not a shortcut. It has properties retrieval does not. No retriever can miss the right passage, there is no index to keep fresh, and prompt caching keeps the repeated cost small. It stops working in three cases: the corpus outgrows the window, per-request cost matters more than build cost, or irrelevant material starts to hurt accuracy. See Context Engineering for why more context is not better.

What fine-tuning actually buys ​

It is worth being precise, because the popular expectation is wrong.

✅ Fine-tuning is good at❌ Fine-tuning is bad at
A consistent output formatTeaching new facts reliably
A domain register or house styleFacts that change
Following a complex instruction set without a long promptBeing auditable — you cannot cite a weight
Making a small model behave like a larger one on one narrow taskAnything you need to update this week

That last row is the underrated one. Fine-tune a small model on a frontier (top-tier) model's outputs for one narrow task, and it can keep quality while cutting cost and latency several times over. That is a cost move with a real payback, and a far better reason to fine-tune than "teaching it our domain".

⚠️ Fine-tuning on facts produces confident, unattributable, stale answers. The model cannot tell you where it learned something and cannot be corrected without another training run.

The costs nobody budgets for ​

Retrieval is not cheap either. An honest comparison includes the parts that are not the model.

Retrieval bringsFine-tuning brings
An ingestion pipeline to keep runningA labelled dataset, curated
An index to keep fresh, and re-index on schema changeA training and evaluation run per iteration
A retrieval eval suite, or you are guessingAn eval suite anyway
Higher per-request tokens, foreverA model version to host and track
Permission filtering, if documents are not publicNothing about permissions — it is baked in, which is worse

That last line is a real constraint. If different users may see different documents, retrieval can filter per user. A fine-tuned model cannot unlearn what it was trained on.

When to Use It ​

SituationChooseBecause
Answers must cite a sourceRetrievalWeights have no citations
Facts change weeklyRetrievalRe-index, do not retrain
Corpus is a few hundred pages, staticWhole corpus in the windowNo pipeline to run
Output format is inconsistent at volumePrompt examples, then fine-tuneCheapest first
Per-request cost dominates on one narrow taskFine-tune a small modelReal payback, measurable
Different users see different documentsRetrieval, filteredTraining cannot enforce permissions
Answers are wrong but the facts were presentNeitherIt is a prompt or eval problem

Common Mistakes ​

❌ Fine-tuning to teach the model your product

It produces a system you cannot audit or update, and it is confidently wrong. Facts belong in a store.

❌ Building retrieval when the whole corpus fits in the window

An ingestion pipeline, an index and a retriever, all to solve a problem a cached prompt already solved.

❌ Choosing before diagnosing

"The answer was wrong" has at least four causes: the fact was missing, the fact was retrieved and ignored, the format was wrong, or the question was ambiguous. They have four different fixes.

✅ Write ten failing examples before choosing an architecture

They tell you which of the four causes you actually have, and they become the first rows of the golden set you will need anyway.

🔑 Key Takeaways ​

  • Retrieval supplies facts and fine-tuning shapes form. Most architecture arguments are this split, unspoken.
  • Start from prompting and work up. Many "RAG projects" are a small corpus that fits in a cached window.
  • Fine-tuning on facts produces confident, stale, unattributable answers that cannot be corrected quickly.
  • The strongest case for fine-tuning is cost: a small model matching a large one on one narrow task.
  • Retrieval can filter documents per user. A fine-tuned model cannot unlearn what it was trained on.

Interview Questions ​

Q: When would you fine-tune instead of using retrieval?

When the problem is behaviour, not knowledge. That means a rigid output format, a domain register (the tone of a field, such as legal), or a long instruction set I would rather not pay for on every request. The strongest case is cost: fine-tune a small model on a narrow task to match a frontier model's quality, and the saving is measurable. I would not fine-tune to teach facts. The result cannot cite a source, cannot change without retraining, and goes stale on its own.

Q: Your company has 400 pages of internal documentation. Design the assistant.

Before designing anything, I would check whether it fits in the window. 400 pages quite possibly does. If it fits, the design is simple: gather the corpus, put it in the stable part of the prompt so it caches, and answer. There is no ingestion pipeline, no index to keep fresh, and no retriever to miss the right passage. I would move to retrieval when the corpus outgrows the window, when per-request cost matters more than build cost, or when the extra material starts to hurt accuracy.

Q: What does "neither" look like as an answer?

It is the right answer more often than people expect. If the right facts were in the window and the answer was still wrong, retrieval will not help. The problem is prompt structure, an unclear question, or the model choice. To find out, print what actually went into the request. If the passage was there, no retrieval work fixes it, and building a pipeline is costly busywork that dodges the real problem.

Q: How do permissions affect this decision?

They can decide it outright. If different users may see different documents, retrieval can filter at query time by applying each user's access rules to the index. A fine-tuned model has absorbed all of its training data, with no way to scope it per user. So any document that went into training is open to everyone. In a regulated or multi-tenant setting, that rules out fine-tuning for knowledge entirely.

Q: Can you use both?

Yes, and the split is clean: retrieval for facts, fine-tuning for form. A support assistant might retrieve the current policy and use a fine-tuned small model to keep answers in a strict house format at low cost. What I would avoid is using both from the start. Each brings its own pipeline and eval work, and doing them together means you cannot measure either one alone.

The whole book, free to read. Generated from the manuscript on every change.

Your progress

Tick each chapter in the sidebar once you have read and understood it. Your name and email keep the ticks on any device.

Your name and email are stored to save your progress. Nothing else is done with them.