# Prompting vs RAG vs Fine-Tuning

> A decision framework for picking the cheapest technique that solves the problem, and recognizing when fine-tuning actually pays off. Free notes, key concepts,...

Canonical: https://www.internhack.in/roadmaps/tracks/ai-engineer/when-to-fine-tune
Last updated: 2026-11-28

A decision framework for picking the cheapest technique that solves the problem, and recognizing when fine-tuning actually pays off.

Intermediate · about 2 hours · difficulty 2/5

Learn first: [RAG Fundamentals](https://www.internhack.in/roadmaps/tracks/ai-engineer/rag-basics), [Why and How to Evaluate LLM Apps](https://www.internhack.in/roadmaps/tracks/ai-engineer/eval-fundamentals)

Fine-tuning is often the first idea and rarely the right first step. The three main levers solve different problems.

### What each lever changes

- **Prompting** changes instructions and examples at request time. Fast to iterate, zero training cost. Try this first, always.
- **RAG** gives the model **knowledge** it does not have: your documents, fresh data, per-user content. Knowledge changes daily; retrieval handles that, training does not.
- **Fine-tuning** changes **behaviour**: a consistent format or style, a narrow classification task, domain jargon, or making a small model perform like a large one on one task.

### Good reasons to fine-tune

- You have a well-defined, high-volume task and want **lower cost and latency** with a smaller model.
- Prompts have become huge because of many examples, and you want that behaviour baked in.
- You need a style or format that prompting cannot make reliable.
- You must run a model on-premise or on-device and it needs a boost on your task.

### Bad reasons

- "The model does not know our product" (use RAG).
- You have no eval set, so you cannot tell whether training helped.
- You have fewer than a few hundred good examples and have not tried few-shot prompting.

### Costs to remember

Data collection and cleaning, training runs, hosting a custom model, re-training when base models improve, and losing easy access to newer base models.

### Good enough to move on

Given a product problem, you can argue which lever to use first, what evidence would justify fine-tuning, and how you would measure success.

## Key concepts

- **Knowledge vs behaviour problems**
- **Prompting first**
- **When RAG is the answer**
- **Cost and latency motivations**
- **Hidden costs of custom models**

## Mini project

Write a one-page decision memo for three scenarios (a support bot over changing docs, a high-volume ticket classifier, and a brand voice writer) recommending prompting, RAG or fine-tuning with the evidence you would collect.

## Check yourself

Why is fine-tuning a poor way to teach a model your company's latest pricing?

## Free resources

- [OpenAI docs: model optimization](https://platform.openai.com/docs/guides/model-optimization) (OpenAI)
- [Hugging Face LLM Course](https://huggingface.co/learn/llm-course) (Hugging Face)

Previous: [Bias, Hallucination and Responsible AI](https://www.internhack.in/roadmaps/tracks/ai-engineer/responsible-ai) · Next: [Preparing Fine-Tuning Datasets](https://www.internhack.in/roadmaps/tracks/ai-engineer/fine-tuning-data)

## More in Fine-Tuning and Model Customization

- [Prompting vs RAG vs Fine-Tuning](https://www.internhack.in/roadmaps/tracks/ai-engineer/when-to-fine-tune)
- [Preparing Fine-Tuning Datasets](https://www.internhack.in/roadmaps/tracks/ai-engineer/fine-tuning-data)
- [Hosted Fine-Tuning Services](https://www.internhack.in/roadmaps/tracks/ai-engineer/hosted-fine-tuning)
- [LoRA and Parameter-Efficient Fine-Tuning](https://www.internhack.in/roadmaps/tracks/ai-engineer/lora-peft)
- [Distillation and Small Models](https://www.internhack.in/roadmaps/tracks/ai-engineer/distillation)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [AI Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/ai-engineer)
