Skip to main content
Datasets contain examples for training and evaluating models. Upload them as JSONL files.

Upload a dataset

adaptive.datasets.upload(
    file_path="training-data.jsonl",
    dataset_key="customer-support-v1",
)
ParameterTypeRequiredDescription
file_pathstrYesPath to JSONL file
dataset_keystrYesUnique identifier
namestrNoDisplay name (defaults to dataset_key)

Dataset formats

Each line in your JSONL file must follow one of these schemas:Prompts and completions (most common):
{"messages": [{"role": "user", "content": "Hello"}], "completion": "Hi there!"}
Prompts only (for evaluation with generated completions):
{"messages": [{"role": "user", "content": "Hello"}]}
With feedback metrics (for training on ratings):
{"messages": [...], "completion": "...", "feedbacks": {"quality": 0.8, "helpful": true}}
With preferences (for RLHF/DPO training):
{"messages": [...], "preferred_completion": "Good answer", "other_completion": "Bad answer", "feedback_key": "quality"}
Add optional labels or metadata fields to any format for filtering or custom graders.See SDK Reference for all dataset methods.