Training Data Design, Leakage and Versioning
In this article
- Clean past examples before training: remove near-copies, fix contradictory labels, redact names and add hard cases.
- Split a dataset by thread into training, validation and held-out sets, and say what each one is for.
- Spot a leak or overfitting from the scores and from the loss after each epoch.
- Write a dataset version record that ties the data to its held-out set, prompt and base model.
- Terms defined here: data split, overfitting, dataset version.
Overview
You have 2,000 old support tickets, each with the category a support agent gave it, and you want a model that sorts new tickets the same way. The obvious plan is to export them all, hand them to a tuning job and read the score at the end. That plan can give you a model that scores 91% on its test tickets and sorts only 78% of real ones correctly, and nothing in the job's output tells you which number is true.
The gap comes from the data, not the training method. Here you prepare data so the score means something: clean the examples, cut them into three parts that never share a conversation, catch overfitting, and record which data, prompt and model a result belongs to.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- What a tuning job reads and writes
- From 2,000 tickets to 1,900 examples
- Three splits, cut by thread
- The leak you can predict
- Watching validation loss
- The version record
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions