SFT data: what good expert demonstrations look like
For companies4 min read
SFT data teaches a model by example: a prompt and the answer an expert would give. Good demonstrations are correct, in the format you want the model to copy, and written the way a careful person actually works. The set does not have to be large, but every item has to be right.
What a demonstration is
In the InstructGPT work, labelers wrote demonstrations of desired behaviour and the team used them to fine-tune GPT-3 with supervised learning, before collecting rankings for the next stage. The paper reports that outputs from the 1.3 billion parameter InstructGPT model were preferred to those of the 175 billion parameter GPT-3. The lesson for a buyer is that the demonstrations set the target behaviour that everything after builds on.
Source: Training language models to follow instructions with human feedback(opens in a new tab)
Less data, more care
The LIMA paper fine-tuned a 65 billion parameter model on 1,000 curated prompts and responses, using only the standard supervised loss. The authors conclude that most knowledge comes from pretraining and a limited amount of instruction data is enough for high-quality output. For you, this means that a few hundred excellent examples can beat thousands of average ones, at least for style and format.
Source: LIMA: Less Is More for Alignment(opens in a new tab)
Qualities of a good demonstration
| Quality | What it looks like | Failure |
|---|---|---|
| Correct | Facts and calculations checked | Plausible but wrong |
| Complete | Answers all parts of the prompt | Misses a sub-question |
| Right length | As long as the answer needs | Padding, or too terse to be useful |
| Honest | Says what is unknown or needs more info | Confident guesses |
| Consistent style | Same voice and structure across writers | Ten writers, ten formats |
| Shows reasoning | Steps the reader can follow | Final answer only |
| Safe | Declines what it should and explains | Refuses ordinary requests |
Brief your writers with real examples
- Write five model demonstrations yourself and annotate why each is good.
- Add two bad examples with the reason, so writers see the line.
- Set the length range and format rules, such as headings, units and code style.
- Say what to do when the prompt is unclear: ask a clarifying question or state an assumption.
- Run a calibration round, then compare writers' answers to the same five prompts.
Record format
Hugging Face TRL documents the usual shapes. A conversational prompt-completion record has a prompt list of messages and a completion list, and the SFT trainer accepts language-modelling or prompt-completion types.
{ "prompt": [{"role": "user", "content": "How do I explain a left join?"}], "completion": [{"role": "assistant", "content": "A left join keeps ..."}]}Source: Hugging Face TRL: dataset formats and types(opens in a new tab)
Keep extra fields outside the training columns, such as writer id, review status, source and guideline version. They are what you will use when something goes wrong.
Review before you train
- Have a second expert check a sample from every writer, not just a random sample overall.
- Remove duplicates and near duplicates. Repeated items overweight one pattern.
- Look at the whole set side by side: variety of topics, length distribution, how often each phrase appears.
- Check for AI-written text if your policy forbids it, because a model trained on its own style learns little.
Common traps
- One star writer whose style dominates.
- Too many easy prompts, so the model never sees hard ones.
- Mixing formats, so the model learns to switch randomly.
- Stopping after the first batch without checking what the model learned.
A before and after
A prompt asks how to handle a late payment from a customer. A weak demonstration says to contact the customer and request payment. A strong one asks what the contract says about payment terms, suggests a polite first reminder with a date, notes when to escalate, and states the assumptions it made. The second is longer, but each sentence does something. When you brief writers, show pairs like this, so they see the level you want.
Mix of prompts
Include prompts with missing information, prompts with a false premise, and prompts the model should decline. If every prompt is well-formed and answerable, the model learns to answer everything with confidence. Showing an expert asking for clarification, or saying that the premise is wrong, teaches a behaviour you will want in production.
Track writers over time
Keep each demonstration linked to its writer and review result. After a few weeks, look at the share of demonstrations each writer had changed or rejected in review. Writers with a low rate can review others. Writers with a high rate need guidance on specific points, which you can usually name from their rejected samples. The record turns vague impressions of quality into something you can act on.
Curatrain's experts write expert demonstrations for SFT, and engineers, doctors, lawyers and other specialists are vetted with skill tests per skill and level, so you can choose writers whose background matches the domain.