# 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.

- Source: https://akshaythakare.com/notes/llms/rag-vs-fine-tuning
- Topic: LLMs
- Level: intermediate
- Reading time: 2 min
- Tags: llm, rag, fine-tuning, architecture, interview
- Updated: 2026-10-11

## 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.

> **Tip: Interview framing**
>
> "Prompting for instructions, RAG for knowledge, fine-tuning for behaviour. I start with prompting and an evaluation set, and only fine-tune when the evals show a gap that the other two cannot close."
