Development · Term

Fine-tuning

Fine-tuning is the process of further training an existing model on your own examples so it adopts a specific format, tone, or task behaviour more reliably than prompting alone achieves.

Fine-tuning changes how a model behaves, not what it knows. It is effective for enforcing a consistent output structure or house style, and ineffective as a way to teach a model facts — for factual grounding, retrieval is the correct tool.

It is usually the wrong first move. Better prompting, clearer output schemas, and retrieval solve most problems teams reach for fine-tuning to fix, without the cost of building a training set or the burden of maintaining it as models change.

How it works

You prepare a set of example inputs paired with the exact outputs you want, often a few hundred to a few thousand, and continue training a base model on them. The model's weights shift so that producing outputs like your examples becomes more likely. The result is a new model version you call instead of the original.

Because the knowledge in the weights is only nudged, fine-tuning is good at teaching a pattern and poor at teaching new facts, which the model may still get wrong or blend with what it already believed.

Example

A company that needs every product description in the same fixed structure and house voice might fine-tune on a thousand approved descriptions. For answering customers' questions about current prices and stock, it would instead retrieve the live product data at request time, because prices change and fine-tuning would freeze them.

Common mistakes

  • Fine-tuning to add knowledge that should come from retrieval.
  • Training on a small or inconsistent set of examples and getting inconsistent behaviour back.
  • Forgetting that a fine-tuned model must be re-evaluated, and often retrained, when the base model is updated.
Related terms

Have something worth building right?