Prompt → RAG → fine-tune: the decision
Climb only as high as you must: prompt, few-shot, RAG for missing knowledge, fine-tuning for behavior, format or cost. RAG adds facts; fine-tuning changes form. Pretraining is almost never the answer.
Analogy: Onboarding a new hire: first clear instructions, then a few worked examples, then access to the wiki. You only pay for a months-long course when the job needs a new skill, not a new fact.
How it works
- Rungs run cheapest first; climb one only when your eval set shows the one below has plateaued.
- RAG covers missing knowledge (private, fresh or citable facts): you update an index, not weights.
- Fine-tuning is a poor fact store: facts are learned slowly, can't be cited or deleted, and go stale.
- Distillation cuts cost: a small model fine-tuned on frontier outputs can match the big one on your task.
- The rungs stack rather than replace: mature systems often combine prompt, RAG and a fine-tuned small model.
Check yourself
Answer to mark it learned; your answers aren't scored.
Claims triage with prompt + few-shot + RAG over policy docs scores 88% on your eval set. Remaining errors are the internal 40-code taxonomy and the terse house style; policies change weekly, and the frontier bill is high at 1.5M claims a month. Next rung?
Go deeper
Full explanation
The adaptation ladder ranks the ways to make a model fit your task, cheapest first. Climb a rung only when your eval set shows the one below has plateaued.
- Prompting (Anatomy of a prompt): instructions, constraints, output schema. Zero training data; changes ship in minutes.
- Few-shot (Zero-shot vs few-shot prompting): 3–10 examples in the prompt teach format and edge cases.
- RAG (RAG (Retrieval-Augmented Generation)): the model lacks knowledge: private, fresh or citable facts. You update an index, not weights.
- Fine-tuning (Supervised fine-tuning (SFT), LoRA & QLoRA, DPO & preference optimization): the model lacks behavior: a strict format, house style, a narrow task done consistently. Or you want to shrink: Knowledge distillation into a small model that matches the big one on your task at a fraction of the cost and latency.
- Continued pretraining (Continued pretraining): billions of tokens of a new language or domain (legal, biomedical).
- Training from scratch: trillions of tokens and millions of dollars. Almost never you.
The rule: RAG for knowledge, fine-tuning for form. Fine-tuning is a poor way to add facts: they are learned slowly, can't be cited or deleted, and go stale with the next update. The rungs stack rather than replace each other: mature systems are often prompt + RAG + a fine-tuned small model.
Real example
An insurer builds claims triage. Prompt + few-shot on a frontier model scores 76% on a 300-claim eval set; most failures are missing policy rules, so they add RAG over 4,000 policy documents: 88%. The remaining errors are the internal 40-code taxonomy and the terse adjuster style, and the bill is ~$30k/month at 1.5M claims. They fine-tune an 8B model with LoRA on 8,000 filtered frontier outputs: 89%, ~12× cheaper, half the latency. Policies change weekly, so RAG stays and feeds the fine-tuned model.
Trade-offs +3 · −3
+ You gain
- Cheapest rung first keeps iteration in minutes, not weeks.
- Every rung is scored on the same eval set, so climbing is a measured decision, not a hunch.
- Keeping knowledge in RAG and form in weights lets facts update daily with no retraining.
− You pay
- Nothing is decidable without an eval set, and most teams skip building one.
- Higher rungs create ownership: data pipelines, training runs and model versions to maintain.
- The order is a default, not a law: a pure format problem can skip RAG entirely.
Use it when
Whenever someone proposes fine-tuning, or a prompt-only prototype plateaus and you must pick the next investment.
Avoid it when
Don't walk it rung by rung when the answer is obvious: a 10× cost target at millions of calls a day justifies planning distillation from day one.
Numbers to know 4
- LIMA: ~1,000 curated examples taught LLaMA-65B the assistant format (Zhou et al., 2023).
- InstructGPT: labelers preferred a 1.3B tuned model over 175B GPT-3. Adaptation can beat size.
- Price gap between a frontier model and its small sibling: often ~10–20× per token (GPT-4o vs GPT-4o mini was ~16× at late-2024 list prices).
- OpenAI's SFT guide: at least 10 examples, gains usually from 50–100 (its platform closed to new users in 2026).
Common pitfalls 4
- Fine-tuning to teach facts: learned slowly, impossible to cite, stale on the next update. That's RAG's job.
- Climbing without an eval set: you can't tell whether the new rung helped or just moved the failures.
- Skipping prompt work: many "we need fine-tuning" cases are fixed by clearer instructions and five good examples.
- Forgetting upkeep: a fine-tune is tied to a base model that will be deprecated. Budget the retrain.
Interview questions 3
Answer out loud first, then reveal.
A PM says: "Let's fine-tune on our docs so the model knows our product." What do you say?Show answer
I'd steer that to RAG. Fine-tuning is a weak way to add facts: new facts are learned slowly and raise hallucination, the model can't cite a source, and every doc change means a retrain. RAG updates when the index updates and gives me citations and per-user permissions. Where I would fine-tune is behavior: if, after RAG, answers are right but the format, tone or a narrow task is unreliable, or if we need to cut cost by moving to a smaller model.
When is fine-tuning clearly worth it?Show answer
Three cases. Form: a strict format, house style or taxonomy that prompting can't hold across thousands of calls. Cost and latency: a high-volume narrow task where a fine-tuned 8B model matches the frontier model at ~10× lower price per token. Long prompts: if every call carries 3,000 tokens of instructions and examples, baking them into weights cuts input cost and latency. In all three I need hundreds to thousands of good examples, an eval set, and a budget to retrain when the base model is retired.
Can you combine RAG and fine-tuning?Show answer
Yes, and mature systems usually do: retrieval supplies the facts at query time, fine-tuning supplies the behavior. A pattern I like is fine-tuning a small model on RAG-style inputs, so it learns our answer format, to cite the passages it was given and to say "not in the documents" instead of guessing. RAFT formalized this by training with distractor documents. What I avoid is putting facts into weights and dropping retrieval: I'd lose citations, permissions and freshness.
Deep dive 3
Data, cost and upkeep per rung
- Prompt / few-shot: zero training examples, ~50–200 eval cases (rule of thumb). Cost is tokens per call; cache long prefixes with Prompt caching. Upkeep: version prompts and re-run evals on every model upgrade.
- RAG: a corpus plus an ingestion pipeline; weeks to build well. Upkeep: index freshness, permissions, retrieval evals.
- Fine-tuning: hundreds to tens of thousands of curated examples; a LoRA run on an 8B model takes GPU-hours, not weeks. Upkeep: you now own a model version, retrained when the base is deprecated or the data drifts.
- Continued pretraining: billions of tokens, a multi-GPU cluster and an ML team.
- From scratch: trillions of tokens and a frontier-lab budget.
Why fine-tuning is bad at facts
The research agrees. Ovadia et al. (2023) found RAG consistently beat unsupervised fine-tuning for injecting knowledge, both new and previously seen. Gekhman et al. (2024) found models learn genuinely new facts through fine-tuning slowly, and once they do, their tendency to hallucinate rises. Add the operational reasons: no citations, no per-user permissions, no way to delete one fact (think GDPR), and a retrain for every update. Fine-tuning on top of retrieval is different and useful: RAFT trains the model to use retrieved documents and ignore distractors.
The shrink play
The most common business reason to fine-tune is cost, not quality. Route a narrow, high-volume task (classification, extraction, triage) through a frontier model, log ~5k–50k inputs and outputs, filter them with your eval, and fine-tune a small model on them. Small models are often ~10–20× cheaper per token, faster, and can be self-hosted. The payback is volume: at a few thousand calls a day the training and upkeep rarely pay off; at millions a day they can pay off in weeks. Check the provider's terms before training on its outputs.