In One Sentence
SFT (Supervised Fine-Tuning) trains a pretrained large language model (LLM) on pairs of instructions and desired answers so it learns the right way to respond.
Pretraining gives an LLM broad language knowledge, while SFT teaches it how to do a job: how to answer a question, follow an instruction, and produce a specific format or tone. It is like teaching a chef not only the ingredients, but also the recipe and presentation standard.
Why It Matters
Pretrained LLMs are mainly trained to predict the next word. They may be knowledgeable, but still behave in ways that are difficult to use in business.
- They may continue the question instead of answering it
- Their format, length, and tone may vary from one response to the next
- They may ignore company-specific formats, writing conventions, or response rules
In other words, they can be "smart but poor at following instructions." The InstructGPT research, a major turning point for conversational AI, positioned SFT on human-written example answers as a core step in developing instruction-following ability.
The same applies when a company wants a general-purpose model to follow its own formats, decision criteria, and writing style.
How It Works
SFT uses a dataset made up of pairs of inputs (instructions or questions) and outputs (desired answers). For example:
Instruction: "Answer the following inquiry according to our customer-support guidelines."
Input: A customer's inquiry
Output: An example of the ideal support response
During training, the system calculates the loss—the difference between the model's generated answer and the example answer—and updates the model parameters to reduce that loss. Technically, it uses the same next-token prediction framework as pretraining, while typically calculating the loss mainly on the answer portion rather than the instruction itself.
Data quality matters more than raw volume. A relatively small set of accurate, diverse examples can produce meaningful improvements. Conversely, noisy or biased examples can teach the model those errors, making dataset design and quality control central to the outcome.
SFT can update all model parameters, or use a parameter-efficient method such as LoRA. In practice, many teams pursue the goal of SFT through LoRA to reduce compute and cost.
When to Use It
SFT is a good fit when you want to change the model's behavior.
- Standardize response formats, writing style, and tone
- Improve accuracy and consistency for classification, summarization, extraction, or template-based document generation
- Replace long, repeated instructions with behavior learned by the model itself
- Enforce industry-specific terminology and formatting rules
The common factor is that people can define and demonstrate the desired answer. The clearer the target format, the more useful SFT tends to be.
When Not to Use It
Some problems are not a good fit for SFT, or should be addressed first.
- You want answers based on current information or internal documents: retraining is needed as information changes, so consider RAG (retrieval-augmented generation) first
- You cannot prepare high-quality supervised data: noisy or biased data can make the model worse
- Prompt design is already sufficient: if few-shot examples and a well-designed prompt meet the target, training may not be worth the cost
- You have no evaluation criteria: without a clear definition of improvement, you cannot verify results or make a sound investment decision
How It Differs from RAG and LoRA
These terms are often confused, but they occupy different roles.
| Approach | Position | Problem it addresses |
|---|---|---|
| RAG | A system architecture that retrieves external documents | Knowledge, such as internal or current information |
| SFT | A training process using supervised examples | Behavior, such as format, accuracy, and style |
| LoRA | A training technique that makes SFT more efficient | The same goal as SFT with less compute |
RAG and SFT solve different kinds of problems and can be used together: RAG supplies knowledge, while SFT shapes behavior. SFT and LoRA are different in kind: SFT describes the training objective, while LoRA is one efficient way to carry it out.
Use Cases for Small and Mid-Sized Companies
- Customer support: train on high-quality past support logs to stabilize first responses in the company's tone
- Sales and back office: convert meeting notes into a standard report format with less manual work
- Manufacturing and engineering: learn the conventions used in specifications and inspection reports to improve document drafts
- E-commerce and retail: generate product descriptions in a consistent brand voice and reduce quality variation at scale
In every case, success depends on whether high-quality example answers have been organized. Collecting and cleaning training data and designing evaluation criteria often takes more effort than the training itself.
References
- Ouyang, L. et al. (2022). Training language models to follow instructions with human feedback (InstructGPT). arXiv:2203.02155
- Hu, E. J. et al. (2021). LoRA: Low-Rank Adaptation of Large Language Models. arXiv:2106.09685
- Hugging Face. TRL - Supervised Fine-tuning Trainer (official documentation)
Our Perspective
SFT is a powerful way to teach an LLM the right answer format, but it is not always the first step to take. A practical sequence is to test prompt design first, externalize knowledge with RAG, prepare evaluation data, and then consider SFT for the behavioral gaps that remain.
Before training, separate evaluation data and define the formats, accuracy, and tone you want to improve. Then prepare representative examples, test on a small scale, and use LoRA or another efficient technique when appropriate. We help organizations begin by distinguishing whether the core problem is knowledge or behavior.