What is the difference between RAG and fine-tuning?
RAG vs fine-tuning comes down to what you’re trying to change. Retrieval-augmented generation changes what the model knows. Fine-tuning changes how it behaves. If the system has to answer accurately from your documents, that’s a knowledge problem and you need RAG. If it has to respond in a particular format, tone or reasoning style, that’s a behaviour problem and fine-tuning is the right tool.
Retrieval-augmented generation (RAG) is a technique that retrieves relevant passages from your own documents when a question is asked and gives them to the language model, so it answers from current sources it can cite. The approach was introduced by Lewis et al. at Facebook AI Research in the 2020 NeurIPS paper “Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks”. Fine-tuning is further training of an existing model on your own examples. It changes the model’s weights, and with them its output format, tone and reasoning style, but it does not give the model a reliable way to look up facts that change.
Most of the muddled decisions we see here come from treating the two as competing answers to the same question. They solve different problems, which is also why mature systems often end up using both.
A ten-minute test
Write down five questions your system has to answer correctly. Then ask yourself: if the underlying information changed next week, would the correct answers change too?
If they would (pricing, policies, inventory, documentation, case files), you need retrieval. Fine-tuning bakes knowledge into the model’s weights, so every change means retraining, and retraining is slow and costs money. Teams that fine-tune on knowledge that keeps changing end up retraining every month and wondering why the project never settles down.
If they wouldn’t, because the answers depend on style, structure or domain reasoning that stays stable, fine-tuning is probably the better tool. It may also be much cheaper at inference time.
Should you try prompt engineering first?
Usually, yes. Before you build an index or collect training data, spend a day writing a careful prompt: clear instructions, the output format spelled out, and three or four worked examples of good answers. Run your five test questions through it.
If the answers are right but the format drifts, a better prompt or enforced structured output often fixes it, and fine-tuning may never be needed. If the answers are wrong because the model does not have your information, no prompt will fix that, and you need retrieval. If you can paste the relevant document into the prompt and the answer comes out right, that is a good sign RAG will work, because RAG automates exactly that step.
Prompt engineering stops being enough when the prompt grows past a few pages, when the knowledge changes every week, or when you need the same behaviour across thousands of requests a day at a low cost per request.
What each approach is good at
RAG gives you three things fine-tuning can’t: current information, source citations and access control. In regulated environments the citations usually settle it. A fine-tuned model can’t tell you where an answer came from, because the answer is spread across billions of weights. A RAG system can link straight to the paragraph it used.
Fine-tuning gives you consistency and efficiency. Train a model on ten thousand examples of your preferred output format and it will produce that format far more reliably than prompt instructions ever manage. It also gets there with a shorter prompt, and at high volume that saves real money.
If RAG is the right fit, our guide to building production RAG systems that do not hallucinate covers chunking, hybrid retrieval and evaluation.
| RAG | Fine-tuning | |
|---|---|---|
| What it changes | What the model knows | How the model behaves |
| Best for | Facts that change, citations, per-user access control | Consistent format, tone and domain reasoning |
| Updating knowledge | Add documents to the index, no retraining | Retrain the model |
| Source citations | Yes, it links to the passage used | No |
| Data you need | Your existing documents | A few thousand curated examples |
| Typical timeline | 4 to 8 weeks to production | 4 to 6 weeks of data preparation, then training |
| Typical cost | $18,000 to $35,000 for one document collection; $45,000 to $110,000 for several sources with access control | A few hundred dollars of compute, plus the cost of preparing data |
Cost and time in practice
Across the fixed-price RAG projects we quote, a production system takes four to eight weeks to build. One built on a single document collection usually costs $18,000 to $35,000; one spanning several sources with access control runs $45,000 to $110,000. After launch you pay for retrieval infrastructure plus inference. Updating the knowledge costs nothing extra, because you just add documents to the index. These are the same ranges we quote for RAG system development.
Fine-tuning looks cheap on the compute line and turns out expensive on the data line. The training run itself might cost a few hundred dollars. The real budget goes into collecting and cleaning several thousand high-quality training examples, which is often four to six weeks of work before training even starts. For how either option fits into a wider budget, see how much AI development costs in 2026.
Common mistakes with RAG and fine-tuning
Most of the failed projects we are asked to rescue made one of these four mistakes.
- Fine-tuning on facts that change, such as prices, policies or stock, and then retraining every month
- Enforcing document permissions only at the answer layer, after the model has already read text the user cannot see
- Fine-tuning on fewer than about 1,000 examples, where careful prompting would have done the same job
- Launching without a test set, so nobody can say whether a change made answers better or worse
When to use both
Mature production systems often combine the two, and the split is clean: fine-tune for how the system responds, retrieve for what it knows. A legal assistant, for example, might be fine-tuned to structure answers in the format the firm requires while pulling current case documents at query time.
Our advice is to do them in order. Build RAG first. It’s faster to stand up and shows you straight away whether the knowledge problem is solved. Add fine-tuning only once real usage data shows a consistent gap in behaviour. By then you’ll also have the training examples you need, taken from actual traffic.
Retrieval also changes what a system costs to run. On a document analysis product handling about 400,000 requests a month, we added a retrieval step that sends the model only the relevant passages. Average input tokens fell by about 71% and answer quality went up slightly. The full write-up is in how we cut LLM costs.
Frequently asked questions
Can we start with RAG and add fine-tuning later?
Yes, and that’s the order we recommend. RAG is quicker to stand up, and it produces the real usage data that makes fine-tuning worth doing. If you fine-tune first, you’re guessing at training examples before you know how people will use the system.
How much data do we need to fine-tune?
Meaningful behavioural change generally takes a few thousand high-quality examples. Below about a thousand, careful prompting usually gets the same result for a fraction of the effort. Quality counts for much more than volume: a thousand well-curated examples will beat ten thousand noisy ones.
Does RAG work with our access permissions?
It should, provided permissions are enforced at the retrieval layer. Filtering at the answer layer isn’t enough. Built properly, a user can’t retrieve a passage from a document they aren’t allowed to read. Fine-tuning can’t offer this at all, because the knowledge lives in shared weights.
Is RAG cheaper than fine-tuning?
Usually, at the start. A RAG system over a single document collection typically costs $18,000 to $35,000 and stays cheap to update, because new knowledge only means adding documents. Fine-tuning compute is cheap, but preparing several thousand good training examples often takes four to six weeks, and every change in knowledge means retraining.
Not sure whether you need RAG or fine-tuning?
Bring five real questions to a free discovery call with our team in San Jose or Perth. We will tell you which approach fits, then send a fixed-price quote for your RAG system if you need one.
Book a free discovery call