What is Fine-tuning?
Fine-tuning is extra training on a model that already works: you show it your input→output examples so habits like format and tone get baked into the weights — not a way to paste a wiki into the network.
Explain like I'm new to AI
Pretraining taught the model language. Fine-tuning is sending that graduate to your job: a few hundred to a few thousand examples of "when the user says X, answer like Y."
The weights move a little. Afterward, you don't have to repeat a 2,000-token style guide every call (or it works more reliably when you do).
(input → desired output)
Weights move a little. Facts you stuff in still go stale — that's what RAG is for.
It is not how you add next week's prices. Those belong in RAG. Fine-tuning for facts goes stale, can't cite, and often makes the model confidently wrong.
Mental model
A chef who already knows how to cook. Fine-tuning is stage practice for your restaurant's plating rules. It is not trucking in tonight's fish — that's the market (retrieval).
How it works
- Start from a base or instruct checkpoint (usually instruct).
- Collect high-quality pairs: prompt + the reply you actually want. Garbage in, garbage personality out.
- Train (today: almost always LoRA/QLoRA, next lessons) for a small number of epochs.
- Evaluate on a held-out set and on general skills (did you break math?).
- Ship the new weights or a small adapter file.
Side effects: catastrophic forgetting (it gets worse at things you didn't show) if you train too hard on a narrow set. Mix some general data, keep learning rates modest, stop early.
Real-world example
A claims team needs four fixed headings and no markdown. Prompting hits ~70%. A few hundred gold summaries via QLoRA make the structure reliable. The policy text still comes from RAG, because it changes.
Technical explanation
Fine-tuning is the same next-token loss as pretraining, on a smaller, specialized distribution. Instruction tuning is SFT on chat-shaped examples. Preference methods (DPO) come after, using chosen/rejected pairs.
Data quality dominates size. 200 clean examples beat 20,000 scraped ones. Don't train on secrets or PII you wouldn't put in a prompt. Version datasets like code.
Always try prompting (and RAG for knowledge) first. Fine-tuning is the expensive lever for behavior.
Common mistakes
Fine-tuning the employee handbook into the weights. Next month Legal rewrites a paragraph and you retrain. That's a RAG job.
- No holdout eval — "it looks good on the training chats."
- One epoch too many: the model memorizes and forgets general competence.
When to use it
- Stable format, tone, tool-calling style, domain dialect that prompting cannot lock.
When NOT to use it
- Changing facts; tiny tasks few-shot already solves; you have no eval set.
Alternatives
- Prompting, RAG, long context, a smaller specialized model API.
Quick quiz
Related concepts
- RAG vs Fine-tuning vs Long Context — RAG adds knowledge at answer time, fine-tuning bakes behavior into weights, and long context pastes everything into the prompt — each fits different problems.
- What is Prompt Engineering? — Prompt engineering is the craft of writing clear instructions, context, and examples so an LLM reliably produces the output you want.
Last reviewed: 2026-09-04 · Written by ByHeart AI · Reviewed by ByHeart AI