COMPARE · METHOD

Fine-tuning versus RAG

Fine-tuning versus RAG is a gap comparison. Fine-tuning changes the model with examples so a stable behaviour, format or judgement shows up without being re-explained every call. Retrieval-augmented generation, as Lewis et al. framed it, leaves the weights alone and fetches passages at answer time so the model can condition on text it did not memorise. Many desks need both. Some need neither, and should prompt against a written baseline or distil only after a teacher already passes. Neither method chooses the licence or the building.

Which gap are you closing?

Write one sentence before you name a method. “The model is wrong because the behaviour is wrong.” Or: “The model is wrong because it cannot see this document.” The first sentence is a fine-tuning conversation, once you can show the behaviour with examples and a baseline. The second is a retrieval conversation, once you have a corpus you are allowed to index and a way to know which passage should have been found. If you cannot write either sentence, you do not have a method problem. You have an undefined job. The commercial fork for that moment is LLM fine-tuning. This page assumes the job can be pointed at.

Handlers are a useful test of which sentence you wrote. If they reject the shape — the fields are in the wrong order, the tone is a brochure, the model answers when it should abstain — the weights or the prompt are what you change. If they reject the clause — last month’s wording, a supplier attribute that changed on Tuesday, a circular the model has never seen — the index is what you change. Training last year’s PDFs will not see Tuesday. Retrieving a passage will not teach a format the model has never been shown, unless the format is already in the prompt and the model already follows it.

Teams get stuck when they force a changing PDF into a fine-tune, or a tone problem into a retrieval pipeline. The first goes stale the week the PDF changes, and it looks authoritative while it is stale. The second returns the right page and still writes the wrong shape, so the reviewer spends the time on formatting that the project claimed to remove. Lewis et al. is the citation for fetching documents into the context. It is not a product recommendation, and it is not a score on your book.

Fine-tuning and RAG solve different gaps. They can be combined. They are not a leaderboard.
Fine-tuningRAG
What changesWeights, or an adapter on a frozen baseThe context window, via fetched passages
What you must already haveAllowed examples and a baselineAn allowed corpus and a refresh path
What you testExamples the run did not train onQuestions where you know the passage that should have been found
What goes staleThe world, if the weights memorised itThe index, if nobody rebuilds it
What it does not decideWhere inference runsThe model’s licence

What does fine-tuning change, and what does it leave stale?

Fine-tuning updates weights, or trains an adapter while the base stays frozen. The point of the update is a behaviour you can demonstrate: a field order, a house tone, a routing label, a habit of quoting a source when one was provided, a habit of refusing when the input is out of scope. The fine-tuning definition is the short version. The technique pages own LoRA, QLoRA and a full update. This page only needs the consequence: after training, the behaviour is in the artefact. You do not have to spend the prompt re-teaching it on every call, and you do pay for a training run, an evaluation, and a new file to host, roll back and licence.

What fine-tuning does not reliably do is install a library. A model can be shown examples of an extract and still miss a clause that was not in the training file and is not in the prompt. If the source of truth changes on a schedule you do not control — policy wordings, plan documents, catalogue attributes, a regulator’s circular — baking the old text into weights is a cache with no invalidation. You will retrain or you will be wrong. Retraining has a lead time: new labels, a new run, a new test on examples the run did not see, a new hash in production. That lead time is the cost people forget when they say fine-tuning “learns our documents”.

Fine-tuning also does not choose a host. You can adapt a model in one region and call a foreign API at inference. You can adapt an open-weight checkpoint and still be bound by its licence when you distribute the adapter. Read the licence comparison for the grant. Read how to deploy an LLM for the operator. The training job and the serving job are different invoices even when one vendor offers both.

What does RAG change, and what does it fail to teach?

RAG fetches text and asks the model to use it. The weights can stay frozen. The usual shape you want is an answer that stays inside the passages, plus the passages themselves so a person can check. The RAG definition is that pattern in one page. Operating it means a corpus you may index, a chunking choice, a retriever, a refresh when the corpus changes, and a test set where you already know which passage should have come back. If the retriever misses, the generator will either abstain or improvise. Improvising from the wrong page is the failure mode that looks like a clever model.

Retrieval does not teach a format the model cannot already follow. If every correct answer must be three labelled fields and a refusal when the passage is silent, and the base model will not hold that shape even when the right passage is pasted into the prompt, the index is not the gap. Paste the passage by hand first. If the shape is still wrong, you have a behaviour problem and retrieval will not fix it. If the shape is right as soon as the passage is present, do not train a model to memorise passages you can fetch.

A vector database is not the method. It is one way to retrieve. Keyword search, a structured lookup on a policy number, or a person attaching the file can be the retriever when the corpus is small or the key is exact. Calling all of those “RAG” is fine if you still test whether the right text arrived. Calling a database a truth filter is not fine. The index repeats whatever you put in it, including the superseded wording you forgot to remove.

When should you combine RAG and fine-tuning?

Combine them when both sentences are true at once. The format is stable and the model does not hold it from a prompt alone. The facts change, or they are too many to paste, and they must be quoted from a current source. A common insurance shape is a fine-tune that emits agreed fields and abstains when unsure, plus a retriever that supplies this month’s wording for those fields. A common retail shape is a fine-tune that maps messy supplier language onto your attribute names, plus a retriever or a table lookup for the attribute values that merchandising changed. The fine-tune is not the catalogue. The index is not the house style.

Order the work. First prove the behaviour with the right text pasted in, so you know a format model is worth training. Or first prove the retriever finds the passage, so you know the format model will have something honest to read. Doing both constructions in the same week, before either proof, is how a programme buys an index and a training run and cannot say which one moved the reviewer’s score. The decision checklist below forces the order into writing.

Combining them does not halve the operating load. You now have an artefact to version and a corpus to refresh. A new adapter can change how citations are phrased and make a retriever that used to look good look worse, because the judge is the whole answer. Re-test the pair. A new index build can surface a passage the adapter was never shown how to quote. Re-test the pair. “We fine-tuned and we have RAG” is not a release note. The release note names the adapter hash, the index build, and the unused questions you scored.

Decision prompts, not scores.
WhenThen
The source text changes and must be quoted, and the answer shape is already right once the passage is pasted inShip retrieval. Do not train a model to avoid writing an index.
The source text is stable, or it is already in the prompt, and the format is still wrongStart with fine-tuning, or with a stricter prompt if you have not tried that on the baseline.
The format is wrong even with the right passage, and the passage changesYou will likely need both. Prove each half before you couple them.
You have neither examples nor a corpus you are allowed to indexStop. The readiness review is the project.

What about prompt engineering?

Prompting is the baseline, not a third brand of model. Before you train and before you build an index, write the instruction you wish the model already followed and, where the gap is knowledge, paste one known-good passage. Score that on the same unused questions you would use later. If the prompted model already clears the bar, you have your system. Training would be a way to shorten the prompt or to make the behaviour survive a sloppy caller. Retrieval would be a way to stop pasting by hand. Those can still be worth money. They are not required by a failure you have not shown.

Prompting fails in two familiar ways. The instruction is longer than the team will maintain, and every new caller drops a clause. Or the knowledge does not fit, or must not be pasted because it changes hourly and nobody will keep the prompt in step. The first failure is a fine-tuning candidate: move the stable instruction into weights or an adapter, and keep the prompt for the case-specific facts. The second is a retrieval candidate: move the changing text into an index with an owner. A prompt that tries to be both the style guide and the entire policy library becomes a document nobody updates, which is a stale fine-tune you did not even get to version.

Prompting does not remove evaluation, residency or the licence. A clever system prompt on a closed API still sends the document to that API. A clever system prompt on a local model still needs the checkpoint’s grant. We do not publish a winning prompt. We do say: if you skip the pasted-passage test, you will not know whether you bought training to solve a problem a paragraph already solved.

What about distillation?

Distillation is not a substitute for this fork. It trains a student to follow a teacher, classically using the teacher’s softened outputs. Hinton et al. set that pattern out. In a brief, people say “distil” when they mean “make the fine-tune smaller” or “make the RAG system cheaper to serve”. Shrinking a model that has not yet met the bar produces a smaller model that has not met the bar. The distillation definition and the distillation technique keep the order: the teacher passes, both licences allow the traces, then you train the student and score it on the same unused pack.

The licence point is sharp here. Some grants allow training other models on outputs. DeepSeek-R1’s published MIT line is one of them. Some grants forbid using outputs to improve a non-family model. The published Llama agreements are that case. A closed API often has its own rule about using outputs as training data. Retrieval does not create a right to store the model’s answers and pour them into a student. If the plan was “RAG against the API, then distil the traces into our weights”, read both grants before anyone records a trace. The licence comparison is the index. It will not guess a grant from a vendor name.

Distillation also does not refresh a corpus. A student that memorised yesterday’s answers is a fine-tune with extra steps. If the reason you reached for distillation was freshness, you wanted a retriever. If the reason was that a large teacher passes and you cannot serve it, distillation can be a later project, after this page’s gap is settled. It is not the first meeting.

How do cost, maintenance and freshness trade off?

There is no standing result that RAG is cheaper than fine-tuning, or the reverse. Fine-tuning has a training cost you pay when the behaviour changes, plus the cost of hosting the artefact, plus the cost of evaluating it again. RAG has the cost of building and refreshing an index, the tokens you spend sending passages into the model, and the cost of evaluating whether the right passage arrived and whether the answer stayed inside it. A quiet corpus and a bad format favours spending on training. A noisy corpus and a format the base model already holds favours spending on the index. Price your own volumes. The inference cost planner takes token prices or GPU-hour prices you type. It does not contain a tariff for either method.

Maintenance follows the thing that drifts. A fine-tune drifts when the desired behaviour drifts, or when you discover the training examples were wrong. You add examples, you rerun, you retest, you promote a new hash, you keep the old hash until rollback is boring. A RAG system drifts when documents are added, replaced or withdrawn. Someone must own that pipeline. An index that “updates itself” from a folder nobody curates will quote the withdrawn circular with the same confidence as the current one. Write the owner. Write how a superseded document leaves the index. Write how long a freshly approved document waits before it can be retrieved. That wait is your freshness number. Do not import one from a vendor slide.

Freshness is not free accuracy. A retriever that updates every hour can still fetch the wrong chunk of the right document. A fine-tune that you retrain every quarter can still be the right tool for a tone that has not changed in three years. Match the refresh to the thing that changes. Policy wordings and catalogue facts usually change faster than house style. If they do not, in your organisation, say so. The method follows that fact. It does not follow which acronym a neighbouring team used.

The hidden cost is running both and accounting for one. A fine-tuned model with a retriever pays for the adapter’s memory and the index’s storage and the extra prompt tokens. A cascade that “tries the small fine-tune, then RAG, then the large model” pays for every hop you actually invoke, including the failures you show the user before you escalate. Count the path you will ship. The deployment essay is where concurrency, context length and the KV cache sit beside this choice. A long retrieved prompt is a memory cost at serve time even when training memory was zero.

Where do data residency and sovereignty sit?

Residency is orthogonal to the method, and it is the axis people smuggle in by naming one. Fine-tuning on your documents does not mean inference stays in your building. RAG over your policies does not mean the policies stay in your building if the completion is a closed API. Draw three boxes — corpus, model, logs — before you pick a winner between these methods. The inference page is that drawing. The deployment page is how the drawing becomes an operator, a region and a rollback.

A private index with a public model is a split system. The query, the retrieved passages and the completion each have a location. If the passages are the sensitive part, sending them to an API is the transfer, even though you “did not fine-tune on them”. If the model is local and the embedding service is not, the hop is the embedding call. Write every hop. A diagram that only shows the generator is how a residency rule gets broken by a component nobody called a model.

A local fine-tune with a vendor log pipeline is the same kind of split. The weights sit on your GPU. The prompts sit in someone else’s observability tenant. Sovereignty, on this site, is whether you can name the operator, the location and the grant, and whether you can keep running if the vendor path ends. Adapting weights does not answer those sentences. Fetching documents does not either. The sovereign AI definition is the short form. Use it when a sponsor says “we will fine-tune, so it will be sovereign” or “we will use RAG, so the data never leaves”. Both sentences skip the host.

The licence still rides along. An open-weight model you fine-tune is under that checkpoint’s grant. A closed model you retrieve against is under that API contract, including whatever it says about retention and about training on your prompts. Retrieval is not a privacy feature. It is a way to supply text. Privacy is a property of where that text is processed and who can read the logs.

What should the decision checklist force you to write?

A useful decision is a page someone can disagree with. The checklist is that page. It is not a maturity model and it does not produce a score. If a line is blank, the recommendation is to stop, not to default to whichever method the last vendor demo showed.

  • The gap in one sentence: behaviour, missing document, or both.
  • The baseline: the current process, and a prompted model with a known passage pasted in, scored on questions you will not train on.
  • The corpus: what may be indexed, who refreshes it, and how a superseded document leaves.
  • The examples: what may be trained on, who labels a good answer, and which pack stays unused.
  • The host: corpus, model and logs, each with an operator. Link the inference and deployment notes rather than writing “on-prem” as a mood.
  • The grant: the checkpoint or the API terms, including whether outputs may be stored or used to train. Link the licence comparison rather than writing “open”.
  • The cost inputs you actually hold: volumes, token or GPU prices, and who pays for a reindex versus a retrain. Leave the cell blank if you do not hold the number.
  • The promotion rule: which hash and which index build are allowed to answer, and what rollback is.

Bring that page to a scoping call. We will say whether the first engagement is a readiness review, a retrieval pilot, or a fine-tuning pilot. We will not start from the acronym.

What does this comparison refuse?

It refuses a cheaper-by-default winner. Anyone who needs a percentage saving can type their own prices into the cost planner and still must subtract nothing for quality they have not scored.

It refuses to treat prompting, retrieval, fine-tuning and distillation as a ladder you must climb. Prompting is the test. Retrieval and fine-tuning are responses to two different failures of that test. Distillation is a later shrink of a teacher that already passed, under two grants. Skipping a rung is often the correct project.

It refuses fake authority. We do not publish a client who saved a stated sum, a benchmark where RAG beat fine-tuning by a stated point, or a quote from a paper about your policies. Lewis et al. support the retrieval pattern. Hinton et al. support what distillation means. Your unused questions support the choice.

Sources

  1. Lewis et al., Retrieval-Augmented Generation (Accessed November 2026). Retrieval-augmented generation combines a parametric language model with a non-parametric retrieval index so the model can condition on documents fetched at generation time.
  2. Hinton et al., Distilling the Knowledge in a Neural Network (Accessed November 2026). Knowledge distillation trains a student model to match a teacher, typically using the teacher’s softened outputs rather than only hard labels.

Questions we hear first

Is RAG cheaper than fine-tuning?

Not as a rule. Retrieval adds index cost and tokens for the passages. Fine-tuning adds a training run and an artefact to host. A system that uses both pays for both. Price your own volumes in the inference cost planner, and include the path you actually invoke.

Does fine-tuning add our facts?

It can memorise facts that were in the training examples. That is a stale cache when those facts change. If the requirement is to quote the current document, fetch the document. Use fine-tuning for a behaviour that should remain after the document is swapped.

Can RAG cite our policies if the model is closed?

Only if those policies are allowed to be sent to that API. Retrieval does not keep a document local if the completion, the embedding, or the log happens elsewhere. Write each hop on the inference page.

Should we try prompting before either method?

Yes. Write the instruction and, if the gap is a document, paste a known passage. Score that baseline on unused questions. Train or index only the failure that baseline still has.

When do we need both?

When the answer shape is wrong even with the right passage in the prompt, and the passage itself changes or will not fit in a hand-built prompt. Prove the format and the retriever separately, then couple them and test the pair.

Can we distil a RAG system into a smaller model and drop the index?

Only if you intend the student to memorise the answers, you have the right to train on those traces, and you accept that the student will not see documents added after the run. Dropping the index drops freshness. That is a product decision, not a free optimisation.

How often should we retrain or reindex?

Retrain when the desired behaviour changes or the labels were wrong. Reindex when the documents change. There is no universal interval. Write the owner and the maximum age you will tolerate for a retrieved document.

Does either method keep data in our region?

No. Region is a property of the host. You can fine-tune in-region and still call a foreign API. You can retrieve from a private index and still send the prompt away. Settle corpus, model and logs before you treat the method as a control.

What if we have a pile of files but no labels?

A pile can become an index if you are allowed to store it and someone owns freshness. It cannot become a fine-tune until someone can mark a good answer and you can spare an unused pack. Volume is not readiness.

Start with one task and a written scope.

Bring the workflow, the constraints and where inference should run. We use that brief to decide whether sovereign LLM & SLM fine-tuning, retrieval or a readiness review is the right first step.

Explore your AI options