← All news

News / Learn / Fine-tuning

How do you prepare fine-tuning data?

You'll be able to turn raw examples into clean, consistent training data for fine-tuning a model.

Fine-tuning teaches a model to behave the way you want by showing it many examples. Each example is an input and the ideal output. The model learns from the pattern across these examples, so the quality and consistency of the examples decide the result.

Most fine-tuning failures trace back to the data, not the training run. Bad examples teach the model bad habits, and a small set of clean examples often beats a large messy one. Preparing data well saves time and money, and it makes your results easier to measure and repeat.

Start by defining the task and the behavior you want. Write down what a good output looks like, including tone, format, length, and what the model should refuse. This definition becomes the standard every example must meet.

Next, collect examples that match real inputs your product will see. Use actual user requests where you can, with anonymized personal data. Include easy cases, hard cases, and edge cases. Each example should be a complete input paired with a correct output.

Then check quality. Remove duplicates, fix wrong answers, and make sure outputs follow the same format and style. Inconsistent labels confuse the model. Have a second person review a sample, because one reviewer often misses their own blind spots.

Split the data into a training set and a held-out set. The held-out set is never used for training. You use it later to test whether the model learned the task or just memorized the examples. Keep the split fixed so you can compare runs fairly.

Finally, format the data the way your training tool expects, usually as a file of records with messages or prompt and completion fields. Validate the file before you spend money on a run. A malformed line can fail a job or silently drop examples.

One training record in chat format. The assistant reply shows the exact style you want the model to copy.

{"messages": [
  {"role": "system", "content": "You answer support questions for a billing product. Be brief. Use plain language."},
  {"role": "user", "content": "Why was I charged twice this month?"},
  {"role": "assistant", "content": "Duplicate charges usually happen when a payment is retried after a timeout. Check your payment history for two entries with the same amount. If you see them, contact support with the dates so we can refund the extra charge."}
]}

A short sketch to show the idea. Check the official docs of the tool you use.

  • Using too many near-identical examples Repetition makes the model overfit to a few phrasings. Remove near-duplicates and add variety in wording, length, and difficulty.
  • Mixing inconsistent styles in the outputs If some answers are long and others short, the model will guess which to use. Write a style guide and check every output against it.
  • Testing on data the model trained on A high score on training examples proves little. Always keep a held-out set that never enters training.
  • Skipping the review of wrong answers Models copy errors faithfully. Verify each output is correct before it goes into the training file.

Learn how to measure data quality with a small pilot run, how to create synthetic examples from stronger outputs, and how to write an evaluation set that reflects your real users.

How many examples do I need?

There is no fixed number. Begin with a small, high-quality set, train, and evaluate. Add examples where the model fails. Quality and coverage matter more than raw count.

Can I use model-generated examples?

Yes, often called synthetic data. Generated examples still need review. Errors in the generator carry into your training set, so check a sample carefully.

Should I include the system prompt in training data?

Include it if you will use the same system prompt in production. Leaving it out means the model learns the behavior without that instruction, which can differ from how you deploy it.

What if my data contains personal information?

Remove or anonymize personal data before training. Check your provider's data terms and your own privacy obligations first.

Written with AI by CapyLaunch. Spotted a mistake? Email hello@capylaunch.com.