From Shubhi K | Product & Market Analysis
Fine-Tuning vs RAG: What 5 Studies Found and What the Training Bill Costs
On this page
Retrieval beat plain fine-tuning in 3 of the 5 published studies that test both methods on the same knowledge tasks. In the other 2, the best score came from combining them. So the fine tuning vs RAG question is usually framed wrong. They do different jobs, and the training bill is the smallest part of what a fine-tune costs you.
Key takeaways
- RAG wins on facts in most published head-to-heads. In 3 of 5 studies testing both methods on the same questions, retrieval alone scored higher than fine-tuning alone, often by 30 points or more.
- Fine-tuning wins on format, not on facts. The 2 studies where tuning held its own trained the model to use domain documents or API syntax, and the top score still came from tuning plus retrieval.
- The training bill is small. A 30-million-token run on one knowledge base costs $150 on GPT-4.1 mini, $750 on GPT-4.1 and about $300 on Gemini 3.5 Flash at list rates.
- The hidden cost is that a fine-tune expires. OpenAI closed self-serve fine-tuning to new users in May 2026, and fine-tuned GPT-4.1 models stop serving when their base model shuts down on 14 January 2027.
The short answer
Use retrieval augmented generation when the model must answer from facts it did not see in training, especially facts that change. Use fine-tuning when you need a fixed output format, tone or task behaviour. If you need both, tune for behaviour and retrieve for facts. Published studies favour that combination over either one alone.
Fine-tuning vs RAG: what the 5 studies actually tested
Most comparisons of fine tuning vs RAG are vendor explainers with no measurements in them. This post uses only studies that put both methods on the same questions, with the same base model, and published the scores. We found 5 that meet that bar, plus 1 study on fine-tuning alone that explains the pattern.
Two definitions first, because the studies use them precisely. Fine-tuning means continuing to train a model's weights on your data, so the knowledge lives inside the model. Retrieval augmented generation, or RAG, means searching your documents at question time and pasting the best passages into the prompt.
The studies differ in one way that matters more than any other. Some fine-tune on raw text, which is called unsupervised or continued pretraining. Others fine-tune on generated question and answer pairs, which is supervised fine-tuning. The second kind does better.
Our position, stated up front: the evidence does not support fine-tuning as a way to teach a model your facts. It does support fine-tuning as a way to teach a model how to behave around your facts.
The study-by-study fine-tuning vs RAG results table
The table below gives each study's own numbers, in the units the authors used. Scores are accuracy unless stated. Where a study tested many models, we show one representative row and say which.
| Study | Setup | Base | Fine-tuned | RAG | Both | Winner |
|---|---|---|---|---|---|---|
| Ovadia et al., Microsoft, EMNLP 2024 | Mistral 7B, 910 current-events questions, unsupervised tuning | 0.481 | 0.504 | 0.875 | 0.810 | RAG |
| Soudani et al., SIGIR-AP 2024 | Mistral 7B, PopQA long-tail entities, ideal retriever | 21.47 | 30.70 | 80.25 | 78.44 | RAG |
| Mecklenburg et al., Microsoft, 2024 | GPT-4, 2023 sports events, supervised tuning on generated Q&A | No tuned configuration beat RAG. Best tuning came within 16% of it. | RAG | |||
| Balaguer et al., Microsoft, 2024 | GPT-4, agriculture Q&A from 3 countries | Tuning added over 6 points. Retrieval added 5 more on top. | Both | |||
| Zhang et al. (RAFT), UC Berkeley, 2024 | LLaMA2-7B, PubMedQA | 56.5 | 59.7 | 58.8 | 73.30 | Both |
Columns are not comparable across rows: each study used its own metric and question set. The RAFT "Both" figure is RAFT itself, which fine-tunes the model to answer from retrieved documents. Balaguer and Mecklenburg report gains in text and charts rather than in a single comparable table row.
Ovadia: retrieval wins on old and new facts
Ovadia and colleagues at Microsoft tested 3 open 7B models on 5 MMLU subjects and on a set of current-events questions the models could not have seen. On current events, regular fine-tuning made Llama2 7B worse, dropping it from 0.353 to 0.219. Retrieval lifted the same model to 0.585.
The authors found one partial fix. Fine-tuning on 10 paraphrases of each passage raised Mistral 7B to 0.588, and accuracy rose with the number of paraphrases. That still left it nearly 30 points behind retrieval.
Soudani: the less popular the fact, the bigger the gap
Soudani, Kanoulas and Hasibi tested 12 models from 80 million to 11 billion parameters on questions about little-known entities. Their abstract states that fine-tuning helps at every popularity level, but retrieval wins by a large margin on the least popular facts. That is exactly the kind of fact your internal knowledge base is full of.
Combining both did not reliably help in their setup. For Mistral 7B, adding tuning to retrieval lowered PopQA accuracy from 80.25 to 78.44. For the smaller StableLM2, it raised it from 76.14 to 82.09.
Mecklenburg: even GPT-4 with good training data trailed retrieval
This is the strongest test of fine-tuning in the set. The team used supervised tuning on GPT-4, generated 10 question and answer pairs per extracted fact, and still wrote that in no configuration did fine-tuning outperform RAG. Their finding on data design is useful anyway: generating questions fact by fact gave even coverage, while scaling by token count left about 20% of facts with no training example at all.
Balaguer: the two gains stack
The agriculture study by Balaguer and colleagues is the one vendors quote when they want fine-tuning to look good. Its abstract reports an accuracy gain of over 6 points from fine-tuning, which is "cumulative with RAG, which increases accuracy by 5 p.p. further." Read correctly, that is an argument for doing both, not for choosing tuning.
RAFT: fine-tuning that teaches the model to use retrieval
RAFT, from Berkeley, fine-tunes a model on questions paired with a mix of relevant and distracting documents. On PubMedQA it reached 73.30, above plain tuning at 59.7 and above GPT-3.5 with retrieval at 71.60. It is the clearest evidence that the best use of fine-tuning is to make retrieval work better, not to replace it.
Why fine-tuning struggles to store new facts
A separate Google study explains the pattern above. Gekhman and colleagues fine-tuned PaLM 2 on questions, some of which the model already knew and some it did not. They found that examples carrying new knowledge "are learned significantly slower" than familiar ones.
The worse finding is what happens once the model does learn them. As the unfamiliar examples are fitted, they "linearly increase the model's tendency to hallucinate". Trained on facts it did not know, the model's test accuracy fell from 37.5 at early stopping to 25.8 when trained to convergence.
The practical reading is blunt. Pushing your knowledge base into the weights harder does not make the model know it better. It teaches the model to answer confidently about things it never really learned.
This is also why we think "fine-tune it on our docs" is the most expensive misunderstanding in enterprise AI projects. The training run is cheap. The wrong answers that follow, delivered in a fluent house style, are not.
The training bill on OpenAI and Google rate cards
Both providers bill training per token processed. Google's tuning documentation states that training tokens equal the tokens in your dataset multiplied by the number of epochs. OpenAI applies the same arithmetic. So the bill is a function of three numbers: dataset size, epochs and rate.
How a knowledge base becomes training tokens
A 1-million-token knowledge base is roughly 750,000 words, a mid-sized library of help articles and policies. Raw text trains poorly, as Ovadia showed, so a serious tune turns it into question and answer pairs. Mecklenburg's team scaled its datasets to 10 times the source tokens and trained for 3 epochs.
Applied to our 1-million-token base, that gives a 10-million-token dataset and 30 million training tokens per run. That is the assumption every figure below rests on. Change it and the bill scales in a straight line.
| Model | Training rate per 1M tokens | One run | Tuned inference vs base |
|---|---|---|---|
| OpenAI GPT-4.1 mini | $5.00 | $150 | $0.80 / $3.20, double the base $0.40 / $1.60 |
| OpenAI GPT-4.1 | $25.00 | $750 | $3.00 / $12.00, 1.5x the base $2.00 / $8.00 |
| Google Gemini 3.5 Flash | $10.00 | $300 | Same as base, $1.50 / $9.00 |
| Google Gemini 3.5 Flash-Lite | $3.00 | $90 | Same as base |
Inference prices are input / output per 1M tokens. OpenAI figures are from its pricing page, read 3 November 2026. Google lists tuning at $0.01 and $0.003 per 1,000 for Gemini 3.5 Flash and Flash-Lite, converted here to per million. Google's documentation says inference pricing is the same for each stable Gemini version, which we read as no tuned-model premium. Generating the training pairs adds about $16 on GPT-4.1 mini or $80 on GPT-4.1, for 10 million output tokens.
For comparison, embedding the same 1-million-token base for retrieval costs 2 cents with text-embedding-3-small, or 13 cents with the large model. Re-embedding after an update costs the same again. On upfront cost alone, retrieval is between 1,000 and 37,000 times cheaper than a tune.
Neither figure includes the work that actually costs money: building an evaluation set, checking the generated training pairs, and testing the result. Those are measured in engineer weeks, and they apply to both paths.
A fine-tuning vs RAG cost model for one knowledge base
Upfront cost is the wrong comparison, because the two methods spend money at different times. Fine-tuning pays once per training run and then sends short prompts. RAG pays almost nothing upfront and then sends long prompts on every question. So the real question is volume.
The model below assumes 100,000 questions a month, 500 tokens of instructions and question per prompt, and 300 output tokens per answer. Retrieval adds 5 chunks of 500 tokens, so a RAG prompt is 3,000 tokens. The knowledge base changes monthly, so a tuned model is retrained monthly.
| Configuration | Inference | Monthly refresh | Total per month |
|---|---|---|---|
| GPT-4.1 mini, base model with RAG | $168 | Under $1 to re-embed | $168 |
| GPT-4.1 mini, fine-tuned, no retrieval | $136 | $166 to train and regenerate data | $302 |
| GPT-4.1 mini, fine-tuned with RAG | $336 | $166 | $502 |
| GPT-4.1, base model with RAG | $840 | Under $1 | $840 |
| GPT-4.1, fine-tuned, no retrieval | $510 | $830 | $1,340 |
| Gemini 3.5 Flash, base model with RAG | $720 | Under $1 | $720 |
| Gemini 3.5 Flash, tuned, no retrieval | $345 | $316 | $661 |
Zan Digital cost model, list rates read 3 November 2026. Excludes vector database hosting, which depends on vendor and index size, and all engineering time. Gemini embedding cost assumed comparable to OpenAI's small model. No prompt caching applied, because retrieved chunks differ per question.
Two results stand out. First, on OpenAI the fine-tuning premium eats most of the saving from shorter prompts. A tuned GPT-4.1 mini answer costs $0.00136 against $0.00168 with retrieval, a gap of about a third of a tenth of a cent.
Second, Google's pricing changes the shape of the trade. With no tuned-inference premium, a tuned Gemini 3.5 Flash answer costs less than half a RAG answer. If cost were the only variable, Gemini would be the place to fine-tune.
Why the cost win does not settle it
Every cheap row in the table is a fine-tuned model answering without retrieval. That is the configuration that lost in 3 of the 5 studies above. Saving $400 a month on Gemini is not a saving if the tuned model gets your refund policy wrong a third more often.
The configurations the evidence supports, base with RAG or tuned with RAG, are the more expensive rows. That is the honest answer to "what does fine-tuning cost": if you do it properly, it is an addition to your retrieval bill, not a replacement for it.
The OpenAI fine-tuning cost now includes an expiry date
Here is the part of the training bill that no rate card shows. A fine-tuned model is tied to its base model, and the base model has a shutdown date set by the vendor. Your tune is an asset with a useful life you do not control.
OpenAI made this concrete in 2026. Its pricing page now states that "OpenAI is winding down the fine-tuning platform" and that it "is no longer accessible to new users." The schedule on its deprecations page runs as follows.
Inference on existing tunes continues until the base model is retired. For GPT-4.1 and GPT-4.1 mini, that is 14 January 2027, with GPT-6 Luna named as the replacement. There is no way to carry a tune across. You rebuild it on whatever the vendor offers next, if it offers anything.
Google is not immune either. Its model page says Gemini 2.5 Flash was retired from its enterprise platform on 20 October 2026. The tuning-capable list there has already moved on to the 3.x Flash models priced above.
Retrieval has no equivalent problem. An index of embedded chunks works with any model that accepts a prompt. Switching the model behind a RAG system is a configuration change and a regression test, which is a point we make at more length in the analysis of what model switching really costs. Switching a fine-tuned system is a new project.
So amortise any tune over the life of its base model, not over an imagined three years. A $750 GPT-4.1 run in November 2026 has about 10 weeks of serving left. That is the real OpenAI fine tuning cost in late 2026.
Where the case for RAG is weakest
The argument above has real gaps.
The studies mostly used small, older models
3 of the 5 studies tested models of 7 billion parameters or fewer, from 2023 and early 2024. Only Mecklenburg and Balaguer tuned GPT-4, and neither priced the work. None tested a 2026 frontier model, and none of the 4 models in our cost table appears in any study. We are applying old accuracy results to new prices, and that is a stretch.
Several studies also used an ideal or very good retriever. Soudani's headline table assumes ideal retrieval. Your retriever will be worse, and every point it loses comes off the RAG column. Chunking alone moves results a lot, as the benchmarks in our review of RAG chunking strategies show.
Some jobs genuinely belong to fine-tuning
None of these studies measured what fine-tuning is best at. They measured factual recall. A tuned model that always returns valid JSON, writes in your support team's voice, or follows a 12-step triage policy without a 3,000-token prompt is solving a different problem. The RAFT results on API calls show tuning adding over 60 points where the job was learning a syntax.
Latency is the other honest point in tuning's favour. A 500-token prompt is answered faster than a 3,000-token one. For a voice agent or an autocomplete feature, that can decide the architecture regardless of the accuracy studies.
And the counting is ours. The "3 of 5" tally reflects which studies we judged comparable. A different reader could add studies we excluded and get a different ratio.
When to fine-tune an LLM, and when to retrieve
Retrieve for facts, tune for behaviour, and do both only when you have proved you need both. The table sets it out, including the row where tuning clearly wins.
| Your problem | Better choice | Evidence |
|---|---|---|
| Answers must reflect facts that change monthly or faster | RAG | Ovadia current events; retraining cost in the model above |
| Facts are obscure, internal or long-tail | RAG | Soudani: biggest gap on least popular entities |
| Answers must cite a source a user can check | RAG | A tuned model cannot point to where it learned a fact |
| Output must follow a strict format or domain syntax | Fine-tuning | RAFT API-call results, up to 61 points above base plus retrieval |
| Retrieval works but the model ignores or misreads the passages | Fine-tune with retrieved documents, then keep RAG | RAFT PubMedQA; Balaguer cumulative gains |
| Prompt is long because of fixed instructions, at high volume, on a no-premium platform | Fine-tuning wins on cost | Break-even near 84,000 questions a month on Gemini 3.5 Flash |
Before either, measure whether you have a retrieval problem at all. Many teams that ask about fine-tuning have a retriever returning the wrong chunks. Fix that with hybrid search and reranking, compared in our benchmarks of rerankers and hybrid search, before you pay to change any weights.
If your corpus is small, you may need neither. A knowledge base under a few hundred thousand tokens can often sit in a cached prompt, which we priced in the RAG vs long context cost model.
Frequently asked questions
Is fine-tuning or RAG better for adding knowledge to an LLM?
RAG is better for adding knowledge in most published comparisons. In 3 of 5 studies that tested both on the same questions, retrieval alone beat fine-tuning alone, often by 30 points or more on new facts. In the other 2, the best result came from combining them. Fine-tuning is better at teaching behaviour, such as an output format, than at storing facts the model can recall reliably.
How much does OpenAI fine-tuning cost?
As of November 2026, OpenAI charges $5 per million training tokens for GPT-4.1 mini and $25 for GPT-4.1. Training tokens equal dataset tokens times epochs, so a 10-million-token dataset trained for 3 epochs costs $150 or $750. Fine-tuned models also cost more to run: GPT-4.1 mini inference doubles to $0.80 input and $3.20 output per million tokens.
Can I still fine-tune models on OpenAI?
Only if your organisation is an existing, active fine-tuning customer. OpenAI closed fine-tuning to new organisations on 7 May 2026 and to those inactive for 60 days on 2 July 2026. Active customers can create jobs until 6 January 2027. Fine-tuned models keep serving until their base model shuts down, which is 14 January 2027 for GPT-4.1 and GPT-4.1 mini.
When should you fine-tune an LLM instead of using RAG?
Fine-tune when the problem is behaviour rather than knowledge. Good cases are a strict output format, a domain syntax such as API calls, a consistent tone, or a long fixed instruction set at high volume. Fine-tuning also helps when retrieval returns the right passages but the model misuses them. In that case, tune the model on retrieved documents and keep retrieval in place.
How much does RAG cost compared with fine-tuning?
RAG is far cheaper upfront and costs more per question. Embedding a 1-million-token knowledge base costs 2 cents on OpenAI's small embedding model, against $150 to $750 to fine-tune. At 100,000 questions a month, RAG on GPT-4.1 mini costs about $168 in tokens. A monthly-retrained tune costs about $302, before vector database hosting and engineering time.
Can you combine fine-tuning and RAG?
Yes, and the published results favour it when you need both behaviour and facts. Microsoft's agriculture study found the gains stacked, with tuning adding over 6 points and retrieval 5 more. Berkeley's RAFT method fine-tunes a model on questions paired with retrieved documents and beat both methods alone on PubMedQA. The cost is that you pay for training and long prompts together.
Where to start this week
Write 50 real questions your users ask, with the correct answers, before you spend anything on either method. Run them against a base model with your current retrieval and record the score. If you have no retrieval yet, that is the first build. Our guide to building an LLM evaluation suite covers how to score the answers.
If you already run a fine-tuned OpenAI model, look up its base model's shutdown date today. If it is GPT-4.1 or GPT-4.1 mini, you have until 14 January 2027, and the replacement plan is probably retrieval on a newer base model rather than another tune.
References
- Ovadia, Brief, Mishaeli and Elisha, Fine-Tuning or Retrieval? Comparing Knowledge Injection in LLMs, Microsoft, EMNLP 2024. Used for Tables 1 and 2 and the paraphrase finding.
- Soudani, Kanoulas and Hasibi, Fine Tuning vs. Retrieval Augmented Generation for Less Popular Knowledge, SIGIR-AP 2024. Used for Table 3 accuracy figures.
- Mecklenburg et al., Injecting New Knowledge into Large Language Models via Supervised Fine-Tuning, Microsoft, 2024. Used for the GPT-4 tuning results, dataset scaling and fact coverage.
- Balaguer et al., RAG vs Fine-tuning: Pipelines, Tradeoffs, and a Case Study on Agriculture, Microsoft, 2024. Used for the abstract's 6 and 5 point gains only.
- Zhang et al., RAFT: Adapting Language Model to Domain Specific RAG, UC Berkeley, 2024. Used for Table 1 results on PubMedQA and API benchmarks.
- Gekhman et al., Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?, Google, EMNLP 2024. Used for learning speed and hallucination findings.
- OpenAI, API pricing, and OpenAI deprecations and supervised fine-tuning documentation, read 3 November 2026. Used for training, tuned inference and embedding rates, the wind-down notice and every shutdown date.
- Google Cloud, Agent Platform pricing, with the supervised tuning and Gemini 2.5 Flash model documentation, read 3 November 2026. Used for Gemini tuning and inference rates, token counting and the 2.5 Flash retirement.
The weakest part of this source base is the gap between when the studies ran and what they are compared against. Every accuracy result predates the models we priced, most used 7B models, and none was run by an independent party testing a 2026 frontier model. Google's tuning rates come from its pricing page as indexed, because the live page did not render for our tools. Last verified 3 November 2026; rates and shutdown dates should be re-checked every 90 days.
Related reading