Guide

Fine-tuning continues training a model on your examples so behavior is baked into weights instead of restated in every prompt. It is powerful and often unnecessary. Most failures that feel like "the model does not get us" are fixed by clearer prompts, better context or RAG, measured with evals.

One sentence to keep: fine-tuning teaches how to respond; RAG supplies what to respond with. Confusing those two is the expensive mistake.

Fine-tuning shines when you need consistent style or format, a narrow skill at high reliability, or a smaller, cheaper model that matches a larger teacher on one task.

The decision ladder

Walk the rungs in order. Skip a rung only with evidence from evals.

ApproachChangesBest forWeak at
PromptingInput onlyInstructions, few-shot behaviorHuge policy docs every call
Context / RAGInput plus retrieved factsPrivate, large or frequently updated knowledgeTeaching a new writing style
Fine-tuningWeightsConsistent format, classification, distillationFresh facts and weekly doc updates

Trade-off

Prompting iterates in minutes. RAG updates knowledge without retraining. Fine-tuning needs data, training jobs, evals and a plan for base-model upgrades. Default: exhaust prompting and RAG. Fine-tune when evals show a plateau and the failure is behavioral, not factual.

When it helps, and when it does not

Good for. Brand voice. Always-valid shapes when constrained decoding is not enough. Narrow classification and routing, often cheaper as a small classifier than a frontier model with a long prompt. Distillation: a large teacher generates targets, a 7B to 70B student learns them. Compressing a 5k-token instruction block into weights, after a held-out set shows quality holds.

Bad for. Fresh knowledge. Weights are a blurry memory. New prices, policies and SKUs belong in retrieval or tools. Fine-tuning on docs produces unciteable mush that goes stale the day after training. It also will not fix retrieval: if the model never saw the right chunk, more SFT will not invent the fact. A weekend LoRA on 40 Slack messages looks magical and fails in production.

Warning

Do not fine-tune to "make the model know our wiki." Build RAG first. Fine-tune later if tone or format is still wrong given the right evidence.

Concepts in this section

StepConceptWhat it answers
1Kinds of fine-tuningSFT, preferences, distillation, or LoRA?
2Fine-tuning dataWhat examples do you need, and how many?
3Serving fine-tunesManaged API or open-weight LoRA, and how do you keep it current?

Common mistakes

  • Fine-tuning a knowledge problem. The wiki belongs in RAG. The weights belong to style and format.
  • No held-out baseline. A 4-point lift on a contaminated suite, then the prompted baseline with two better few-shots is within 1 point, and multilingual cases you never measured are broken.
  • One training run a year. Bases improve every few months. Old adapters do not automatically transfer.

Key takeaways

  • Climb prompting, then context or RAG, then fine-tuning. Use evals at every step.
  • Fine-tune for behavior, format, narrow skills and distillation, not for fresh facts.
  • Data quality and a frozen baseline matter more than optimizer cleverness.
  • Keep RAG and fine-tuning as complements: evidence in context, style in weights.

Further learning

Chip Huyen's book is the practitioner reference for when fine-tuning fits.

AI Engineering (Chip Huyen)oreilly.com What We Learned from a Year of Building with LLMsA practical guide to building successful LLM products, covering the tactical, operational, and strategic.Applied LLMs

LoRA explained by its inventor.

What is Low-Rank Adaptation (LoRA) | explained by the inventorEdward Hu

SFT and PEFT