RAG and fine-tuning solve different problems. Retrieval-augmented generation (RAG) gives a model access to your documents at the moment it answers, so it fixes missing or outdated knowledge. Fine-tuning changes how the model behaves, so it fixes format, tone and narrow tasks the model keeps getting wrong. For most US mid-size companies building on hosted models, RAG is the default in 2026, and fine-tuning is a targeted tool for a few specific cases.
This guide gives you a decision rule, what each option costs to build and run, and one change most comparisons miss: fine-tuning closed models has become much harder to get.
The short answer
- Start with prompting. If a well-written prompt passes your tests, stop there.
- If the model is missing knowledge, use RAG. If the whole knowledge base fits in under about 200,000 tokens, you can often place it in the prompt instead.
- If the model knows enough but gets the format, tone or a narrow task wrong, and prompting with examples has failed, consider fine-tuning.
- Many production systems use both: RAG for facts, fine-tuning or prompt examples for behavior.
- OpenAI is winding down its fine-tuning platform and the Claude API doesn’t offer fine-tuning, so new fine-tuning projects usually mean an open-weight model.
What each option changes
| Prompting | Long context | RAG | Fine-tuning | |
|---|---|---|---|---|
| What it changes | The instructions the model follows | What the model reads with each request | What the model can look up when it answers | How the model behaves by default |
| Best for | Most tasks, as a first step | Small, stable knowledge bases | Large or changing knowledge, per-user permissions | Strict formats, tone, narrow classification tasks |
| What you need | Clear instructions and examples | A knowledge base under about 200,000 tokens | Documents, a search index and a retrieval pipeline | Several hundred or more high-quality labeled examples |
| Updating it | Edit the prompt | Edit the documents | Re-index changed documents | Train again |
| Main risk | Long, fragile prompts | Cost and latency per request | Retrieval misses the right passage | Outdated knowledge and dependence on one model |
Anthropic’s engineers note that if your knowledge base is smaller than 200,000 tokens, “you can just include the entire knowledge base in the prompt” (Anthropic, Contextual Retrieval). Prompt caching, which both major model providers discount heavily, keeps the cost of resending that material down. For anything larger, or anything that changes often, RAG is the practical choice. Databricks recommends “at minimum several hundred high quality examples” before fine-tuning makes sense (Databricks).
What the research says about knowledge
Fine-tuning is often sold as a way to teach a model your company’s facts. Research points the other way. In a Microsoft study comparing the two for adding knowledge to a model, the authors found that while fine-tuning offers some improvement, “RAG consistently outperforms it, both for existing knowledge encountered during training and entirely new knowledge” (Ovadia et al., Microsoft).
Fine-tuning does well where the problem is behavior. In Anthropic’s own test, fine-tuning a small Claude model for a classification task “improved classification accuracy from 81.5% to 99.6% while reducing tokens per query by 85%” (Anthropic). That is the pattern to look for: a narrow, repeated task with a clear right answer.
The 2026 change: fine-tuning closed models is getting harder
Most comparison guides were written before this shift, and it changes the decision for teams that build on hosted models.
- OpenAI is winding down its fine-tuning platform. Since May 7, 2026, organizations that had never fine-tuned can’t create fine-tuning jobs, and from January 6, 2027, “active existing customers will no longer be able to create new fine-tuning jobs.” Existing fine-tuned models keep working until their base model is deprecated (OpenAI deprecations).
- Anthropic states that “the Claude API does not currently offer fine-tuning” (Anthropic glossary). On Amazon Bedrock, fine-tuning is listed for one older, small Claude model (AWS).
In practice, a new fine-tuning project today usually means an open-weight model that you host yourself or through a cloud provider. That adds hosting and upkeep, and it ties your behavior fixes to that model. RAG works with any model, so you can switch providers as prices and quality change.
A decision rule in three questions
1. Does a well-written prompt already pass your tests?
Build a test set of 50 to 100 real questions or tasks with approved answers before you choose anything. If good instructions and a few examples pass it, you don’t need RAG or fine-tuning yet. OpenAI’s own guide says that for many tasks, “the prompt engineering process may be all you need” (OpenAI).
2. Is the model missing knowledge?
If the failures come from facts the model doesn’t have, such as your policies, products, contracts or tickets, add knowledge. Use long context if the material is small and stable. Use RAG if it is large, changes often, or different users may only see different documents, since retrieval can filter by permission before anything reaches the model.
3. Is the problem behavior that prompting can’t fix?
If the model has the facts but keeps breaking a required format, drifting in tone, or misclassifying a narrow set of cases, and examples in the prompt haven’t solved it, fine-tuning is worth testing. Budget for collecting and labeling examples, which usually takes more time from your experts than the training itself.
What RAG and fine-tuning cost
The infrastructure behind RAG is cheap. The engineering around it is where the budget goes.
| Cost item | Published price | What it means in practice |
|---|---|---|
| Embeddings to index your documents | $0.02 per 1M tokens (small model), $0.13 (large model) (OpenAI) | Indexing about 10 million tokens of documents costs $0.20 to $1.30 |
| Adding context to each chunk (Anthropic’s contextual retrieval method) | About $1.02 per 1M document tokens, one time (Anthropic) | About $10 for the same 10 million tokens |
| Vector database | Free starter tier, $20 a month, or a $50 a month minimum on standard plans (Pinecone) | Enough for most mid-size knowledge bases to start |
| Fine-tuning on OpenAI (existing customers only) | $100 per training hour, then $4 input and $16 output per 1M tokens for the fine-tuned model (OpenAI) | Training is billed by the hour, and inference is priced per model |
Prices checked in October 2026 on the providers’ pages.
Engineering time is the bigger number. Using the same method as our AI development cost guide, here are example team plans for each approach:
| Approach | Example team plan | US team ($100-$150/hr) | Nearshore LATAM team ($60-$75/hr) |
|---|---|---|---|
| Prompting or long context, with a test set | 1 engineer, 3 weeks | $12K-$18K | $7K-$9K |
| RAG with permissions and evaluation | 2 engineers, 6 weeks | $48K-$72K | $29K-$36K |
| Fine-tuning an open-weight model, with evaluation and hosting setup | 2 engineers, 8 weeks | $64K-$96K | $38K-$48K |
Rates: US senior developers at $100-$150/hr (Index.dev, 2026); Latin American senior developers at $60-$75/hr (Accelerance 2026 rates guide). These are example plans based on published rates, not a FusionHit quote. The fine-tuning plan excludes the time your own experts spend labeling examples and the GPU hours for training.
Using RAG and fine-tuning together
The two are not exclusive. A common production pattern uses RAG for facts and a fine-tuned or carefully prompted model for behavior: the retriever finds the right policy, and the model answers in the exact format your support team or downstream system expects.
Retrieval quality matters more than most teams expect. In Anthropic’s tests, adding context to each chunk cut failed retrievals by 35%, combining it with keyword search cut them by 49%, and adding a reranking step cut them by 67% (Anthropic). Improving retrieval usually helps more than fine-tuning the model that reads the results.
How to evaluate before you commit budget
Whatever you choose, measure it against the same test set:
- Retrieval accuracy: how often the right passage appears in the top results.
- Faithfulness: whether answers stick to the retrieved sources.
- Task accuracy: correct answers, formats or labels on your test set.
- Permissions: whether users ever see content they shouldn’t.
- Cost and speed: cost per request and response time at expected volume.
Run the test after every change to prompts, documents, models or retrieval settings. Teams that skip this step end up debating opinions instead of numbers.
Where to start
For most mid-size companies, the sequence is the same: a prompt and a test set first, then RAG on the knowledge the model is missing, and fine-tuning only for the narrow cases that still fail. That keeps you free to change model providers, which matters more in 2026 than it did a year ago.
FusionHit’s LLM development team builds RAG systems, evaluation pipelines and fine-tuned models for US companies from Latin America, working in your time zone. If the end goal is a customer-facing assistant, see our guides to chatbot development cost and AI agents vs chatbots. Once a system is live, MLOps keeps retrieval and models monitored and up to date.
Not sure whether your use case needs RAG, fine-tuning or just a better prompt? Bring a sample of your data and a few real questions, and leave with a recommended approach and a test plan. 30 minutes, no commitment.
Frequently asked questions
What is the difference between RAG and fine-tuning?
RAG gives the model access to your documents when it answers, so it changes what the model knows at that moment. Fine-tuning trains the model on examples, so it changes how the model behaves by default. Use RAG for facts and fine-tuning for format, tone or narrow tasks.
Is RAG better than fine-tuning?
For adding knowledge, usually yes. A Microsoft study found that RAG consistently outperformed fine-tuning for both existing and new knowledge. Fine-tuning is better when the model has the facts but keeps getting a format or a narrow task wrong.
Is LLM fine-tuning dead?
No, but it has narrowed. OpenAI is winding down its fine-tuning platform and the Claude API doesn’t offer it, so most new fine-tuning projects use open-weight models. It remains useful for strict formats, classification and other narrow, repeated tasks.
How expensive is it to fine-tune a model?
The training run is often the smaller cost. Most of the budget goes to collecting and labeling several hundred or more examples, evaluating the result, and hosting the model. An example plan of 2 engineers for 8 weeks costs about $38K to $48K with a nearshore team and $64K to $96K with a US team, before labeling time and GPU hours.
Can you use RAG and fine-tuning together?
Yes. A common pattern uses RAG to find the right facts and a fine-tuned or well-prompted model to answer in the required format. Start with RAG and prompting, and add fine-tuning only if tests show a behavior problem they can’t fix.
What is RAG in AI?
RAG, or retrieval-augmented generation, is a way to give a language model information it wasn’t trained on. Before the model answers, a search step finds the most relevant passages in your documents and adds them to the prompt, so the answer is based on your current content.