Vibe Coder · Unit 19: Fine-Tuning a Model · Lesson 2 of 4
Training data
A fine-tuned model is its dataset. The chat format every trainer expects, how many examples you need, where to get them, and the hold-out set that tells you whether it worked.
Read the short notes and pictures.Do everything inside a blue frame.
The dataset is the product
In fine-tuning you do not write instructions. You show examples, and the model learns whatever pattern they share, including the patterns you did not intend. If half your examples end with an exclamation mark, so will the model. Building the dataset is most of the work and nearly all of the quality.
The format
Trainers expect chat-style examples: a list of messages with roles, ending with the assistant reply you want. They are stored as JSON Lines, a text file with one complete JSON object per line.

One line of train.jsonl
{"messages": [
{"role": "system", "content": "You write payment reminders for freelancers."},
{"role": "user", "content": "Client Sam, invoice 42, 9 days late, first reminder."},
{"role": "assistant", "content": "Hi Sam, a quick note that invoice 42 is now 9 days overdue. Could you let me know when to expect payment? Thanks, Asha"}
]}What each part is
system: the standing instruction. Keep it the same in every example and use the same one after training. user: a real input. assistant: the exact output you want. This is what is learned.
How many
OpenAI’s guide for its own service set a minimum of ten and recommended starting with about fifty well-made examples, then evaluating before adding more. That is sound advice for any trainer. A narrow task often needs a few hundred. If results are poor, look at the quality of what you have before you add volume.
Where good examples come from
Real inputs
Take them from your product, your inbox or your logs, with personal details removed.
Checked outputs
Have a strong model draft the output, then correct every one by hand. The corrections are the value.
Coverage
Include the hard cases: the angry message, the missing field, the edge of the policy.
Consistency
Two people should agree on every ideal output. If they would not, the task is not defined yet.
The hold-out set

Set aside part of your examples before training and never train on them. After training, run those inputs through the base model and through the tuned model and compare. If you test on examples the model was trained on, it will look excellent and tell you nothing.
Shuffle, then split
About eight in ten for training, two in ten held out.
Check the split covers every kind of case
Not all the hard ones in one half.
Freeze the hold-out set
Do not look at it while you improve the training data.
You have 60 reminder emails you wrote yourself over two years. Is that a good dataset? Name one strength and two risks.
Build a small dataset
For the task you chose, build at least fifty examples in chat format: real inputs, with outputs you have checked line by line. Remove private details. Split them into a training file and a hold-out file.
Done when
Keep both files. They go into your repository if they contain nothing private.
Keep these
- Each example is a short conversation ending in the ideal reply.
- Start with about fifty careful examples from real inputs.
- Hold some back, and test only on those.