Preparing your dataset

Your dataset teaches the model the task. This page covers the file format, required fields, limits and how your data is split.

File requirements

FormatJSONL: one JSON object per line. The file name must end in .jsonl.
EncodingUTF-8
SizeUp to 50 MB per file
GroupsAt least 3 distinct group values (see Splits below)
Blank linesIgnored

Format 1: input and expected output

Each row has an input, the output you want, and a group key. By default the fields are input, expected and document_id. You can rename them under Dataset preparation when you set up training.

{"document_id": "inv-001", "input": "Invoice INV-001. Total due: 120.00 USD by 30 Nov.", "expected": {"total": 120.0, "currency": "USD"}}
{"document_id": "inv-002", "input": "Invoice INV-002. Amount payable 89.50 EUR.", "expected": {"total": 89.5, "currency": "EUR"}}
  • input and expected can be text or a JSON object. Objects are kept as JSON.
  • Neither may be empty.

Format 2: chat messages

For conversational tasks, give a messages list. The last message must be from the assistant: that is what the model learns to produce.

{"document_id": "ticket-17", "messages": [
  {"role": "system", "content": "You are a support assistant."},
  {"role": "user", "content": "How do I reset my password?"},
  {"role": "assistant", "content": "Open Settings, choose Security, then Reset password."}
]}
  • Roles can be system, user, assistant or tool.
  • The final assistant message needs content or tool calls.
  • An optional tools list must contain objects.
  • The group key is still required on every row.

Splits: training, validation and test

We split your data by group, never by individual row, so related examples (for example, several rows from one document) stay together and cannot leak between training and testing.

SplitShare of groupsUsed for
Training70%Training the model
Validation15%Evaluation during training, only if you choose “Use the prepared validation split”
Test15%Held out. Never sent for training.

The split is fixed: uploading the same file again gives the same split. Each split gets at least one group, which is why you need at least 3 distinct group values.

Versions

Uploading a file with the same name as an existing dataset adds a new version of it: tickets.jsonl v1, v2, v3 and so on. Each dataset appears once on the Datasets page, with its version history (date, rows, who uploaded it and a fingerprint of the contents). To add a version from a file with a different name, use Upload new version on that dataset.

  • Identical files are not stored twice. If the file is identical to an existing version of the same dataset, the console tells you which version it matches and nothing new is stored.
  • A version never changes. Once uploaded, a version cannot be replaced. Upload a new version instead.
  • Runs record their version. When you create a run you choose the dataset version, and the run shows which version it was trained on. Versions are kept until you ask us to delete the workspace.
  • Renaming a file starts a new dataset. Versions are matched by file name, so tickets-new.jsonl becomes its own dataset unless you use Upload new version.

Common upload errors

MessageFix
Use a JSONL dataset.Save the file with a .jsonl extension.
Dataset must be UTF-8 encodedRe-save the file as UTF-8.
Each JSONL line must be an objectEvery line must be a {...} object, not a list or a value.
row N: missing or empty …Fill in the named field on that row.
row N: missing group key …Add the group key (default document_id) to that row.
'messages' must end with an assistant messageMake the last message in the list an assistant reply.
Need at least 3 distinct group keys …Add more groups, or give rows that are not related their own group values.
The upload did not arrive. Upload the file again.The connection dropped before the file reached storage. Choose the file again.
This dataset version no longer matches its upload.The stored copy failed its integrity check. Upload the file again as a new version and contact support.

Tips for a good dataset

  • Use real examples of the task, with outputs exactly as you want the model to produce them.
  • Keep the output format consistent across rows.
  • Include the hard and unusual cases, not just the easy ones.
  • Remove personal data you do not need for the task.