ExpertLesson 2 of 611 min read
Fine-tuning: specialising a model without missing the mark
A course from the Academy: Building with AI: the engineering level
Go to the quiz ↓Fine-tuning, retraining an existing model on your own examples, sounds appealing: “a model that knows my company.” The reality is more nuanced: it’s a powerful tool for some problems, and a false good idea for many others.
What fine-tuning does well
- Style and format. Consistently responding in your brand voice, producing exact JSON, following a precise report structure.
- Repetitive know-how. Classifying tickets according to your grid, extracting fields from your documents, adopting your industry’s vocabulary.
What it does poorly
Injecting knowledge. Getting it to “learn” your product catalogue or documentation via fine-tuning is unreliable: facts get diluted and become hard to update. For fresh, verifiable knowledge, RAG (next lesson) is almost always the right tool.
The decision scale
Before fine-tuning, exhaust the cheaper options, in order: 1. a better prompt (precise instructions, included examples), 2. few-shot (showing 3-5 examples in the query), 3. RAG (plugging in your documents). Fine-tuning only comes in at 4, when the first three hit their ceiling and you have hundreds of quality examples.
LoRA: lightweight fine-tuning
Retraining all parameters is expensive. LoRA freezes the model and only trains small added modules (adapters), i.e. a fraction of 1% of parameters: cheaper, faster, and the adapter is shared like a small file you can activate or remove at will. It has become the standard method.
The dataset is everything
The golden rule: quality beats quantity. Three hundred flawless examples beat ten thousand mediocre ones: the model also learns your errors, inconsistencies, and biases. And keep a separate test set to verify, before and after, that the specialised model hasn’t regressed elsewhere (“catastrophic forgetting” is real).
Key takeaways
- Fine-tuning = style, format, repetitive know-how. Not knowledge injection.
- Escalation order: prompt, few-shot, RAG, and only then fine-tuning.
- LoRA makes fine-tuning affordable by training only small adapters.
- A small impeccable dataset beats a large mediocre one.
Key concepts
Complete the lesson
A 4-question quiz: 3 correct answers are enough, plus an exercise to practise. It opens in the Academy, on this same lesson.
Take the quiz and complete the lesson Free. With an account, your progress is saved and leads to the course certificate.The course: Building with AI: the engineering level
- API or local model: choosing your engine11 min
- Fine-tuning: specialising a model without missing the mark11 min
- A RAG that holds up in production12 min
- Building an agent: tools, loop, guardrails12 min
- Security: prompt injections and sensitive data10 min
- Assessing what you build: the quality loop11 min