# Fine-tuning dataset formats

Fine-tuning dataset formats depend on the training method. Supervised fine-tuning reads conversations, preference tuning reads a chosen and a rejected answer, and reinforcement learning reads prompts with scores or checkable answers.

## What a record looks like

A dataset is a list of records, usually stored as JSONL (one JSON object per line) or Parquet. A conversation is a list of messages, each with a role (`system`, `user` or `assistant`) and its content:

```jsonl
{"prompt": [{"role": "user", "content": "Explain gravity."}, {"role": "assistant", "content": "Gravity is ..."}]}
```

The file holds plain messages. The [chat template](/glossary/chat-template) turns them into tokens when training starts.

## What each method reads

The shapes are common across tools. The column names are the ones Halo reads.

| Method | Trains on | Columns |
| --- | --- | --- |
| [Supervised fine-tuning](/glossary/supervised-fine-tuning) | conversations | `prompt` |
| [Preference tuning](/glossary/preference-tuning) (DPO, SMPO) | a chosen and a rejected answer | `chosen`, `rejected`, optional `prompt` |
| Preference tuning (KTO) | answers labeled good or bad | `prompt`, `completion`, `label` |
| [Offline GRPO](/glossary/offline-grpo) | completions you already scored | `prompt`, `completions`, `rewards` |
| [Online GRPO](/glossary/online-grpo) | prompts with a verifiable answer | `prompt`, `answer` |

## In Halo

`dataset` accepts a Hugging Face Hub ID, a local path (JSON/JSONL, Parquet, Arrow, CSV, or a `save_to_disk` directory) or an S3 path. Some column names are configurable, such as `conversation_field` for supervised fine-tuning. [Datasets](/halo/docs/data) gives the columns and types method by method.

