Fine-Tuning
Fine-tuning continues training a pretrained model on your own examples so it internalizes a specific behavior, style, or format. Where prompting instructs a general model at request time, fine-tuning changes the model's weights to bake in patterns — useful when you need consistent behavior, a particular voice, or a smaller/cheaper model that punches above its weight on a narrow task.
The honest framing for most teams: fine-tuning is rarely the first move. Prompting and RAG solve a large share of problems faster and cheaper, and they don't require labeled data or a training pipeline. Fine-tuning earns its place for specific, well-defined tasks with quality data — and it changes behavior, not knowledge (use RAG for knowledge).
TL;DR
- Fine-tuning changes model weights to specialize behavior, style, or format.
- Reach for it after prompting and RAG — not first.
- It adapts behavior, not knowledge — use RAG for facts.
- Needs quality labeled data and evaluation; it has real cost and risk.
Quick Example
The decision usually comes down to what you're trying to change:
What Fine-Tuning Does (and Doesn't)
Fine-tuning shifts the model toward patterns in your training examples — tone, format, task-specific behavior, domain phrasing. It does not reliably teach new facts: cramming a knowledge base into fine-tuning data is inefficient and prone to hallucination, and it goes stale the moment the facts change. For up-to-date or private knowledge, RAG is the right tool.
When to Use Each Approach
💡 Try prompting first, then RAG for knowledge. Fine-tune only when those fall short and you have quality data and a way to measure improvement.
What Fine-Tuning Requires
- Quality labeled data — enough representative input→output examples; garbage in, garbage out.
- A held-out evaluation set — to prove the fine-tuned model actually beats the baseline.
- A training pipeline — and the budget/time for training runs and iteration.
- Maintenance — re-tuning as requirements and data shift.
LoRA / PEFT (parameter-efficient fine-tuning) trains a small set of adapter weights instead of the whole model, dramatically cutting compute and storage — the practical default for most fine-tuning today.
Best Practices
- Exhaust prompting and RAG first — confirm fine-tuning is the right lever.
- Curate data quality over quantity — clean, representative examples beat volume.
- Hold out an eval set and measure against the un-tuned baseline before shipping.
- Use LoRA/PEFT to keep cost and iteration time down.
- Don't fine-tune for knowledge — use RAG so facts stay current and citable.
Common Mistakes
Fine-tuning to add knowledge
Fine-tuning without an eval set
FAQ
Should I fine-tune or use prompting/RAG?
Start with prompting — it's instant, needs no data, and handles a surprising amount. Add RAG when you need the model to use private or current knowledge. Reach for fine-tuning only when you need consistent behavior, style, or format that prompting can't reliably achieve, or a smaller/cheaper model specialized for one narrow, high-volume task — and you have quality labeled data plus a way to measure improvement. Most teams never need to fine-tune.
Can fine-tuning teach a model new facts?
Not reliably. Fine-tuning adjusts behavior and patterns, not a knowledge store — facts crammed into training data are learned unevenly, prone to hallucination, and frozen at training time (stale the moment they change). For factual, current, or private knowledge, retrieval-augmented generation is the correct approach: it supplies the facts at query time, keeps them current, and lets you cite sources. Use fine-tuning for how the model responds, RAG for what it knows.
What is LoRA / parameter-efficient fine-tuning?
LoRA (Low-Rank Adaptation) and other PEFT methods fine-tune only a small set of added "adapter" weights instead of updating the entire model. This slashes the compute, memory, and storage required — you can train on far less hardware and keep many lightweight adapters for different tasks. It's the practical default for most fine-tuning today, delivering most of the benefit of full fine-tuning at a fraction of the cost.
How much data do I need to fine-tune?
It depends on the task, but quality and representativeness matter far more than raw volume — a few hundred to a few thousand clean, well-labeled examples often outperform a huge noisy dataset. Crucially, you also need a separate held-out evaluation set to prove the fine-tuned model actually beats the baseline. If you can't assemble quality labeled data and a way to measure improvement, you're not ready to fine-tune — refine prompting/RAG instead.
Related Topics
- Large Language Models — What you're adapting
- Retrieval-Augmented Generation (RAG) — The right tool for knowledge
- Prompt Engineering — Try this first
- Model Evaluation — Proving a fine-tune helped
- NLP — Fine-tuning vs prompting in context