Practical Guide

Curating Training
Data for LLMs

How to build training datasets for each stage of LLM development: pre-training corpora, fine-tuning pairs, preference rankings, RL trajectories, and safety data. What to collect, how to structure it, and what to watch out for.

The Framework

Generally, there are three categories of training data:

Stage

What phase of training is the data for? Pre-training, fine-tuning, preference learning, RL, or safety.

Format

What shape is each example? Document chunks, prompt-response pairs, ranked answers, or action trajectories.

Behavior

What should the model learn? Knowledge, helpfulness, safety, tool use, planning, or self-correction.