Fine-tuning
Also: model fine-tuning, supervised fine-tuning, dotrénování modelu
Fine-tuning is further training of an already pre-trained model on a smaller set of task-specific examples, which changes the model's weights. The goal is to teach the model a particular task, style or response format without training it from scratch. Parameter-efficient methods such as LoRA adjust only a small fraction of the parameters and are therefore much cheaper.
What it means for a company
Fine-tuning makes sense when a model has the knowledge it needs but does not behave consistently: it ignores a format, tone or procedure that prompting cannot reliably enforce. It requires high-quality, representative and verified training data, repeated experiments and evaluation on a separate test set. Training costs come on top of hosting the custom model, and training has to be repeated when the provider retires the base model. Fine-tuning does not replace retrieval of current information, and personal data belongs in training data only with a legal basis under the GDPR.
In practice
An insurer wants the model to turn every claim description into the same structure: type of damage, date, estimated amount and missing information. A prompt with examples works most of the time, but some answers come back in a different format. After fine-tuning on a few hundred verified examples, the model follows the format more reliably and the prompt can be shorter. Current policy terms still reach it through RAG, because they change.
Frequently asked questions
When should I choose fine-tuning and when RAG?
Choose RAG when the model lacks knowledge, such as internal documents or the current price list. Choose fine-tuning when the model has the knowledge but does not follow the required format, style or procedure. The two can be combined, and OpenAI recommends starting with prompt engineering.
How much data does fine-tuning need?
There is no single number; it depends on the model and the task. Quality is what counts: accurate, consistent and representative examples. Part of the data must be held back for validation and a final test, so you can tell whether the model genuinely improved or just memorised the training examples.
Will fine-tuning teach the model company facts?
That is not what it is for. Fine-tuning mainly changes behaviour, and facts trained into the weights cannot easily be updated or traced to a source. Microsoft states explicitly that training does not replace retrieval of current information. RAG is the better fit for working with company knowledge.