Prompting vs RAG vs fine-tuning
We'll cover the following
The interview question: "the model does not know our data and the tone is off, so let us fine-tune". The answer is a ladder, and fine-tuning is the last rung, not the first.
| Tool | Fixes | Does not fix |
|---|---|---|
| Prompting | Instructions: tone, format, role, examples | Missing knowledge |
| RAG | Missing or changing knowledge, with citations | Style or consistent behavior |
| Fine-tuning | Consistent behavior or style; cheaper and faster calls from a smaller model | Adding facts reliably |
Correction worth remembering: fine-tuning is a poor way to add knowledge. Facts baked into the weights are unreliable, go stale and cannot be cited. For facts, use RAG.
Good fits for fine-tuning
- Brand voice: thousands of past support replies, and "warm but concise" never quite captures it.
- Strict output format: your exact JSON schema or DSL, every time (95% with prompting, 99.9% tuned).
- Classification or routing at scale: ticket categories, intent, moderation, with a small tuned model instead of a big model plus a long prompt.
- Extraction from messy invoices or clinical notes in your house style.
- Text-to-SQL or code for your schema and conventions.
- Distillation: a big model writes good answers, a small model is trained on them for similar quality at a fraction of the cost.
- Domain style: legal clause rewriting, clinical summaries in your template.
- Refusal and escalation behavior for a specific class of requests.
The long-prompt case
A 2,000-token prompt of rules works but is slow and costly on every call. Fine-tuning a small model bakes the rules in, so the prompt becomes short. But try prompt caching first, since it is free to try. Fine-tuning also needs a few hundred to a few thousand good examples, an eval set to prove the tuned model is no worse, and a retrain whenever the rules change.
Check yourselfThe product team wants to fine-tune so the bot knows this quarter's pricing. Your answer?
No. Pricing changes, and fine-tuned facts go stale and cannot be cited. Put pricing in a RAG index (or a tool call) and use fine-tuning only for style or format.
Summary: say it in the interview
- "If I would have to paste 20 examples into the prompt to show what I want, that is a fine-tuning candidate. If the facts change weekly, that is RAG."
- "Prompt first, RAG for knowledge, fine-tune for behavior or cost once I have an eval and enough examples."