/v1/private/datasets/{id}/expansionsExpand dataset with synthetic samplesGenerate synthetic dataset samples using LLM based on existing data patterns
Parameters
idstring · uuidpathrequiredRequest body
application/json
custom_promptstringCustom prompt to use for generation instead of auto-generated one
max_completion_tokensinteger · int32Maximum number of tokens for the LLM response. Required by Anthropic, used as maxOutputTokens for Gemini. If not provided, defaults to 4000 for Anthropic models only.
modelstringrequiredThe model to use for synthetic data generation
preserve_fieldsarray of stringFields to preserve patterns from original data
Show child attributes
sample_countinteger · int32Number of synthetic samples to generate
variation_instructionsstringAdditional instructions for data variation
{
"custom_prompt": "string",
"max_completion_tokens": 0,
"model": "gpt-4",
"preserve_fields": [
"input",
"expected_output"
],
"sample_count": 10,
"variation_instructions": "Create variations that test edge cases"
}Responses
generated_samplesarray of objectList of generated synthetic dataset items
Show child attributes
Show array items
created_atstring · date-timecreated_bystringdataobjectrequireddataset_idstring · uuiddataset_item_idstring · uuidDeprecated. Always equals 'id'. Retained for backward compatibility and will be removed in a future version
descriptionstringevaluatorsarray of objectShow child attributes
Show array items
configobjectrequirednamestringrequiredtypestringrequiredexecution_policyobjectShow child attributes
pass_thresholdinteger · int32runs_per_iteminteger · int32experiment_itemsarray of objectShow child attributes
Show array items
assertion_resultsarray of objectShow child attributes
Show array items
passedbooleanreasonstringvaluestringcommentsarray of objectShow child attributes
Show array items
created_atstring · date-timecreated_bystringidstring · uuidlast_updated_atstring · date-timelast_updated_bystringsource_queue_idstring · uuidtextstringrequiredcreated_atstring · date-timecreated_bystringdataset_item_idstring · uuidrequireddescriptionstringdurationnumber · doubleexperiment_idstring · uuidrequiredfeedback_scoresarray of objectShow child attributes
Show array items
category_namestringcreated_atstring · date-timecreated_bystringlast_updated_atstring · date-timelast_updated_bystringnamestringrequiredreasonstringsourcestringrequiredsource_queue_idstring · uuidvaluenumberrequiredvalue_by_authorobjectidstring · uuidinputobjectShow child attributes
anyOf · 3 options
last_updated_atstring · date-timelast_updated_bystringproject_idstring · uuidproject_namestringstatusstringtotal_estimated_costnumbertrace_idstring · uuidrequiredtrace_visibility_modestringusageobjectidstring · uuidStable item identifier. On write, used as the upsert key. If omitted, a new ID is generated. Remains the same across dataset versions
last_updated_atstring · date-timelast_updated_bystringrun_summaries_by_experimentobjectsourcestringrequiredspan_idstring · uuidtagsarray of stringShow child attributes
trace_idstring · uuidgeneration_timestring · date-timeGeneration timestamp
modelstringModel used for generation
total_generatedinteger · int32Total number of samples generated
{
"generated_samples": [
{
"created_at": "2026-06-09T00:00:00Z",
"created_by": "string",
"data": {},
"dataset_id": "00000000-0000-0000-0000-000000000000",
"dataset_item_id": "00000000-0000-0000-0000-000000000000",
"description": "string",
"evaluators": [
{
"config": {},
"name": "string",
"type": "code_metric"
}
],
"execution_policy": {
"pass_threshold": 0,
"runs_per_item": 0
},
"experiment_items": [
{
"assertion_results": [
{
"passed": true,
"reason": "string",
"value": "string"
}
],
"comments": [
{
"created_at": "2026-06-09T00:00:00Z",
"created_by": "string",
"id": "00000000-0000-0000-0000-000000000000",
"last_updated_at": "2026-06-09T00:00:00Z",
"last_updated_by": "string",
"source_queue_id": "00000000-0000-0000-0000-000000000000",
"text": "string"
}
],
"created_at": "2026-06-09T00:00:00Z",
"created_by": "string",
"dataset_item_id": "00000000-0000-0000-0000-000000000000",
"description": "string",
"duration": 0,
"execution_policy": {
"pass_threshold": 0,
"runs_per_item": 0
},
"experiment_id": "00000000-0000-0000-0000-000000000000",
"feedback_scores": [
{
"category_name": "string",
"created_at": "2026-06-09T00:00:00Z",
"created_by": "string",
"last_updated_at": "2026-06-09T00:00:00Z",
"last_updated_by": "string",
"name": "string",
"reason": "string",
"source": "online_scoring",
"source_queue_id": "00000000-0000-0000-0000-000000000000",
"value": 0,
"value_by_author": {
"additionalProp1": {
"author": "string",
"category_name": "string",
"last_updated_at": "2026-06-09T00:00:00Z",
"reason": "string",
"source": "online_scoring",
"source_queue_id": "string",
"span_id": "string",
"span_type": "string",
"value": 0
}
}
}
],
"id": "00000000-0000-0000-0000-000000000000",
"input": [
{}
],
"last_updated_at": "2026-06-09T00:00:00Z",
"last_updated_by": "string",
"output": [
{}
],
"project_id": "00000000-0000-0000-0000-000000000000",
"project_name": "string",
"status": "failed",
"total_estimated_cost": 0,
"trace_id": "00000000-0000-0000-0000-000000000000",
"trace_metadata": [
{}
],
"trace_visibility_mode": "default",
"usage": {
"additionalProp1": 0
}
}
],
"id": "00000000-0000-0000-0000-000000000000",
"last_updated_at": "2026-06-09T00:00:00Z",
"last_updated_by": "string",
"run_summaries_by_experiment": {
"additionalProp1": {
"passed_runs": 0
}
},
"source": "manual"
}
]
}