ShareGPT format: what data shape does it use?
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.
Detailed answer & concept explanation~7 min readEverything 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. 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.
- Vicuna (LMSys, 2023) was trained on around 70k cleaned ShareGPT dialogues, becoming the first major open chat-tuned model that approached ChatGPT quality.
- WizardLM's early releases blended ShareGPT data with synthetic instruction-evolution data using the same conversations schema.
- Axolotl's training config supports `type: sharegpt` directly, converting to the target model's chat template before training.
- LLaMA-Factory ships a built-in ShareGPT data loader, common across community fine-tuning workflows.
- Open-Assistant and similar conversational datasets are routinely available in ShareGPT format alongside the standard messages format.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow does a training stack convert ShareGPT to the standard chat format?
QWhy did the early open-weight community settle on ShareGPT instead of designing a new format?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
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.
Same topic, related formats. Practice these next.