# Fine-tuning

> Fine-tuning is the process of further training an existing AI model on a smaller set of task-specific examples so that it reliably adopts a particular behaviour, format, tone or specialised skill.

Also called: model fine-tuning, fine tuning, custom model training, supervised fine-tuning, SFT. Category: Models and training. Source: https://aibuildindex.com/glossary/fine-tuning

## In the index

- LLM fine-tuning: median $3,500, middle half $420 to $13,700, 78 priced briefs (https://aibuildindex.com/cost/llm-fine-tuning)
- Model training: median $4,720, middle half $850 to $14,400, 448 priced briefs (https://aibuildindex.com/skills/model-training)

Fine-tuning takes a general model and teaches it your way of doing a specific task. Instead of describing the desired behaviour in a long prompt every time, you show the model hundreds or thousands of worked examples and adjust its weights so the behaviour becomes the default. It is a powerful technique, but it is often proposed for problems it does not solve well, so buyers benefit from knowing when it fits.

## How it works

A fine-tuning project usually follows these steps:

1. **Collect examples.** Pairs of input and ideal output that reflect the real task, such as support messages and the replies your best agents wrote.
2. **Clean and check them.** Inconsistent or wrong examples teach inconsistent or wrong behaviour, so [training data](https://aibuildindex.com/glossary/training-data) quality matters more than quantity.
3. **Train.** Either through a provider's fine-tuning service or, for an [open-weight model](https://aibuildindex.com/glossary/open-weight-model), on rented hardware, often using lighter methods such as [LoRA](https://aibuildindex.com/glossary/lora).
4. **Evaluate.** Compare the tuned model with the original on examples it did not see during training.
5. **Deploy and maintain.** Serve the tuned model and retrain when requirements or base models change.

Fine-tuning is good at teaching form: a consistent output format, a house style, a classification scheme, domain jargon or a narrow skill. It is poor at teaching facts that change, such as current prices or policies, because updating them means retraining. For that, [retrieval-augmented generation](https://aibuildindex.com/glossary/retrieval-augmented-generation) is usually the better tool.

A legal team, for example, might fine-tune a model to draft clause summaries in its own house format, while retrieving the actual contract text at question time.

## What it means for cost

Fine-tuning adds a data project to a build. The largest cost is usually preparing and reviewing good examples, not the training run itself. Evaluation, hosting a custom model and retraining when the base model is retired add further ongoing work.

In return, a tuned model can use shorter prompts and sometimes a smaller, cheaper base model, which lowers running costs at high volume. Ask a builder what they tried with [prompt engineering](https://aibuildindex.com/glossary/prompt-engineering) first, how many examples they need and who will prepare them, and how the tuned model will be compared with the untuned one.

## When it is the wrong tool

If the main problem is that the model lacks your company's information, fine-tuning is the wrong fix; retrieval is. If good prompting already achieves the quality you need at acceptable cost, fine-tuning adds maintenance without much gain.

## Common questions

### How many examples does fine-tuning need?

It depends on the task and the method. Simple format or style changes can work with a modest set, while complex behaviours need more. Quality and consistency of examples generally matter more than raw count.

### Does a fine-tuned model know my documents?

Not reliably. Fine-tuning shapes behaviour but is an unreliable way to store facts, and the model may still invent details. Retrieval is the standard way to answer from documents.

## Related terms

- [LoRA (low-rank adaptation)](https://aibuildindex.com/glossary/lora): LoRA, or low-rank adaptation, is a fine-tuning method that trains a small set of extra weights alongside a frozen base model, making it far cheaper and quicker to adapt a large model to a specific task.
- [Training data](https://aibuildindex.com/glossary/training-data): Training data is the set of examples a machine learning model learns from, such as labelled images, past transactions or question-and-answer pairs, and its quality, coverage and rights largely decide how well the finished model performs.
- [Retrieval-augmented generation (RAG)](https://aibuildindex.com/glossary/retrieval-augmented-generation): Retrieval-augmented generation is a way of answering questions with a language model that first looks up relevant passages in your own documents, then writes an answer grounded in what it found.
- [Prompt engineering](https://aibuildindex.com/glossary/prompt-engineering): Prompt engineering is the practice of designing, testing and refining the instructions, context and examples given to an AI model so that it produces accurate, consistent and correctly formatted output for a specific task.
- [Model distillation](https://aibuildindex.com/glossary/distillation): Model distillation is a technique for training a smaller, cheaper "student" model to imitate the outputs of a larger "teacher" model, so that it keeps much of the larger model's quality on a task while running faster.
- [Open-weight model](https://aibuildindex.com/glossary/open-weight-model): An open-weight model is an AI model whose trained weights are published for download, so organisations can run, inspect and fine-tune it on their own infrastructure instead of only accessing it through a provider's API.
