A foundation model learns general knowledge from huge amounts of data. Fine-tuning adapts it to a narrower job using hundreds or thousands of example inputs and the outputs you want. After training, the model produces that kind of output by default, with shorter prompts.
How Does Fine-Tuning Work?
- Collect examples: pairs of input and ideal output, such as a product spec and the description your brand would write.
- Clean and check them: the model will copy whatever patterns the examples contain, including mistakes.
- Train: the provider or your team runs additional training on top of the base model.
- Evaluate: compare the fine-tuned model with the base model plus a good prompt on examples it has not seen.
Fine-Tuning vs RAG vs Prompt Engineering
These solve different problems. Prompt engineering changes the instructions and is the cheapest place to start. RAG gives the model access to knowledge it does not have, such as your latest product data, by retrieving it at question time. Fine-tuning changes how the model behaves: its tone, format or skill at a narrow task. A simple rule: use RAG when the model lacks facts, fine-tuning when it lacks a consistent behaviour that prompting cannot fix.
When Is Fine-Tuning Worth It?
- You run the same narrow task at high volume and want shorter prompts and lower cost per call.
- You need a very consistent format or brand voice that prompts alone do not hold.
- You have enough good examples and a way to measure whether the result is better.
It is usually not worth it for facts that change often, since retraining every time is slow and expensive, or when a stronger base model with a well written prompt already does the job.
Frequently asked questions
What is fine-tuning in AI?+
Fine-tuning is further training of a pretrained model on your own examples so it performs a specific task, format or style better without long instructions in every prompt.
Should I use fine-tuning or RAG?+
Use RAG when the model needs up to date or private knowledge. Use fine-tuning when it needs a consistent behaviour, format or style. Many teams try prompt engineering and RAG first.
How much data do you need to fine-tune a model?+
It depends on the provider and task, but many fine-tuning jobs start with a few hundred high quality examples. Quality and consistency of examples matter more than volume.