Almost every AI project hits the same request sooner or later: “We want to fine-tune a model on our docs so it knows our products.” It is usually the wrong tool.
Fine-tuning vs RAG is not a contest with one winner. Each fixes a different failure, and prompting fixes a third. If the model lacks facts, you need retrieval. If it gets the behavior wrong, you may need fine-tuning. And a large share of “the model is bad at this” turns out to mean “the instructions were vague,” which costs nothing to fix.
So the decision is a diagnosis. Work out which failure you have, apply the cheapest fix that solves it, and stop there.
Three tools, three different failures
Before comparing costs or architectures, get the job of each tool straight. Most expensive mistakes in this area come from using one tool to solve another tool’s problem.
- Prompting fixes a model that doesn’t understand what you want: the wrong format, the wrong tone, steps skipped, an instruction ignored.
- Retrieval-augmented generation (RAG) fixes a model that doesn’t have the facts: your pricing, your policies, last week’s tickets, anything private or anything newer than its training data.
- Fine-tuning fixes a model whose behavior is right only some of the time, or that is too large and slow for a narrow task you run thousands of times a day.
The table below adds the column most comparisons leave out: what it costs to change your mind later.
| Approach | Fixes | Does not fix | Effort to start | Cost to change later |
|---|---|---|---|---|
| Prompting | Unclear task, wrong format or tone, missed steps | Facts the model has never seen | Hours | Edit a block of text |
| RAG | Missing, private or fast-changing facts; answers that need citations | Inconsistent behavior; weak reasoning | Days to weeks | Update documents and re-index |
| Fine-tuning | Consistent style and structure at scale; narrow high-volume tasks; shrinking a model | New or changing facts | Weeks, mostly data collection | Retrain, and retrain again when the base model changes |
Read the last column twice. A prompt is a text file. A RAG pipeline is a system you maintain. A fine-tune is a trained artifact tied to a specific base model. Each step up buys you something, and each step up is harder to undo.
Run this 30-case test before you decide anything
You cannot diagnose a failure you haven’t measured. So the first move is to build a small evaluation set rather than pick an architecture.
Collect 30 to 50 real inputs your system will face: actual customer emails, actual documents, actual questions. Include the awkward ones. For each, write down what a good answer looks like. Then run them through your best current prompt and grade every output.
Now tag each failure with one of four labels:
- Misunderstood: the model did the wrong task, ignored an instruction, or produced the wrong shape of output.
- Missing facts: the answer needed information the model couldn’t have known.
- Inconsistent: the model gets this right on some runs or some inputs and wrong on others, even with clear instructions.
- Too slow or too expensive: the answers are fine, but the economics or latency won’t survive real traffic.
The tally tells you what to build. Mostly label 1, keep working on the prompt. Mostly label 2, add retrieval. Labels 3 and 4, once the first two are under control, are where fine-tuning starts to make sense. A small test built from your own workload tells you more than any public leaderboard.
The test also gives you something most teams skip: a way to tell whether a change helped. Without it, every prompt edit and every fine-tune is a guess.
Is the model confused about the task? Fix the prompt
Many teams that conclude “prompting doesn’t work for us” have tried one paragraph of instructions and two rewrites. That is not a fair trial.
A prompt that has actually been tried includes:
- The role and the goal, stated plainly: who the output is for and what it will be used for.
- Explicit rules, including the edge cases from your test set (“If the email contains a refund request and a complaint, classify it as refund”).
- Three to ten worked examples of input and ideal output, chosen to cover the hard cases rather than the easy ones.
- A specified output format, ideally enforced by the API’s structured-output feature. OpenAI and Anthropic both offer one that constrains responses to a JSON schema you supply.
- An instruction for uncertainty: what to do when the answer isn’t clear.
Here’s what that looks like in practice. A vague version:
Summarize this support ticket.A version that removes most “misunderstood” failures:
Summarize this support ticket for a tier-2 engineer who has 10 seconds.
Output exactly three lines:
Problem: (one sentence, the customer's actual issue, not their emotion)
Tried: (what the customer or tier-1 already did, or "Nothing yet")
Ask: (the specific action needed)
If the ticket mentions data loss or a security issue, start with "URGENT: ".The second prompt isn’t clever. It is specific. That is most of prompt engineering.
Also check the model before blaming the method. A small model that fails your test may pass it with a stronger one, and that swap takes minutes. Upgrading the model is still a prompting-tier fix: no new infrastructure, fully reversible.
Move on from prompting when your failures stop being “misunderstood” and start being “it couldn’t have known that.”
Is it missing facts? That’s a retrieval problem
A model knows what was in its training data, frozen at a cutoff date. It does not know your return policy, your product catalog, your contract terms or anything that happened after that cutoff. No prompt wording fixes this, because the information simply isn’t there.
RAG solves it by fetching relevant passages from your own documents at question time and placing them in the prompt. The model answers from what it was just handed, not from memory. For the full mechanics, see a plain-English walkthrough of how retrieval answers from your files.
Choose retrieval when the facts are:
- Private: internal docs, customer records, proprietary research.
- Changing: prices, inventory, policies, anything you’d hate to see quoted out of date.
- Auditable: answers where someone needs to see the source, so you can show which passage the answer came from.
- Permissioned: different users should only see answers drawn from documents they’re allowed to read.
When you can skip RAG and just paste the documents
RAG is a pipeline: parsing, chunking, embeddings, a vector index, a retrieval step. Before building one, ask whether your knowledge fits in the prompt.
Frontier models now commonly accept a few hundred thousand tokens of context, and current Claude models take up to a million. Say your entire knowledge base is a 60-page handbook of roughly 40,000 tokens. You can paste the whole thing into every request, and prompt caching, offered by Anthropic, OpenAI and Google, bills the repeated portion at 90% or more off on subsequent calls.
The paste-everything approach has limits. Per-request cost and latency grow with prompt length. Models tend to use details buried deep in very long contexts less reliably than details near the start or end, a pattern first documented in the 2023 “Lost in the Middle” study and one reason stuffing a long context can backfire. And it breaks down entirely when the corpus is thousands of documents, changes daily or needs per-user permissions.
A workable rule: if the material fits comfortably in context, changes rarely and everyone may see all of it, paste it. If any of those three conditions fails, build retrieval.
When RAG is wrong, check the retrieval first
When a RAG system gives a bad answer, there are two very different causes, and they need opposite fixes.
Open the log for a failed case and look at the passages that were retrieved. If the right passage is not there, you have a retrieval problem: bad chunking, a weak search step, or documents that were parsed badly in the first place. Tables split across chunks and PDFs flattened into scrambled text are frequent offenders, which is why benchmarks like ParseBench, which tests whether document parsers garble your source files, exist at all.
If the right passage is there and the answer is still wrong, retrieval did its job. The model ignored or misread the context, and you’re back to a prompting problem: tell it to answer only from the provided passages, quote them, and say so when the answer isn’t present.
Teams that skip this check often end up fine-tuning a model to fix what was really a chunking bug.
Is the behavior right only some of the time? Now fine-tuning earns a look
Fine-tuning continues training a model on your own examples of inputs and ideal outputs. It changes how the model behaves by default, so you no longer have to describe that behavior in every prompt.
It is the right tool in a handful of specific situations:
- Consistency at scale. Your prompt gets the house style or output structure right 90% of the time, and the remaining 10% across tens of thousands of requests is a real cost. Training on a few hundred clean examples can push that rate up where prompting has plateaued.
- Narrow, repetitive tasks. Classification, extraction, routing, tagging. The task is well defined, the volume is high, and you have plenty of labeled examples.
- Shrinking the model. A large model handles the task well but is too slow or too expensive at volume. You use its outputs as training data for a smaller model, a technique called distillation, and the small model learns this one job.
- A bloated prompt. Your prompt has grown to dozens of examples and a page of rules, and you pay for all of it on every call. Fine-tuning moves that knowledge of the task into the weights.
Notice what is missing from that list: “teach it our products,” “make it smarter” and “fix that one weird edge case.” The last one is a prompt rule or a test case, not a training run.
The bills that arrive after training
The training run is often the cheapest part. The real costs come before and after.
Data. You need a curated set of examples, every one reviewed for correctness. OpenAI’s fine-tuning guide accepts as few as 10 and recommends starting with 50 well-crafted examples, then evaluating before adding more. Consistency work at scale often needs far more. The model learns your mistakes as faithfully as your successes. Twenty sloppy examples can teach a habit you then spend weeks removing.
Lifecycle. A hosted fine-tune is tied to a specific base model, and providers retire older models on their own schedules. OpenAI’s deprecations page, for example, says fine-tuned models follow the same shutdown schedule as their base models. When yours goes, you rebuild the fine-tune on the successor and re-run your evaluation. Open-weight models avoid that dependency because you control the weights, at the price of hosting them yourself. Whether that trade is worth it depends on how close open-weight models now come to the closed leaders.
Narrowing. A model trained hard on one task can get worse at things outside it. That’s acceptable for a dedicated classifier. It is a problem if the same model also has to handle general questions.
Iteration speed. A prompt change goes live in minutes. A behavior change in a fine-tuned model means editing data, retraining and re-evaluating. For a product whose requirements still shift weekly, that slowness is a real cost.
Fine-tuning vs RAG for facts: why training in knowledge backfires
Back to the opening request: fine-tune on the docs so the model knows the products. Here’s why that usually disappoints.
Fine-tuning is good at teaching patterns, such as the tone, structure and type of answer. It is unreliable at storing specific facts for exact recall. Train a model on your product sheets and it learns what your product answers sound like. Ask it a precise question and it may produce a fluent, confident, on-brand answer with the wrong number in it. That is worse than “I don’t know,” because nothing in the output signals the error.
Then the facts change. A price moves, a feature ships, a policy is rewritten. With RAG, you edit a document and the next answer reflects it. With a fine-tune, the old fact is baked into the weights until you retrain, and even then there’s no guarantee the new fact fully replaces the old one.
RAG also gives you something fine-tuning can’t: a source. You can show the passage an answer came from, check it and fix it. A fine-tuned model’s knowledge has no citation trail.
So in the fine-tuning vs RAG question for knowledge, retrieval wins almost every time. Fine-tuning’s legitimate role is shaping how the model uses retrieved facts, which comes up again below.
The cost math at 100,000 requests a month
Fine-tuning’s strongest case is economic, so run the numbers. Every price here is hypothetical, chosen to make the arithmetic clear. Plug in your provider’s current rates before deciding anything.
The job: classify incoming support emails, 100,000 a month. Each email averages 300 tokens; each output is 50 tokens.
Option A: a large model with a long prompt. The prompt carries 4,000 tokens of rules and examples. Assume $3 per million input tokens and $15 per million output tokens.
- Input: 4,300 tokens × 100,000 = 430 million tokens = $1,290
- Output: 50 tokens × 100,000 = 5 million tokens = $75
- Total: $1,365 a month
Option A with prompt caching. The 4,000-token block is identical on every call. Assume cached input costs 90% less, at $0.30 per million.
- Cached: 400 million tokens = $120
- Uncached email text: 30 million tokens = $90
- Output: $75
- Total: $285 a month
That one setting cut the bill by almost 80%, with no training and no new data. Real caching discounts, minimums and expiry rules vary by provider (here is how cache hits and misses add up over a month), but this is why “the prompt is too expensive” deserves a second look before anyone starts labeling data.
Option B: a fine-tuned small model. The rules now live in the weights, so the prompt drops to the email plus 50 tokens of instruction. Assume $0.40 per million input tokens and $1.60 per million output tokens.
- Input: 350 tokens × 100,000 = 35 million tokens = $14
- Output: 5 million tokens = $8
- Total: $22 a month
Option B saves $263 a month against cached Option A. Now add the upfront cost. Say curating and reviewing 1,500 examples takes 25 hours at $60 an hour, which is $1,500, plus $200 for training. At $1,700 upfront, break-even arrives in about six and a half months.
At 10,000 requests a month, the savings fall to roughly $26 a month and break-even stretches past five years. If the base model is retired in the meantime, you pay the upfront cost again.
The pattern holds whatever the actual prices are. Fine-tuning for cost pays off at high, steady volume on a stable task. At low volume, or on a task that keeps changing, a well-cached prompt wins. And small base models keep getting cheaper. At Claude Haiku 5.5’s list prices of $0.10 per million input tokens and $0.50 per million output, the cached Option A setup would run roughly $10 to $12 a month with thinking turned off, allowing for its tokenizer counting about 30% more tokens. If a prompted small model passes your evaluation set, it can close most of the gap without any training.
Most production systems end up using two
These options stack. Every system has a prompt, so the real question is what you add on top of it.
Prompt plus RAG is the default for anything knowledge-heavy: internal assistants, documentation bots, customer support that quotes policy. Retrieval supplies the facts, and the prompt sets the rules for using them.
Prompt plus fine-tune fits narrow, high-volume, fact-free work: classifying, routing, reformatting, extracting fields from a known document type.
RAG plus fine-tune is the advanced case, and the division of labor matters. Retrieval still supplies the facts. The fine-tune teaches behavior: always cite the passage, refuse cleanly when the answer isn’t in the context, keep to a strict answer structure. That is fine-tuning doing what it does well, which is shaping how the model behaves around the facts rather than storing them.
Picture a legal-intake assistant for a small firm. Retrieval pulls the relevant practice-area notes and fee policy. A small fine-tuned model turns each conversation into a fixed intake summary the paralegals can scan in seconds. The prompt handles everything else. Each layer fixes one failure, and you can find which layer broke by checking your test cases against each one.
The order still matters. Teams that build RAG and fine-tuning together on day one can’t tell which layer is responsible when something goes wrong. Add one layer, test, then add the next.
Fix it at the cheapest layer that passes
The decision comes down to one rule: fix each failure at the cheapest layer that makes your test cases pass, then stop.
Misunderstood tasks go to the prompt or a stronger model. Missing facts go to retrieval, or to pasting the documents if they fit. Inconsistent behavior at scale, or a cost problem that caching can’t solve, goes to fine-tuning, once you have the data and the volume to justify it.
Before you approve a fine-tuning project, ask for one thing: the specific failing cases from your evaluation set that the fine-tune is meant to fix. If nobody can produce them, the project isn’t ready for fine-tuning.
