Lifestyle
Supervised Fine-Tuning (SFT): Teaching Models Tasks with Good Examples
Supervised fine-tuning trains existing models on input–desired output examples for more consistent task behavior. Meeting action items illustrate data pairing, conversation roles, loss calculation and held-out test sets; distinctions from few-shot prompting, LoRA and preference optimization; and how guesses and format errors in examples are learned. Learn to check whether training data teaches models to preserve unknowns, rather than just appear complete.
About 7 min read

Contents
Supervised fine-tuning, often abbreviated as SFT, continues training an existing model using examples of inputs and desired outputs. For a language model, the input might contain a user's request and supporting information, while the desired output is a response that follows the rules. During training, the model adjusts its parametersWhat Are Model Parameters?Model parameters are values adjusted during training to map inputs to outputs, such as weights and biases. Simple equations show how they affect predictions and distinguish them from training hyperparameters, prompts and generation settings. Learn why parameter count, numerical precision and active parameters are different metrics, how to read model specs, why more parameters do not mean more individual facts, and why each chat does not mean retraining the model.Read the full article to make the example answers more likely to be generated, gradually learning task formats, wording, and approaches.
“Supervised” means training has an explicit target signal. It does not mean a human watches every response, nor does it guarantee that the examples themselves are correct. This article uses fictional meeting notes being organized into an action-item list to explain how to create useful examples. It draws on the official TRL SFT documentation and the InstructGPT research, without treating any tool's defaults as universal rules for all models or claiming that the example has undergone a completed training and testing run.
Good Examples Matter More Than Polished Answers
Suppose the goal is to extract tasks, owners, and deadlines from meeting notes. Examples need to teach the model to include only information explicitly stated in the source, mark owners as unassigned when none are given, and leave deadlines blank when none are provided. If annotators guess dates to complete the table, the model may learn to “fill everything in even when information is missing.” The output may look professional while straying from the task's actual requirement: faithfully organizing the source.
Input-output pairs must also be consistent. If sentences with the same degree of ambiguity are treated as definite action items in some examples and left pending confirmation in others, the model receives conflicting signals. Before collecting large amounts of data, define what counts as a commitment, a proposal under discussion, or background information, and have annotators work through the same small set of cases to compare differences. SFT's potential is often limited by how clearly the target is defined; simply adding more examples cannot resolve this.
How Training Uses Inputs and Answers
Common language-model SFT still centers on predicting answer tokens, but the data is organized into explicit task examples. Conversation data needs to preserve system, user, and assistant roles and follow the model's chat template. Incorrect role assignments may teach the model to imitate users asking questions or treat background text as an answer to generate. Data formatting is therefore part of the training target, not merely a packaging detail.
The scope of loss calculation also deserves checking. The TRL documentation offers options to calculate loss only on assistant responses or only on completion content; the specific behavior depends on the data type and template support. The presence of an answer field does not mean the tool necessarily trains only on that field. Before training, inspect the actual tokenization and masking results to confirm that important answer content has not been truncated and that content from roles you do not intend to learn from has not accidentally entered the target.
Read the full description
Meeting text is paired with target action items; SFT learns to organize known facts and preserve unknowns, then is evaluated on new meetings
Example: Pairing Meeting Notes with Action Items
Suppose the input reads, “Xiaolin will send the presentation next week; whether to change the venue will be decided after the administrator replies.” The desired output can explicitly list Xiaolin's task of sending the presentation, retain the source's relative wording for the deadline, and list the venue change as pending confirmation. Without the meeting date, “next week” must not be arbitrarily converted into a calendar date. This is an original teaching example, not a real meeting or a model test result.
Next, create a contrasting input: “Could we ask Xiaolin to consider sending a presentation?” This may merely be a suggestion; whether it counts as a formal assignment should follow the data annotation rules. The test set should include commitments, questions, negations, and statements pending confirmation to check whether the model understands the task's meaning. Testing only sentence patterns identical to the examples may produce impressive formatting scores while concealing the difficulties found in real meetings.
Acceptance criteria should cover at least content accuracy, field formatting, and handling of unknowns. A model still fails if it puts names in the correct fields but invents “tomorrow” as the deadline for an item with no deadline. Conversely, a list that honestly leaves gaps should not be rated worse merely because it looks less complete. This evaluation design also influences data quality, helping the model learn the behavior the product actually needs.
How SFT and Other Methods Divide the Work
Few-shot prompting places examples in the current context and usually does not update model parameters. SFT uses data to train the model, with its effects residing in the trained model's state. LoRA is a parameter-efficient update method that can be used to perform SFT, not a mutually exclusive example format. Preference optimization uses comparisons between better and worse responses, a different signal from directly providing a desired answer; in practice, it can follow learning from examples.
If the task concerns the latest content of weekly meetings, SFT will not automatically read it for you. The application still needs to provide meeting transcripts, relevant project information, and necessary dates so the model can handle the current task. Training can make it better at organizing information, while the data pipeline ensures it sees the correct content. Keeping these responsibilities separate prevents the assumption that a model “trained on company data” knows every subsequent change.
What Evidence Shows That Training Helps?
Holding out unseen meeting data is essential. Ideally, split by meeting or project to prevent rewritten versions of the same meeting from appearing in both training and testing. During evaluation, compare against the original model using a clear prompt to see whether SFT improves performance on real requirements, rather than merely benefiting from a better prompt. Also check whether specialized training has degraded capabilities that need to be retained.
A falling training loss means the model is adapting better to the target being used; it cannot, on its own, prove that action-item lists are more reliable. Before deployment, verify model loading, chat templates, output parsing, and version compatibility. After deployment, spot-check new meeting types and rule changes. If the business definition of “whether a proposal counts as an action item” changes, old examples may also need revision. Do not simply expect an extra sentence at inference time to fully cancel out conflicting signals.
An SFT deliverable ready for handoff should include annotation rules, the scope of data sources, training and evaluation versions, and representative error cases. This information tells the next maintainer what the model has learned and which gaps are intentional. For general readers, the key point to remember is that SFT amplifies the behavior demonstrated in examples, so honesty, uncertainty, and exception handling in the data matter just as much as correct answers.
| Method | Main Focus | What to Watch |
|---|---|---|
| Few-shot prompting | Provide examples in the current context | Usually does not update parameters |
| SFT | Learn to map inputs to desired outputs | Example quality determines the target |
| Preference optimization | Compare the quality of different responses | Requires consistent preference criteria |
Fine-Tuning: Adapting an Existing Model to Your TaskFine-tuning: Adapting an Existing Model to Your TaskFine-tuning continues training an existing model to fit a task or domain. Using support email classification, this article covers data preparation, parameter updates, held-out test sets and version deployment; distinguishes full fine-tuning, LoRA, supervised fine-tuning and RAG; and explains why training gains can mask real-world decline. Learn to judge whether fine-tuning is worthwhile and check format consistency, unknown types, data leakage and loss of prior abilities.Read the full article
What Is Few-Shot Prompting? Teaching Formats Clearly with ExamplesWhat Is Few-shot Prompting? Clarifying Formats with ExamplesFew-shot prompting gives a model a few examples in the same input to guide its work on new data; it is not retraining. Using lost-and-found classification, this article shows how to choose typical, boundary, and missing-data cases so the model does more than mimic wording. Tests, a comparison table, and original diagrams explain when to add examples, when to revise classification rules first, and why examples must be kept separate from validation data.Read the full article
Direct Preference Optimization (DPO): Directly Adjusting Models Through Response Comparisons
Complete AI Terminology Index: From Loop Engineering to Generative AI
Found this guide helpful? Share it with someone who needs it
Lifestyle
Agentic Retrieval-Augmented Generation (Agentic RAG): When to Search Again
Agentic RAG lets models make retrieval decisions, choosing sources, rewriting queries or searching further based on the question and available evidence. Using a concrete LangGraph workflow and a comparison of venue-use conditions, this article contrasts it with fixed RAG and explains stopping criteria, permissions, query logs and cost control. Learn to judge whether a task needs dynamic exploration or a predictable fixed workflow is enough.
Lifestyle
Graph Retrieval-Augmented Generation (GraphRAG): Understanding a Document Collection Through Relationships
GraphRAG uses entities and relationships in retrieval to answer questions about cross-document connections and overall themes. Drawing on Microsoft's original paper and official docs, this article explains entity extraction, community summaries, and local and global search, using local event records to show why different questions need different paths. It also shows how missing links, mistaken name merges, and distorted summaries affect answers: a pretty graph is not verified fact.
Lifestyle
Knowledge Graphs: Making Entities and Relationships Clear
Knowledge graphs organize entities and relationships to trace who took part in what, where and when through links. Using community events, this article covers entity identity, relationship direction, sources and time; compares Resource Description Framework (RDF) and property graphs; and explains why graphs are not equivalent to visualizations or reliable facts. Learn when to build one and how it works with tables, vector search and graph retrieval-augmented generation (GraphRAG).
Lifestyle
Hybrid Search: Balancing Exact Terms and Meaning
Hybrid search merges full-text, vector and other retrieval results to cover exact codes and natural-language needs. An equipment-manual query explains candidate retrieval, deduplication, rank fusion and reranking, including how Reciprocal Rank Fusion (RRF) merges results by rank. Hybrid search is not always more accurate. Learn to test quality with code, paraphrase and no-answer queries and spot biases from permissions, filters and duplicate content.
Articles that cite this one
Sources
- Hugging Face TRL: SFT TrainerChecked:
- Ouyang et al.: Training language models to follow instructionsChecked:
Compiled from the references and verification dates listed above; fares, schedules, product features, and terms can change, so please confirm the latest details on the relevant official website before travelling, booking, or purchasing.