ShareGPT format: what data shape does it use?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
ShareGPT is multi-turn dialogues stored as a `conversations` array of `{from, value}` objects, where `from` is `human` or `gpt` and `value` is the turn text.
Imagine someone installed a browser extension that captured every chat they had with an AI assistant and let them share the full back and forth with the world. Each shared file is one whole conversation, not just a single question and answer. Inside, the turns are listed in order, and each turn is tagged with who was talking. The two tags borrow the platform's own vocabulary: human for the person typing and gpt for the assistant responding. That captured-conversation shape is the ShareGPT format. The name is literal: people were sharing their GPT conversations, and the file shape mirrors what the extension exported.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: ShareGPT structure (conversations + from/value) + origin as ChatGPT exports + role labels human and gpt + which open-weight models trained on it + conversion to the standard chat format + comparison to Alpaca and DPO formats.
| Format | Multi-turn | Role field | Role values |
|---|---|---|---|
| ShareGPT | Yes | from | human, gpt, (system) |
| OpenAI chat | Yes | role | system, user, assistant, tool |
| Alpaca | No (single-turn) | N/A (flat fields) | N/A |
| DPO preference | No (response pair) | N/A | N/A |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Confusing ShareGPT with Alpaca. Alpaca is single-turn flat fields (instruction, input, output); ShareGPT is multi-turn dialogues as a conversations array of {from, value} objects.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.