Request and response fields use camelCase. The API rejects unknown fields.
There are three synthesis types.
- General generates data from sampled attributes, datasets, structured data sources, documents, or inline examples. General synthesis also supports tool calling and a simulated user.
- Document Q&A generates question and answer data from tagged documents.
- Improved samples generates training or evaluation data from the failure modes of an evaluation.
REQUEST
RECIPE CONFIG
recipeConfig holds the synthesis configuration.
When
datasetId is set, the validation and test fractions must be 0. An existing dataset accepts only training data.
MODEL IDENTIFIER
modelIdentifier names the synthesis model. Synthesis accepts only hosted models, and the model must be one that Oumi supports for synthesis.
INFERENCE CONFIG
inferenceConfig sets inference parameters for the synthesis model.
SYNTHESIS CONFIG
synthesisConfig.synthesisType selects one of three configurations.
GENERAL
synthesisConfig.synthesisConfig takes these fields.
strategyParams takes these fields.
Each
inputData item contains either datasetId or datasourceId. It can also contain attributeMap, which maps column names to attribute IDs.
DOCUMENT Q&A
segmentationConfig takes these fields.
Document Q&A synthesis does not accept tool implementations.
IMPROVED SAMPLES
With
generateNewConversations set to true, each data item produces numSamplesPerItem new conversations. Each one keeps the original’s subject but makes a different request, and the assistant avoids the original’s mistakes. With false, each data item produces one corrected version of itself, and numSamplesPerItem is ignored. See Generate from failure modes.
A data item that called tools is skipped unless agenticInferenceConfig attaches implementations of those tools. Rubric judge failure modes are not supported.
AGENTIC INFERENCE CONFIG
agenticInferenceConfig makes the synthesis model call tools and, optionally, continues each conversation with a simulated user. Omit it for plain single-turn synthesis. Evaluation recipes take the same object. For how-to guides, see synthesis and evaluations.
An empty
agenticInferenceConfig behaves the same as omitting it.
HARNESS
harness selects the registered harness that runs the model’s rollouts.
A harness runs its own tools, so you cannot attach tool implementations. Harness runs are behind a feature flag. Improved-samples synthesis with a harness also requires multi-turn synthesis from failure modes, which is behind a separate feature flag. See Synthesize with a harness.
DATASET DISTRIBUTION
datasetDistribution splits the generated rows across the dataset splits.
The three fractions must sum to
1.0, and at least one fraction must be greater than 0.
RUN REQUEST
POST /v1/projects/{project_id}/synthesis:run starts synthesis. The request references a saved recipe or carries a recipe configuration inline.
VALIDATION RULES
- Synthesis accepts only hosted models that Oumi supports for synthesis.
numSamplesmust cover every nonzero dataset split. For example, a split of0.8,0.1, and0.1needs at least3samples.datasetDistributionfractions must sum to1.0, and at least one must be greater than0.- When
datasetIdis set, only thetrainfraction can be greater than0. combinationSamplingrates must sum to no more than1.0.- Each tool name can be served by at most one tool implementation in
agenticInferenceConfig.toolImplementations. - Document Q&A synthesis does not accept tool implementations.
- A harness cannot be combined with tool implementations.
maxUserTurnsrequiresuserModelSpec.- A job that attaches an interactive tool implementation must set
userModelSpec. - All simulated tool implementations in a job must use the same model.
- When tool implementations are attached, the synthesis model must support tool calling.
guidedDecodingis not supported for synthesis.
EXAMPLES
GENERAL SYNTHESIS FROM A SEED DATASET
This example runs the questions of an existing dataset through the synthesis model, generates an answer for each one, and writes the pairs as conversations. Use it to expand a small seed dataset into a larger training set.DOCUMENT Q&A FROM TAGGED DOCUMENTS
This example generates question and answer pairs from the documents under one tag.IMPROVED SAMPLES FROM FAILURE MODES
This example generates training data from the failure modes of an evaluation. First run an evaluation withgenerateFailureModes set to true. Then use its evaluation ID and the IDs of the failure modes that you want to address.
inferenceSeed fixed for reproducible synthesis runs, and remove it when you want more varied output. Lower requestsPerMinute to stay under a provider’s rate limits. Review the generated rows in the Data Explorer before you train on them.