Developer and Text Tools

Preparing a Clean Fine-Tuning Dataset in JSONL

How to turn example conversations into fine-tuning data that uploads and trains well: formats, common errors, duplicates, system prompts and splits.

Saizul Amin
Saizul Amin3 Nov 2026 · 3 min read
Preparing a Clean Fine-Tuning Dataset in JSONL

Fine-tuning changes how a model answers by showing it examples of the answers you want. That makes the dataset the most important part of the job, and also the part most often rushed. A single malformed line can fail an upload. A handful of duplicated answers can tilt the model toward them. A blank answer quietly teaches it to say nothing. Cleaning the data before you pay for training is the best investment in the whole process.

Pick the right format

Providers disagree on the file layout. OpenAI wants one JSON object per line with a messages list of system, user and assistant turns. Claude on Amazon Bedrock wants the system prompt in its own field and alternating user and assistant messages. Gemini on Vertex AI wants contents with parts and calls the assistant role model, with the system prompt in systemInstruction. Open-source trainers often use ShareGPT conversations or Alpaca records with instruction, input and output.

The LLM Fine-Tuning Dataset Builder and Validator reads all of these, plus CSV files with system, prompt and completion columns, and detects the format of each line. You choose the target format only at export, so you can keep one dataset and produce files for several providers.

The errors that break uploads

Each example should begin with a user turn after the system prompt and end with an assistant turn, since the final assistant turn is what the model learns from. Turns should not be empty. Formats that need alternating turns reject two user turns in a row. Examples longer than the model's token limit are cut or rejected. The checker marks all of these as errors, so you can fix or drop them before the provider does it for you after a long wait.

The problems that hurt quality

Duplicates over-weight the answers they repeat, and spreadsheets often contain them after copy and paste. One click removes exact duplicates.

System prompts should be consistent. If most examples carry your production system prompt and a few have none, the model learns two behaviours. Either use the same prompt everywhere, or fill in a default for the examples that lack it.

Watch the answers themselves. One-word replies, refusals and boilerplate such as as an AI language model will be learned and repeated. Very uneven lengths for similar questions teach uneven behaviour. The checker flags these as notices; whether they are wrong depends on what you want the model to do.

How many examples

OpenAI rejects fewer than 10 examples, and most guides suggest starting with 50 to 100 carefully written ones for a visible change in tone, format or behaviour. More helps for new skills, but quality matters more than count. Fifty good examples beat five hundred scraped ones.

Split and estimate

Hold back part of the data for validation, often 10 percent. The provider measures loss on it during training without learning from it, which shows whether the model is memorising rather than generalising. The builder shuffles with a seed, so the same seed gives the same split every time and you can rebuild the files later.

Training is billed on training tokens times epochs. The tool estimates the tokens of your training split, multiplies by the epochs you set and applies the price per million tokens you enter, which gives a cost before you start.

Before you upload

Read a sample of the exported lines, check the provider's current limits for your chosen model, and keep the exported files with your project so you can trace any future model back to the exact data it learned from. Token counts here are estimates, and the checks cover structure and obvious quality issues, not whether each answer is correct. That part still needs a person who knows the subject.

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages