What is LLM fine-tuning?
Definition
LLM fine-tuning is further training of a pretrained language model on your own examples, which changes its weights so it follows your format, tone or task more consistently. It fixes behavior, not missing knowledge: current facts still come from prompts or retrieval (RAG). Methods include supervised fine-tuning, preference tuning and reinforcement fine-tuning.
When should you fine-tune instead of prompting or using RAG?
Ask what kind of failure you are fixing. OpenAI's guide Optimizing LLM Accuracy splits failures into two kinds:
- Context problems: the model lacks the knowledge because it was not in its training set, its knowledge is out of date, or the task needs proprietary information. The fix is better context, through the prompt or retrieval.
- Behavior problems: the model produces inconsistent results with incorrect formatting, the tone is wrong, or the reasoning is not followed consistently. This is where fine-tuning fits.
The same guide calls the first "in-context" memory and the second "learned" memory, and notes that the levers stack: an app with both problems may end up with fine-tuning and RAG together. Read as a decision table:
| Symptom in your evals | Try first | Why |
|---|---|---|
| Wrong or outdated facts | RAG or better context | Weights cannot hold this week's policy; retrieval can |
| Answers ignore your private documents | RAG | The model never saw them |
| Format, schema or tone drifts across answers | Prompt fixes, then fine-tuning | Behavior learned from many examples |
| The prompt is huge because of few-shot examples | Fine-tuning | Training moves examples out of every request |
| A large model is right but too slow or costly | Fine-tune a smaller model | Specialize the cheaper model on your task |
Google's Introduction to tuning gives the same order: start with prompting to find the best prompt, then move to fine-tuning "if required". It says fine-tuning is most effective when you have labeled data ("think 100 examples or more") and when advanced prompting is not enough. Microsoft's Training in Microsoft Foundry adds two limits worth printing out: training "doesn't replace retrieval for current information or application-level safety controls", and benefits "aren't guaranteed".
For the prompting side of this table, start with a clear system prompt before you collect training data.
What fine-tuning methods are there?
Google and Microsoft document the same three families of methods. Dataset sizes are Google's typical ranges, and the "fits when" column is Microsoft's:
| Method | Training signal | Typical dataset (Google) | Fits when (Microsoft) |
|---|---|---|---|
| Supervised fine-tuning (SFT) | Prompts with the responses you want | Hundreds to thousands of labeled examples | You can demonstrate the behavior the model should learn |
| Preference tuning (DPO) | A preferred and a rejected response to the same input | Hundreds to thousands of preference pairs | Quality depends on preferences such as tone or completeness, not one correct answer |
| Reinforcement fine-tuning (RFT, RLFT) | Prompts plus a grader or reward function that scores answers | Dozens to a few hundred prompts | Several solutions are possible and you can reliably score them |
The methods also differ in how much of the model they change. Google's page separates parameter-efficient tuning (also called adapter tuning), which updates a relatively small subset of the model's parameters, from full fine-tuning, which updates all of them and costs more to train and to serve. On Google's platform, reinforcement learning fine-tuning updates a LoRA adapter and can combine up to 16 weighted reward functions.
Where can you fine-tune a hosted model in late 2026?
This has changed fast, so check dates before you plan a project. As of the provider pages we read on 2026-11-19:
| Provider | Status | What the docs say |
|---|---|---|
| OpenAI | Winding down | The model optimization guide says OpenAI is winding down the fine-tuning platform and it is no longer accessible to new users. On the deprecations page, job creation ended on May 7, 2026 for organizations that had never fine-tuned, on July 2, 2026 for those with no fine-tuned inference in the past 60 days, and ends for all remaining customers on January 6, 2027. Fine-tuned models keep serving until their base model shuts down |
| Google (Gemini Enterprise Agent Platform) | Available | SFT for models including Gemini 3.8 Flash, 3.5 Flash and 3.1 Flash-Lite; reinforcement learning fine-tuning for Gemini 3.5 Flash and 3.1 Flash-Lite. Preference tuning is listed only for Gemini 2.5 Flash and Flash-Lite, and the model lifecycle page gives both a retirement date of October 20, 2026 |
| Microsoft Foundry | Available | Managed Training runs SFT, DPO and RFT jobs, depending on the model; Programmed Training lets you write the training loop in Python but is in preview and needs access approval |
The OpenAI change matters if you already run a fine-tuned model there. You can keep using it until its base model shuts down, but you cannot start new training jobs from January 6, 2027. Every base model in the supervised fine-tuning guide is already shut down or close to it: GPT-4.1 nano and its fine-tunes shut down on October 23, 2026, and GPT-4.1 and GPT-4.1 mini with their fine-tunes shut down on January 14, 2027. A tuned model is tied to its base: Microsoft's page says an adapter isn't interchangeable across similarly named base models, and that a base model nearing retirement can mean retraining and redeployment.
What does a fine-tuning project need?
- A baseline eval. Score the best prompt you have, and the RAG setup if you use one, on a fixed golden dataset. Without a baseline, you cannot tell whether training helped.
- Representative training data. OpenAI's guide says the examples "must exactly represent what the model will see in the real world". If the production prompt includes retrieved passages, the training examples should too.
- Separate splits. Microsoft lists overfitting and evaluation leakage as a challenge: keep training, validation and final test data apart, and compare checkpoints on held-out tasks, not just on training loss.
- A grader you trust, for RFT. Microsoft warns that a rising reward does not prove better task performance if the model exploits the grader. Test the grader on correct, incorrect and adversarial answers first.
- A budget for repeats. Plan for several training runs, plus grading, evaluation, hosting and inference, and stop experiments that do not move the target metric.
- A plan for retraining when the task data changes or the base model is retired.
Microsoft's page sums it up: "Training is an iterative engineering process, not a guaranteed improvement."
What should you check before you fine-tune?
- Is the failure about behavior? If the model lacks facts, the guides above point to context and retrieval, not training.
- Did prompting really run out? You have tried clear instructions and examples, and measured them.
- Do you have enough reviewed examples for the method, and an eval set the model will never train on?
- Can you serve and maintain the result on the provider you train with, for as long as the product needs it?
- Will the tuned model still pass your safety tests? Application-level guardrails stay in place either way.
When we build generative AI features, we build a thin prototype and compare models and retrieval options on the eval set. Our AI testing services target the behavior of the feature, so the same tests work with hosted models, open-weight models and your own fine-tunes.
Sources
- Optimizing LLM Accuracy, OpenAI API docs, 2026-11
- Deprecations, OpenAI API docs, 2026-11-18
- Supervised fine-tuning, OpenAI API docs, 2026-11
- Introduction to tuning, Google Cloud (Gemini Enterprise Agent Platform docs), 2026-11-19
- Training in Microsoft Foundry, Microsoft Learn, 2026-11-17
- Model optimization, OpenAI API docs, 2026-11
- Model versions and lifecycle, Google Cloud (Gemini Enterprise Agent Platform docs), 2026-11-19
Frequently asked questions
How much data do you need to fine-tune an LLM?
It depends on the method. Google's typical ranges are hundreds to thousands of labeled examples for supervised fine-tuning and dozens to a few hundred prompts for reinforcement learning fine-tuning. OpenAI's supervised fine-tuning guide recommends starting with 50 well-crafted demonstrations and evaluating before adding more.
Does fine-tuning reduce hallucinations?
Not for missing or changing facts: Microsoft's docs say training doesn't replace retrieval for current information. It can help with behavior, and Microsoft lists using retrieved context effectively, prioritizing relevant passages and ignoring irrelevant ones, as one aim of training.
What is LoRA?
A parameter-efficient method that trains a small adapter instead of all of a model's weights. Google's platform updates a LoRA adapter during reinforcement learning fine-tuning, and Microsoft Foundry can serve compatible LoRA adapters on a matching base model (a preview capability).
Can you fine-tune and use RAG at the same time?
Yes. OpenAI's accuracy guide describes them as levers that stack: fine-tuning for consistent behavior, retrieval for current or specialized context. Train on examples that include retrieved passages if production prompts do.
Services
Read next
Related terms
Mykhailo PoliarushFounder and CEOLeads SDCLabs, an AI development company founded in Krakow in 2011.LinkedInGitHub