Match each instruction dataset to its on disk row shape.
Drag each answer to line up with its matching prompt
Alpaca
Flat record per row: { instruction, input, output }, input is optional context, output is the single target response.
ShareGPT
Multi-turn list per row: conversations: [{ from: 'human', value: ... }, { from: 'gpt', value: ... }, ...], from distinguishes the speaker.
OpenAssistant (OASST)
One JSON object per line: { messages: [{ role: 'system'|'user'|'assistant', content: ... }, ...] }, the canonical hosted FT format.
FLAN
Conversation TREE: each row is one message with role, parent_id, message_id, and rank, children branch off any node, you reconstruct a thread by walking parent links.
OpenAI Chat JSONL
Templated NLP task pairs: { input_text, target_text } (sometimes inputs/targets) with the task instruction baked into input_text by a prompt template.
Alpaca is flat instruction, input, output, ShareGPT is a conversation list with from tags, OASST is a parent_id message tree, FLAN is input_text-target_text pairs, OpenAI Chat-JSONL is the role-tagged messages array.
Imagine five different ways to record a tutoring conversation. Alpaca writes one neat card with the question, optional context, and the answer. ShareGPT writes a small script of who said what in order. OASST is more like a family tree of replies where any line can branch into several follow-ups. FLAN fills out a worksheet with a prompt and the expected response. OpenAI Chat-JSONL is a tidy diary where every entry tags the speaker as system, user, or assistant. Each format suits a different purpose, and recognising the shape on disk tells you what the dataset was built for.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Instruction-tuning datasets come in a handful of stable shapes, and recognising the shape from a few sample rows tells you what the dataset was built for, how to load it, and what its limitations are. The five formats in this match exercise (Alpaca, ShareGPT, OASST, FLAN, OpenAI Chat-JSONL) cover the dominant shapes you will encounter in 2026 fine-tuning work, both for community datasets on Hugging Face and for hosted-API uploads.
The matching becomes fast once you sort by topology. Three of the five are flat (one example per row), one is a list per row (multi-turn conversation), and one is a tree spread across many rows (branching message graph). Topology narrows the candidates immediately, then field names disambiguate the rest.
This deep dive walks each format in detail, explains what the field-name vocabulary tells you about the dataset's origin and intent, and covers the practical question of how modern training stacks normalise across these shapes. The end goal is not memorising five schemas, it is recognising a shape from a row sample and knowing what to do with it.
Alpaca: the flat instruction, input, output format
Alpaca's row schema is the simplest of the five. Each row is one example with three fields: instruction (the task, always present), input (optional context, often empty), and output (the target response).
The instruction-only variant has input set to an empty string in many examples, and downstream training scripts often treat empty input as a different prompt template than non-empty input. The Stanford Alpaca paper showed prompts like Below is an instruction that describes a task for empty-input rows and Below is an instruction that describes a task, paired with an input that provides further context for non-empty input rows.
The format originated with the Stanford Alpaca release in 2023, which fine-tuned LLaMA-7B on 52k self-instruct generated examples. The simplicity made it widely copied, and many subsequent instruction datasets (Alpaca-LoRA, Alpaca-Cleaned, Code Alpaca) followed the same three-field schema. It is now the de facto starter format for community fine-tuning tutorials.
The format's limitation is that it cannot represent multi-turn conversations. Each row is exactly one user-assistant pair, no system prompt, no follow-up turns. For genuinely conversational tasks the format has to be either extended (some communities add a system field) or replaced with a conversational format like ShareGPT or OpenAI Chat-JSONL.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Hugging Face's tulu-v3 mix in 2026 converts source datasets including Alpaca, ShareGPT, and OASST descendants into a unified ShareGPT-shape JSONL for community fine-tuning.
- OpenAI's hosted fine-tuning for gpt-5.5 accepts only the Chat-JSONL format, so most other formats must be transformed before upload.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy does OASST use a tree structure instead of just storing flat conversations?
OASST collected human preferences over alternative replies to the same parent message. The tree captures that branching naturally, each node has a rank that says how humans rated it among siblings. Flattening to a list would discard the rank information and the alternative-reply structure, which is exactly the data needed for preference optimisation.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Confusing ShareGPT and OpenAI Chat-JSONL because both encode conversations. The giveaway is the field names, ShareGPT uses from and value with informal speaker tags, OpenAI uses role and content with strict role names.
60 second bullets to scan on the way to the call.
The three required fields of an Alpaca row and which one is optional
The speaker tag and value field names that identify ShareGPT
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.