Fine-Tuning vs RAG vs Prompting: 2026 Decision Framework
AI & ML
By Syed Sartaj Ahmed · 7/28/2026 · 9 min read

Fine-tuning vs RAG vs prompt engineering stops being confusing the moment you ask the right question: what are you trying to change? Knowledge belongs in the context window (RAG). Behavior, format and tone belong in prompts first, weights second (SFT). And in 2026 the market itself cast a vote: OpenAI is winding down its self-serve fine-tuning platform — closed to new users since May, with new training jobs ending January 2027 — citing more capable base models plus prompting, RAG and tools as the preferred paths. Here's the decision framework I actually use, with verified costs.
The news that reframes the debate
OpenAI's fine-tuning wind-down isn't an isolated signal. The GPT-5 family was never fine-tunable. Anthropic offers no first-party fine-tuning beyond Claude 3 Haiku on Amazon Bedrock (a 2024 offering). The closed platforms are converging on the same message their docs have carried for years: prompt engineering may be all you need, retrieval for knowledge, and fine-tune only for persistent behavioral gaps — measured by evals first. Meanwhile fine-tuning didn't die; it moved to open weights, where it's cheaper and more controllable than it has ever been.
The decision: what are you trying to change?
- The model's knowledge (your docs, fresh data, per-user content) → RAG. Knowledge outside the weights is updatable, per-user permissioned and citable. Trying to bake it in is the classic mistake — see the evidence below.
- Behavior, format, tone (strict JSON, house style, task rituals) → prompting first, then SFT. If drift persists at scale, supervised fine-tuning is what actually works — and it starts at ~50 good examples, not thousands (OpenAI's own guidance; Anthropic's Bedrock floor is 50).
- Reasoning on one narrow, gradeable task → RFT. Reinforcement fine-tuning against a programmatic grader — and no longer a closed-lab exclusive: Amazon Bedrock shipped RFT for open-weight models (Qwen3-32B, gpt-oss-20B) in February 2026.
- Cost and latency at volume → distill. Generate training data with the frontier model, fine-tune a small open model on it. A hosted 70B LoRA run on 10M training tokens costs about $29 on Together AI ($2.90/1M tokens at that size). Cost stopped being the objection years ago.
- Squeezing accuracy out of prompts you already have → DSPy. Optimizers like MIPROv2 and GEPA tune prompts against your eval set automatically — fine-tuning-like gains with zero weight changes. v3.2, 36k GitHub stars, real production adoption.
The evidence: fine-tuning doesn't add knowledge (reliably)
The citation everyone gets wrong: Gekhman et al., EMNLP 2024 — "Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?" Models learn genuinely-new facts from fine-tuning slower than they learn to hallucinate, and as the new facts are eventually absorbed, hallucination on previously-known material increases roughly linearly. Fine-tuning teaches behavior; it degrades knowledge boundaries. Knowledge goes in the context window — that's not a preference, it's measured.
Where fine-tuning actually lives now: open weights
The 2026 go-to bases: Qwen3 (Apache 2.0, the strongest open family), Llama 4, Mistral Large 3, Gemma 3 27B for single-GPU work. The default recipe — QLoRA (4-bit quantization + LoRA adapters) with Unsloth on one GPU or Axolotl/TRL for multi-GPU — fits a 70B fine-tune on a single 24 GB card, and a rented H100 finishes a 70B run in under three hours. The "you need millions of examples and a cluster" era is simply over: 50–10,000 examples, tens of dollars, an afternoon.
The order of operations (spend in this sequence)
- Evals first. You can't improve what you can't measure — OpenAI's rule is explicit: only invest in fine-tuning after evals exist.
- Prompting + RAG. Covers knowledge, format and most behavior — and it's reversible in minutes, not training runs.
- Optimize what you have. DSPy-style prompt optimization against the eval set; try a cheaper model where it passes.
- Fine-tune last. When the gap is behavioral, persistent and measured — SFT or RFT on open weights (or distill for scale economics).
FAQ
Should I fine-tune or use RAG for a chatbot on my docs?
RAG. Your docs are knowledge — they change, they need citations, and different users may see different subsets. Fine-tuning on them measurably increases hallucination risk. Fine-tune only if the bot's style or format stays wrong after serious prompt work.
How many examples does fine-tuning need in 2026?
Far fewer than folklore says: OpenAI recommends starting around 50 well-crafted demonstrations, with clear gains typically at 50–100; Bedrock's Haiku fine-tuning accepts 50–10,000.
Can I fine-tune GPT-5 or the latest Claude?
No. GPT-5-family models were never fine-tunable and OpenAI's platform is winding down entirely; Anthropic's only offering is Claude 3 Haiku via Bedrock. Modern fine-tuning means open weights.
How much does LLM fine-tuning cost in 2026?
Hosted LoRA SFT: $0.48/1M training tokens up to 16B models, $2.90/1M at 70B — so tens of dollars for typical jobs. Self-run QLoRA on a rented GPU is similar. The real cost is building the eval set and dataset, not the compute.
Deciding between these paths for a real product? Get in touch — I've shipped all four. Related: is RAG dead? and LLM evals in production.
Tags: Fine-Tuning, RAG, Prompt Engineering, LLM, DSPy