RAG vs Fine-Tuning vs Prompting: Which One?
A decision guide: when better prompts are enough, when to add retrieval, and when fine-tuning is actually worth the cost.
They solve different problems
| Need | Best first tool |
|---|---|
| Clearer instructions, better format | Prompting (instructions, examples) |
| Answers from private or changing knowledge | RAG (retrieve documents at query time) |
| Consistent style, format or narrow skill at scale | Fine-tuning |
| Lower cost or latency on a narrow task | Fine-tune a smaller model |
Prompting first
It is cheap, fast to iterate and needs no training data. Many problems blamed on the model are fixed with clear instructions, a few examples and a defined output format.
RAG for knowledge
Fine-tuning is a poor way to teach facts: knowledge becomes stale, cannot be cited and is hard to remove. RAG keeps knowledge in documents you can update, filter by permission and cite.
Fine-tuning for behaviour
Fine-tune when you have many good examples (often hundreds to thousands) of the exact input → output behaviour, and prompting cannot reach the quality or cost you need. Techniques such as LoRA make it cheaper.
Often combined
A fine-tuned model that follows your format reliably, plus RAG that supplies current facts, plus a prompt with the task rules.
Finished this note?
