Tool guide
About this tool.
- Fine-tuning services read training data as JSON Lines: one JSON object per line, each line one example. A single malformed line, a missing assistant turn or a tool result without its call can make a whole training job fail after the upload.
- This tool checks every line before you upload. It knows three formats: OpenAI chat (messages with roles, text parts and tool calls), OpenAI preference pairs for direct preference optimization (input plus a preferred and a non-preferred answer) and Amazon Bedrock (Claude) (an optional system prompt plus alternating user and assistant turns).
- Besides errors it reports statistics: valid and invalid lines, messages and estimated tokens per example, role counts and duplicate examples. Two lines are duplicates when their JSON is equal after sorting the keys, so whitespace and key order do not hide a copy.
- Check a dataset before starting a paid fine-tuning job.
- Find the line that a training service rejected with a vague error.
- Catch tool messages whose tool_call_id no earlier call declared.
- Spot duplicate examples and extra keys left over from a data pipeline.
Paste JSON Lines or choose a .jsonl file; a chosen file replaces the text. Leave the format on Auto-detect or pick OpenAI chat, OpenAI preference or Amazon Bedrock (Claude).
Every line is parsed and checked against the rules of the format: message roles, non-empty content, tool calls with JSON arguments, tool results that answer an earlier call, weights and the order of turns for Amazon Bedrock (Claude).
The report starts with the statistics: lines, valid and invalid examples, duplicates, messages and estimated tokens per example, and role counts. Then come the issues, each with its line number and severity.
Copy the report or save it as dataset-report.txt; dataset-report.json holds every count and up to 10,000 issues.
- A chat line with a user and an assistant message → valid, 2 messages.
- A chat line with only a user message → There must be at least one assistant message.
- A tool message with tool_call_id "call_9" and no earlier call → Message 3: tool_call_id must name a tool call declared earlier.
- Amazon Bedrock (Claude) turns user, user, assistant → Message 2 must be an assistant message.
- A blank line between two examples → Line 2 · error with the message Empty line.
- The same example twice with a different key order → Duplicates: 1 and Duplicate of line 1.
- Processing is local; nothing is uploaded.
- The dataset is limited to 50 MiB, 100,000 lines and 1,000,000 characters per line; more is an error that names the limit.
- The report shows the first 500 issues and says how many there are; the counts are always exact.
- A file must be valid UTF-8; a byte order mark is skipped with a warning.
- Unknown top-level keys are warnings, so the line still counts as valid.
- Statistics cover valid examples only; for preference pairs the messages are those of the input.
- Token estimates are a heuristic, not a tokenizer; real counts vary by model.