What fine-tuning is
A pre-trained model — an LLM, an embedding encoder, a vision model — has been trained on general
data and carries broad knowledge. Fine-tuning is a second training stage on a specialised sample.
The aim is to adapt the model to a specific task, domain or style without training from scratch.
It is far cheaper in resources: most of the knowledge is already baked into the weights from
pre-training, and all that remains is to nudge them toward the target domain.
Varieties of fine-tuning
| Approach | Description | When to use it |
|---|---|---|
| Full fine-tuning | All the model’s weights are updated | Plenty of data, deep specialisation |
| LoRA / PEFT | A small fraction of weights is updated | Limited compute budget |
| Instruction tuning | Training on instruction-response pairs | Changing behaviour and style |
| RLHF | Reinforcement learning from human raters | Aligning with human preference |
Fine-tuning in e-commerce
The main retail applications:
AI shopping assistant. Fine-tuning on historical shopper conversations and product
documentation lets the model use the right terminology, hold the brand’s tone of voice and return
fewer irrelevant answers.
Product embeddings. Fine-tuning multilingual encoders on pairs of query and relevant product
improves semantic search and recommendation quality in specific categories such as fashion, DIY
and jewellery.
Intent classification. Tuning small classifiers to the intent categories of one particular store.
Important: fine-tuning is not a replacement for RAG when data keeps changing. The catalogue
moves every day; sewing it into model weights makes no sense. RAG refreshes knowledge in real
time, while fine-tuning changes the model’s behaviour and style.
Common mistakes
- Catastrophic forgetting: training on a narrow data set can displace the model’s general
knowledge. The fix is PEFT, or mixing target data with a share of general data. - Overfitting on a small sample: a tiny data set plus many epochs gives an excellent training
score and poor answers on real queries. Watch the metrics on a validation set. - Data quality beats data volume: noisy or contradictory training examples make the model worse.
Invest in annotation, not in quantity.