Skip to main content

AI glossary Models & Architecture

What is fine-tuning in AI?

← All glossary terms
In short

Continuing the training of a pre-trained model on a smaller, task- or domain-specific dataset so that it behaves the way you need.

Explained

Fine-tuning takes a model that has already been pre-trained on large amounts of general data and trains it further on a smaller set of examples from your domain or task. The model's weights change, so the new behaviour is built into the model rather than written into each prompt. It is used to teach a format, a style, a vocabulary or a narrow task that prompting alone does not get right consistently. It is an alternative to prompt engineering when more control is needed, and it is often combined with retrieval rather than replacing it.

How it works

You start from a base model and a dataset of examples: inputs paired with the outputs you want. Training adjusts the model so that, given similar inputs, it produces similar outputs.

Full fine-tuning updates all the model's weights, which is expensive for large models. Parameter-efficient methods such as LoRA freeze the original weights and train a small number of extra parameters instead, which cuts the compute and memory needed and lets you keep several adapted versions of one base model.

The result has to be evaluated against a held-out test set and against the base model. Without that comparison it is hard to know whether fine-tuning helped.

Fine-tuning, prompting or RAG?

  • Prompting changes the instructions, not the model. It is the cheapest option and the first thing to try.
  • Retrieval-augmented generation (RAG) gives the model fresh, specific information at query time. It is the right tool when the problem is missing or changing knowledge.
  • Fine-tuning changes how the model behaves: format, tone, terminology, or a narrow task it must perform reliably. It is a poor way to add facts that change often.
  • Many production systems combine them: a fine-tuned model for behaviour, retrieval for knowledge, and prompts for the task at hand.

When it makes sense

  • Prompting and retrieval have been tried and the model still fails in consistent, describable ways.
  • You have enough good, representative examples of the desired output, and the right to use them.
  • The task is stable enough that the trained behaviour will not be outdated soon.
  • A smaller fine-tuned model could replace a larger general one and reduce cost or latency.
  • You have evaluations in place to measure the gain and to catch regressions.

Frequently asked questions

What is the difference between pre-training and fine-tuning?

Pre-training teaches a model general language or patterns from very large datasets and is done once by the model provider. Fine-tuning starts from that pre-trained model and trains it further on a much smaller, targeted dataset. The second step is far cheaper and is what organisations usually do themselves.

Is fine-tuning better than RAG?

They solve different problems. RAG supplies up-to-date or private knowledge at the moment of the query; fine-tuning changes the model's behaviour, style or skill at a narrow task. If the issue is that the model does not know something, start with RAG; if it knows but does not behave as needed, consider fine-tuning.

What is LoRA?

LoRA (low-rank adaptation) is a parameter-efficient fine-tuning method. It freezes the pre-trained weights and trains small additional matrices inside the model's layers. This reduces the memory and compute needed and makes it practical to keep many task-specific adapters for one base model.

How much data do you need to fine-tune a model?

It depends on the model, the method and how far the task is from what the model already does. Quality and representativeness matter more than volume: a modest set of clean, consistent examples often beats a large noisy one. The reliable way to decide is to start small, evaluate, and add data where the model still fails.

What are the risks of fine-tuning?

A fine-tuned model can lose some general abilities, learn errors or biases present in the training data, or memorise sensitive information from it. It also has to be maintained: when the base model is updated or retired, the fine-tuning may need to be redone. Data governance and evaluation reduce these risks.

Decision guides that use this term

Where it shows up at Thinkia

Further reading

Sources

Updated: 2026-10-21

Want to see how this applies to your organisation?

Talk to an AI Expert