Prepare a dataset for LLM fine-tuning
A fine-tuning dataset is a file of examples: the input the model gets and the answer it should give. datafortuning builds that file from data you already have, checks it, lets you review what it flags, and splits it into train, validation and test sets.
Convert CSV to fine-tuning JSONL
Choose I have raw data, upload the CSV, and map one column to the user input and one to the answer. Add a system prompt if you want the same instruction on every example. Each row becomes one line in the chat format that most fine-tuning tools read:
ticket_id,message,category T1000,My card was charged twice for the same coffee.,duplicate_transaction
{"messages": [
{"role": "system", "content": "Classify the customer message. Answer with the category only."},
{"role": "user", "content": "My card was charged twice for the same coffee."},
{"role": "assistant", "content": "duplicate_transaction"}
]}The model learns the last assistant message. JSONL works the same way: pick fields by path, such as ticket.body or labels[0].
Rows without an answer can still be imported. They wait in review with "needs a label"; type the answer to approve them. They are never exported as they are.
Turn LLM logs into training data
Choose I have LLM interactions and upload a CSV or JSONL export from your app or logging tool. Map what you have:
| Field | What it does |
|---|---|
| Messages, or user input | The conversation up to the answer, as a list of {role, content} (system, user and assistant turns are kept), or one input field. If the list ends with the model's reply, that reply is the response. |
| Model response | What the model answered. A candidate, not the truth. |
| Human correction | A corrected answer. Used instead of the model's answer, and approved. |
| Feedback | Thumbs up or down, true or false, accepted or rejected, or a 1 to 5 rating (4 and 5 positive, 1 and 2 negative). A 1 on its own is read as a thumbs up. Anything else, or nothing, stays unknown. |
| Status | Records marked error, failed, timeout, incomplete or cancelled are left out. |
| Task | Keep one task per dataset. If your logs mix tasks, choose which to keep; the rest are set aside with a reason. |
| Group ID, timestamp, cost, record ID | Group keeps a conversation or customer in one split. Timestamp lets you test on the most recent records. Record ID and cost are kept with the source record. |
How each record starts in review:
- Human correction: approved, using the correction.
- Model answer with positive feedback: waits for you. A thumbs up says the answer was acceptable, not that it is the best answer to train on.
- Model answer with no feedback: waits for you.
- Model answer with negative feedback and no correction: rejected.
- Failed or incomplete, or another task: rejected.
Nothing with an unknown answer is approved for you. Use bulk approve on a filter, such as everything with a thumbs up, when you have checked a sample of it.
Clean an existing training file
Choose I have a training dataset. We read these formats, the same ones Tuneweights reads:
{"messages": [{"role": "user", "content": "..."}, {"role": "assistant", "content": "..."}]}
{"prompt": "...", "completion": "..."}
input,output (CSV, with an optional system column)What we check
Errors stop a record from being exported until you fix it:
- No user input, or no answer
- A role other than system, user or assistant (tool and function messages are not supported), or an empty message
- Broken characters from a wrong encoding
- Longer than the sequence limit, 2,048 tokens by default (estimated at about 4 characters a token, as Tuneweights does)
- Classification: a label that is empty, longer than 100 characters or on several lines
- JSON answers: not valid JSON, or not matching your JSON Schema. We check type, properties, required, additionalProperties, enum, const, items, minLength, maxLength, minimum and maximum
Flags are for you to look at: duplicates, the same input with different answers, labels with fewer than 3 examples, and likely personal data (emails, phone numbers, card numbers, Aadhaar, PAN and SSN numbers, IP addresses).
Personal data detection uses fixed patterns. It misses things and flags some harmless numbers. Masking replaces what it finds with placeholders such as [EMAIL]; it is not anonymisation.
None of the checks can tell you if an answer is right. Review a sample of every group you approve.
Deduplicate a fine-tuning dataset
Two examples are duplicates when their messages are the same after we normalise Unicode, line endings and spaces (case is kept). The first copy stays; later copies are rejected with the reason "Exact copy of an earlier example", and you can bring any back. Examples with the same input and different answers are flagged as conflicting and stay in review until you choose. Reworded near-duplicates are not detected yet.
Split without leakage
The default is 80% train, 10% validation and 10% test. Examples with the same input, and records with the same group ID, always go to the same file, so the model is not tested on what it trained on. For classification, each label is spread across the files when there are enough examples; you are warned when there are not. You can also make the test set the most recent records, by timestamp.
The split uses a seed: the same data and seed always give the same split. Every export reports how many inputs and group IDs cross files (it should be 0). This catches exact matches only.
What you download
| File | Contents |
|---|---|
train.jsonl | Examples to train on |
validation.jsonl | Examples to check progress and tune settings |
test.jsonl | Examples for one final evaluation. Never train on them |
manifest.json | The source record ID of every line, the field mapping, split settings and seed, and what was left out and why |
quality_report.json | Counts, reasons and label distribution from review |
README.md | A summary of all of the above |
Only approved examples without errors are exported. Record IDs and other source details stay in the manifest, never in the training messages. Each export is saved as a numbered version you can download again.
Fine-tune with Tuneweights
Tuneweights is optional. To use it, go to tuneweights.com and upload train.jsonl as the dataset and validation.jsonl as the evaluation file. It trains on all of train.jsonl and compares the base and fine-tuned models on validation.jsonl, which keeps related records apart from training. Keep test.jsonl for your own final check.
Limits and privacy
- 10 MB per file, 10,000 records per project, 3 projects per account.
- Files, exports and record text are encrypted on our servers in India. Nothing is sent to an AI model or another service.
- Projects are deleted 30 days after their last activity, or when you delete them. You can delete your account and all its data on the Account page.