Lesson 1.4 · 7 min read · about 50 min to master at a very slow pace
Prompting, RAG or Fine-tuning?
The three ways to adapt an LLM to a client's problem, what each one changes, and a simple decision rule: prompt first, add retrieval for knowledge, fine-tune only for behaviour you cannot prompt.
Three levers
| Approach | What it changes | Good for | Cost to change |
|---|---|---|---|
| Prompting | The instructions and examples | Format, tone, rules, simple tasks | Minutes |
| RAG | The facts the model sees for each request | Private, large or changing knowledge; citations | Update the index |
| Fine-tuning | The model's weights | Consistent style or format at scale; narrow skills; smaller cheaper models | New dataset and training run |
Knowledge versus behaviour
The most useful question is: is the model missing knowledge, or doing the wrong thing?
- Missing knowledge (the client's policies, products, contracts, last week's prices): use RAG. Fine-tuning is a poor way to store facts: they are hard to update, cannot be cited, and the model still blends them with invented ones.
- Wrong behaviour (wrong format, wrong tone, ignores a rule): fix the prompt first. If the prompt works but is huge, or a smaller model needs to copy a large model's behaviour, consider fine-tuning.
The default path
- Write the prompt and a small eval set (Section 5). Measure.
- If answers lack facts, add retrieval. Measure again.
- If behaviour is still inconsistent after real prompt work, collect a few hundred good examples and fine-tune. Measure again.
Three client requests
- "Answer staff questions from our 2,000-page HR handbook, which changes monthly." → RAG: large, private, changing, needs citations.
- "Turn sales call notes into our CRM format." → Prompting with structured output; fine-tune later only if volume makes a smaller model worth it.
- "Write product descriptions exactly in our brand voice, 50,000 per month." → Prompt first; at that volume, fine-tuning a smaller model on approved examples can cut cost and improve consistency.
The common mistake
"We need to train the model on our documents" is usually a request for RAG, not fine-tuning. Clarify with the client what they want: answers grounded in their documents, with sources.
Stuck? Common doubts
Questions real learners asked while studying this lesson. They stay closed so they don't spoil your own thinking: open only the ones you need.
First passCan I combine RAG and fine-tuning?
Yes. A fine-tuned model can still receive retrieved documents. For example, you might fine-tune a small model to always answer in a strict citation format and use RAG to supply the facts. Start with one change at a time so your evals show which one helped.
Going deeperDoesn't a long-context model make RAG unnecessary for small document sets?
For a few dozen pages that rarely change, putting everything in the prompt (with prompt caching) can be simpler than building retrieval. Measure cost and accuracy. Once the documents grow, change often, or need access control per user, retrieval wins.
Cheatsheet
Prompting vs RAG vs fine-tuning
Knowledge or behaviour?
"Train it on our docs"
Check your understanding
Score 75% or more to master this lesson and earn XP. Answer first, then check.