When an off-the-shelf AI model does not know enough about your business, two techniques come up: retrieval-augmented generation (RAG) and fine-tuning. They are often presented as alternatives. They solve different problems, and choosing the wrong one is one of the most common reasons AI projects disappoint.

What RAG does

RAG gives a model access to information at the moment it answers. When a question arrives, the system searches your documents or data for the most relevant passages and gives them to the model together with the question. The model answers from that material and can cite where each part came from.

Because the knowledge stays in your documents rather than inside the model, RAG suits information that changes, needs permissions, or must be traceable. Update a policy document and the next answer reflects it. Restrict a document to one team and retrieval can respect that.

What fine-tuning does

Fine-tuning continues training an existing model on your own examples. It changes how the model behaves: it can learn to always answer in a particular structure, adopt a house style, classify inputs into your categories, or perform a narrow task more reliably. A fine-tuned small model can sometimes match a much larger model on one specific task, at lower cost and higher speed.

What fine-tuning does poorly is store facts. A model fine-tuned on your documents may reproduce some of them, but it cannot reliably cite sources, it will not know about anything written after training, and it cannot apply permissions to what it learned.

A simple test

  • If the problem is "the model does not know about X" — use RAG.
  • If the problem is "the model knows enough but will not do it the way we need" — try better prompting first, then fine-tuning.
  • If the information changes weekly, must be cited, or has access rules — RAG.
  • If you need a cheaper or faster model for one high-volume task — fine-tuning is worth testing.

Cost and effort

RAG requires an ingestion pipeline, a search index and careful work on retrieval quality — getting the right passages is most of the effort. Running cost scales with how much context each request carries. Fine-tuning requires a dataset of good examples, training runs and the infrastructure to serve the resulting model, plus repeating the process when your requirements change. Neither is free, and both need an evaluation set to show whether they are working.

Using both

Many mature systems combine them. Retrieval supplies the current facts and sources; a fine-tuned model turns them into an answer with the right structure and tone, or handles a classification step cheaply. The order matters: get retrieval right first, because a perfectly formatted answer built on the wrong passage is still wrong.

How we decide

We start every project with a baseline: the best result from a well-prompted model with retrieval. That baseline is scored on an evaluation set of real questions. Fine-tuning is only worth doing if it beats the baseline on quality, cost or speed — and we measure that on the same set before anything is deployed.

Questions people ask

Can fine-tuning teach a model our company knowledge?

Only unreliably. It may memorise some facts, but it cannot cite sources, stay current or respect permissions. Retrieval is the better tool for knowledge.

Is RAG expensive?

The main costs are building the ingestion and search pipeline and the extra context sent with each request. For most knowledge use cases it is cheaper and faster to change than fine-tuning.

How many examples does fine-tuning need?

For narrow tasks, often hundreds to a few thousand high-quality examples with parameter-efficient methods. Quality matters more than quantity.
← All insights