Skip to main content
A synthesis recipe stores the configuration that Oumi uses to generate a dataset. The configuration names the synthesis model, the inference settings, the synthesis type and its inputs, and how the output splits into training, validation, and test data. Running the recipe produces a new dataset, or adds training rows to an existing one. To save and run recipes in the app, see Data synthesis recipes. 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.
  • numSamples must cover every nonzero dataset split. For example, a split of 0.8, 0.1, and 0.1 needs at least 3 samples.
  • datasetDistribution fractions must sum to 1.0, and at least one must be greater than 0.
  • When datasetId is set, only the train fraction can be greater than 0.
  • combinationSampling rates must sum to no more than 1.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.
  • maxUserTurns requires userModelSpec.
  • 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.
  • guidedDecoding is 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 with generateFailureModes set to true. Then use its evaluation ID and the IDs of the failure modes that you want to address.
Keep 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.