Resources/Model training/Datasets

Best practice

What makes a good dataset

The properties that decide whether fine-tuning makes a model better — correct, consistent, varied, focused and representative — and how to check each before you train.

Chapter 43 min read5 references

Why quality dominates

Supervised fine-tuning has one source of truth: your examples. The model cannot tell a careless reply from a careful one, so it learns both. A small set of correct, consistent examples usually beats a large set of mixed ones. The LIMA study (2023) made the point vividly: a 65-billion-parameter model fine-tuned on only 1,000 carefully curated examples gave answers that people rated equivalent to or better than GPT-4's in 43% of cases.

The five properties

PropertyWhat it meansHow to check
CorrectEvery target is right: facts, steps, numbers, names.Have someone who knows the subject read 30–50 random targets.
ConsistentSimilar questions get similarly shaped answers.Group replies by topic and compare them side by side; agree a house style first.
VariedShort, vague, multi-part and follow-up questions, not only tidy ones.List the kinds of question you get and check that each appears.
FocusedOne well-defined job, or a few clearly separated ones.Can you describe what the model should do in two sentences?
RepresentativeInputs look like what the model will see in real use.Compare the mix of topics and lengths with real traffic.
how-to40%62%troubleshooting25%22%billing15%12%short or vague15%1%out of scope5%3%real usedataset
Share of each kind of question in real use (outline) and in a dataset (filled). The dataset over-represents tidy how-to questions and almost ignores short, vague ones, so the trained model will be least prepared for a sixth of real traffic.

How many examples

There is no universal number, but there are useful ranges. Narrow tasks with a clear format — answering one kind of question in a fixed style, classifying a request — often show a clear effect with a few hundred examples. Broad assistants covering many topics need thousands. OpenAI's fine-tuning guide reports improvements from 50–100 examples and suggests starting with about 50 well-crafted ones, evaluating, and adding more from there. More data helps most when it adds variety; more of the same adds cost without adding much.

Duplicates and repeats

A conversation that appears twice is trained on twice, and a canned reply used as the target for fifty different questions teaches the model to produce it everywhere. Research on pre-training data shows how much repetition matters: removing near-duplicates from common training sets let models reproduce memorised text about ten times less often. At fine-tuning scale the symptom is a repetitive model that overuses a few stock phrases.

Targets that rely on new facts

Be careful with targets built mostly on facts the base model has never seen. A 2024 study by Gekhman and colleagues found that models learn such examples more slowly than ones consistent with what they already know, and that as they do learn them they become more prone to hallucinate. Where possible, supply specialised or changing facts at request time, and use the dataset to teach how to use them.

Reviewing a dataset before training
  1. Start: 600 support chats with 900 candidate targets.
  2. Correctness: a reviewer reads 50 random targets and finds 6 with an outdated menu name. A search finds 40 more with the same problem; all are corrected.
  3. Consistency: password questions are answered in three different formats. The team picks one and corrects the others.
  4. Variety: very short questions (“export?”) are 15% of real traffic but almost absent from the dataset, so 60 such chats are added.
  5. Repeats: one canned reply is the target 70 times; Data Prep's limit on repeated replies stops it dominating.
  6. Result: fewer usable targets than at the start, but each one teaches the behaviour you want.

Common mistakes

  • Adding more examples of the same kind instead of covering the kinds that are missing.
  • Training on everything that was said rather than on what should have been said.
  • Mixing several answer styles because different people wrote the replies.
  • Leaving out short, vague and awkward questions because they make the dataset look messy.
  • Assuming automatic cleaning checks whether answers are correct.

References and further reading

External sources open in a new tab.

  1. 01LIMA: Less Is More for AlignmentZhou et al., 2023 · arXiv · arxiv.org1,000 carefully chosen examples, and what they achieved.
  2. 02Deduplicating Training Data Makes Language Models BetterLee et al., 2021 · arXiv · arxiv.orgThe measured cost of duplicated training data.
  3. 03Does Fine-Tuning LLMs on New Knowledge Encourage Hallucinations?Gekhman et al., 2024 · arXiv · arxiv.orgWhy targets full of unfamiliar facts can backfire.
  4. 04Supervised fine-tuningOpenAI API docs · developers.openai.comA provider's advice on how many examples to start with.
  5. 05Datasets: Data characteristicsGoogle Machine Learning Crash Course · developers.google.comA short primer on data reliability and quality.

Turn weeks of expert work into minutes

See how Scalata fits your team, your data, and your controls.