Skip to content
AI Explained

What Is Fine-Tuning? When to Train an AI Model, and When Not To

Fine-tuning retrains an existing AI model on your own examples so it adopts a style, format or task. How it works, LoRA and other methods, how it compares with prompting and RAG, when it pays off, how to prepare the data and the limits worth knowing.

Illustration of fine-tuning: three white sliders set at different heights, like the controls on a mixing desk, with a small sparkle beside them

Sooner or later, anyone who uses AI at work hits the same wall: the model is clever, but it ignores your house style, breaks a format you've asked for twenty times or stumbles over your jargon. The phrase that comes up next is fine-tuning. This guide covers what fine-tuning is, how it works, how it compares with prompting and RAG, when it's worth the effort, how to prepare the data, where to do it in 2026 and its limits.

What fine-tuning is

Fine-tuning means taking a model that has already been trained and training it a little more, on a small set of examples you choose, so it gets better at one particular job. The model's internal values, its parameters or weights, are adjusted. The result is a new version of the model that behaves differently even with a short, plain prompt.

It's a form of transfer learning: you reuse everything the model learned in its expensive general training. As our guide to what an LLM is explains, pretraining a large language model takes weeks or months on thousands of specialised chips. Fine-tuning one can take minutes or hours, on hundreds or thousands of examples rather than trillions of tokens.

You've already used fine-tuned models, even if you've never trained one. The assistants behind ChatGPT, Claude and Gemini are base models fine-tuned to follow instructions and trained further on human feedback. In OpenAI's InstructGPT research, people preferred the answers of a 1.3-billion-parameter model fine-tuned this way over those of the 175-billion-parameter GPT-3.

Put simply: prompting tells the model what to do each time; fine-tuning changes its habits.

How fine-tuning works, step by step

Whatever platform you use, a fine-tuning project follows five steps:

  1. Define the job and how you'll judge it: for example, "classify support tickets into our 12 categories". Decide what a good output looks like before training anything.
  2. Collect examples: pairs of input and ideal output, usually formatted as short conversations (a system message, a user message and the assistant reply you want). Most services take them as a JSONL file, with one example per line.
  3. Train: the platform shows the model each example, compares its answer with yours and nudges the weights towards your answer, usually over a few passes through the set (each pass is an epoch).
  4. Evaluate: run the new model on examples it has never seen and compare it with the original model plus your best prompt. If it isn't clearly better, it isn't worth keeping.
  5. Deploy and monitor: you call the fine-tuned model by its own name and keep checking real outputs, because inputs drift over time.

How much data you need varies. OpenAI's documentation sets a minimum of 10 examples and recommends starting with 50 well-crafted ones; Google's Vertex AI documentation talks about 100 or more, and hundreds to thousands for typical jobs. Quality beats volume: 200 consistent, checked examples usually beat 2,000 scraped ones that contradict each other.

Full fine-tuning, LoRA and other methods

"Fine-tuning" covers a family of techniques that differ mainly in cost and in what they teach.

  • Full fine-tuning: every parameter can change. It gives the most control, but on a large model it needs a lot of memory and produces a full-size copy for every version you train.
  • Parameter-efficient fine-tuning (PEFT): the original weights are frozen and only a small set of extra parameters is trained. The most popular method is LoRA (low-rank adaptation). Its authors reported that, compared with fully fine-tuning GPT-3 175B, LoRA cut the number of trainable parameters by 10,000 times and the GPU memory needed by 3 times. The trained part, an adapter, is a small file you can swap in and out on the same base model.
  • QLoRA: LoRA on a compressed (quantised) version of the model. Its 2023 paper showed a 65-billion-parameter model being fine-tuned on a single 48GB GPU. This is what made fine-tuning open models realistic for small teams and hobbyists.
  • Supervised fine-tuning (SFT): learning from input-and-ideal-output pairs, as described above. Most jobs are this.
  • Preference tuning: instead of one ideal answer, each example has a better and a worse answer, and the model learns to prefer the better one. Methods include RLHF and direct preference optimisation (DPO). It helps when judging two answers is easier than writing the perfect one.
  • Reinforcement fine-tuning: the model generates answers, a grader scores them and the training rewards the high scorers. It suits tasks with checkable answers, such as maths, code or structured extraction, and is mainly used with reasoning models.

Fine-tuning vs prompting vs RAG

These three approaches solve different problems. The rule of thumb from our guide to RAG holds: fine-tuning for how the model should answer, RAG for what it should know.

  • Prompting changes nothing inside the model. You put the instructions, examples and context in every request. It's free to try, instant to change and enough for most tasks, especially with a good system prompt and a few examples.
  • RAG (retrieval-augmented generation) fetches relevant passages from your documents at question time and adds them to the prompt. It's the right tool for facts that change, private knowledge and answers that need sources.
  • Fine-tuning changes the model's weights. It's the right tool for behaviour: a consistent tone, a strict output format, a classification scheme, a specialist style of reasoning or a task you run thousands of times a day.

A common mistake is to fine-tune to teach facts, such as your product catalogue or this year's policies. The model blends them into everything else it knows, can't say where a fact came from and is out of date the next time something changes. Keep facts in documents and retrieve them; use fine-tuning to shape how the model handles them. The two combine well.

Before paying for training, check how far a prompt with examples gets you. Showing three or four examples in the prompt, known as few-shot prompting, captures a surprising amount of what fine-tuning would:

You are [ROLE, E.G. THE SUPPORT TEAM'S TICKET CLASSIFIER]. Task: [WHAT TO DO WITH EACH INPUT]. Allowed outputs: [LIST OF CATEGORIES OR THE EXACT FORMAT]. Here are examples of correct work: Input: [EXAMPLE INPUT 1] Output: [IDEAL OUTPUT 1] Input: [EXAMPLE INPUT 2] Output: [IDEAL OUTPUT 2] Input: [EXAMPLE INPUT 3 — A TRICKY OR BORDERLINE CASE] Output: [IDEAL OUTPUT 3] If an input doesn't fit any category, answer "Unclear" instead of guessing. Input: [NEW INPUT]

Run it on 30 or 40 real inputs and score the results. If it's right nearly every time, you don't need fine-tuning. If it's close but inconsistent, or the prompt has grown so long that cost and speed suffer, you have a real case.

When fine-tuning is worth it

Fine-tuning earns its cost in a fairly narrow set of situations:

  • You need the same narrow job done at volume: thousands of classifications, extractions or rewrites a day, where a shorter prompt saves real money. A small fine-tuned model can often match a large general one on a narrow task for a fraction of the price. Our token counter helps you estimate what a long prompt costs at your volume.
  • The format must be exactly right: specific JSON fields, a fixed report structure or a strict labelling scheme that the model keeps breaking despite clear instructions.
  • The style is hard to describe but easy to show: a brand voice, a legal drafting convention, the way your senior engineers write code review comments.
  • You have more examples than fit in a prompt: hundreds of edge cases that together define the task.
  • You want a smaller model to do a bigger model's job: training a small, fast model on outputs you've approved from a larger one, often called distillation.

It's usually not worth it when the task changes often, when you have only a few dozen examples, when the problem is missing knowledge rather than behaviour, or when nobody has time to evaluate the result.

Tip: Before collecting any training data, set aside 30 to 50 real examples as a test set and never train on them. Score your best prompt on that set first. That number is the bar a fine-tuned model has to clear; without it you'll have no honest way of telling whether the training helped.

How to prepare training data

Most failed fine-tuning projects fail on the data, not the training. Five rules matter most:

  • Use real inputs: the emails, tickets or documents the model will actually see, with personal data removed. Invented inputs are cleaner than reality.
  • Make the outputs exactly what you want: the model will copy their length, tone, formatting and mistakes. If you'd edit an example before sending it, edit it before training.
  • Be consistent: similar inputs with contradictory outputs teach the model to be random. Let one written guideline decide borderline cases.
  • Cover the hard cases: include ambiguous and rare inputs, plus examples where the model should say it doesn't know.
  • Train with your production system prompt: use the same instructions you'll send later.

An LLM can draft examples, but review every one. This prompt turns real inputs into draft training pairs:

I'm building a training set to fine-tune a model for this task: [DESCRIBE THE TASK IN ONE OR TWO SENTENCES]. Style and rules the outputs must follow: [PASTE YOUR STYLE GUIDE OR RULES] For each input below, write the ideal output. Then add a line starting "Check:" that flags anything you were unsure about or had to assume, so a human can review it. Don't invent facts that aren't in the input. Inputs: [PASTE 10–20 REAL INPUTS, NUMBERED]

The file format is the easy part: each example becomes one line of JSON with the system, user and assistant messages. If your target output is itself structured data, our JSON prompt builder helps you pin the schema down first.

To judge the result, compare the original and fine-tuned models on your test set. A second model can do the first pass of scoring if you spot-check its verdicts:

You are reviewing outputs for this task: [TASK]. A good output: [YOUR CRITERIA, E.G. CORRECT CATEGORY, UNDER 80 WORDS, FOLLOWS THE HOUSE STYLE, NO INVENTED DETAILS]. Input: [TEST INPUT] Output A: [OUTPUT FROM MODEL A] Output B: [OUTPUT FROM MODEL B] Score each output from 1 to 5 against every criterion, quote the part of the output that justifies each score, then say which output is better overall or "Tie". Don't reward length for its own sake.

Shuffle which model appears as A and B, so the scorer can't favour one position.

Where you can fine-tune a model in 2026

The options shifted this year, so check current documentation before you commit.

  • OpenAI: OpenAI is winding down its self-serve fine-tuning platform. It no longer accepts new users; eligible existing customers can create training jobs until 6 January 2027, and fine-tuned models keep running until their base model is retired.
  • Cloud platforms: Google's Vertex AI offers supervised and preference tuning for several Gemini models, and other cloud platforms such as Amazon Bedrock offer customisation for selected models.
  • Open-weight models: Llama, Mistral, Qwen and other open models can be fine-tuned with free libraries such as Hugging Face's PEFT, usually with LoRA, on your own hardware or a rented GPU. You keep the weights and your data, but you handle hosting and safety yourself.
  • Managed services: several companies train and host open models for you.
Tip: A custom GPT, a Gemini Gem or a Claude project is not fine-tuning. They store instructions and files and add them to each conversation; the weights don't change. For most personal and team workflows, that's all you need: creating a custom GPT gets you a dedicated assistant in minutes, with nothing to retrain when the model improves.

Limits worth knowing

  • It won't reliably teach facts: a fine-tuned model can still invent things, now in your house style, which makes them harder to spot. Fine-tuning doesn't cure AI hallucinations.
  • It can make the model worse at other things: training hard on one narrow task can erode general skills, an effect known as catastrophic forgetting. Test a few general tasks as well as your target one.
  • It can weaken safety behaviour: researchers showed in 2023 that fine-tuning GPT-3.5 Turbo on just 10 harmful examples, for less than $0.20, removed much of its safety training, and that even ordinary, harmless training data weakened it to a lesser degree. If your model faces the public, test harmful requests after training.
  • It ties you to one base model: when the provider retires that model, your fine-tune goes with it, and you have to retrain on the next one. Keep your dataset and your test set; they're the real asset.
  • It copies your data's flaws: biased, sloppy or inconsistent examples produce a model with the same problems, delivered with confidence.
  • It costs more than the training bill: collecting and checking examples, evaluating, hosting and retraining usually outweigh the compute.

Fine-tuning sharpens what a model can already do; it won't add abilities it never had. It's the right tool for repetitive, high-volume tasks with a clear right answer and a format prompts can't hold. For everything else, a good prompt with a few examples plus retrieval from your documents gets you most of the way, with nothing to maintain. Start there, measure honestly, and fine-tune only when the numbers say so.

References

Put this into practice. Apply what you just read with our free tool: System Prompt Generator →
By AI enthusiast & advanced user

Jordi Benitez has been using AI tools day to day for years. No researcher, no academic title — just an advanced user who has spent enough hours prompting ChatGPT, Claude, Gemini and image models to know what actually works, and built GetEasyPrompt to share it in plain language.

FAQ

Frequently asked questions

Fine-tuning means taking a model that has already been trained and training it further on a small set of your own examples, so it gets better at one specific job. The model's internal parameters change, so the new version follows your style, format or task even with a short prompt. It's a form of transfer learning: you reuse everything the model learned in its original training.
They solve different problems. Fine-tuning changes how a model behaves: tone, output format, classification rules or a narrow task done at volume. RAG gives a model what it should know by retrieving passages from your documents at question time, so it suits facts that change and answers that need sources. Many production systems use both.
It depends on the task. OpenAI's documentation sets a minimum of 10 examples and recommends starting with 50 well-crafted ones; Google's Vertex AI documentation suggests 100 or more, and hundreds to thousands for typical jobs. Consistent, carefully checked examples matter more than volume, and you should keep a separate test set you never train on.
No. A custom GPT, a Gemini Gem or a Claude project stores instructions and files and adds them to each conversation, but the model's weights don't change. That makes them quick to set up and easy to update. Fine-tuning actually retrains the model, which needs training data, evaluation and retraining whenever the base model changes.

Write your next prompt in seconds

Turn a rough idea into a clear, structured prompt any AI can follow. Free, private, and no account needed.

Open the Prompt OptimizerSee all tools