BEFORE YOU START
You need:- At least one tool with a tool implementation that answers its calls. The Tools section appears only when your project has at least one tool.
- A model that can call tools. For a model you trained,
GET /v1/projects/{project_id}/models:supported_modelsreportssupportsToolCallingfor its base model. Oumi rejects a job whose model can’t call tools. - For a simulated user, a model to play the user. The User Model list shows only models that can.
GENERATE AGENT CONVERSATIONS
To add tools and a simulated user to a job:- On the Datasets page, click
Create Dataset. - Click
Generate Completionsto add responses to an existing dataset, orGenerate Synthetic Data from Scratchto synthesize new conversations. - Configure the job as in Synthesize data. The model you select writes the assistant turns.
- With Generate Completions, in Synthesis Configuration, select the
Modeland theSource Datasetthat holds the opening user messages. - With Generate Synthetic Data from Scratch, make the
Chatattribute end on a user message. Otherwise each row fails with “Synthesis produced no opening conversation turn.”
- With Generate Completions, in Synthesis Configuration, select the
- In the Tools section, open
Select tools and implementationsand check one implementation for each tool the model may call. You can pick only one implementation per tool name. - Optional: in the User Model section, select a model to play the user, and set Max user turns. The count includes the first user message.
- Click
Execute, enter a name in Name your new dataset, and clickGenerate CompletionsorGenerate Dataset.
Chat attribute builds, minus any assistant messages at the end. The model then continues the conversation, calling the attached tools and, with a user model, trading turns with the simulated user. To steer the simulated user with a persona, see Simulated users.
REVIEW THE OUTPUT
Each output row contains the full conversation: thetools the model could call, assistant messages with structured tool_calls, tool results, and any simulated user messages. A tool-calling assistant message often has empty text content because the call is in tool_calls. The dataset’s Overview tab lists, under Tools, the tools that the generating job made available.
When a conversation reaches the assistant turn limit, Oumi replaces the last assistant message with a fixed note and handles the row as follows:
- Generate Synthetic Data from Scratch drops the row. The job completes with a partial failure that lists the row with the reason “The assistant exceeded the maximum tool-call turns.”
- Generate Completions keeps the row and sets
tool_call_limit_exceededto"true"in its metadata. Filter these rows out before you train on the dataset.
SPLIT THE WORK INTO TWO JOBS
Generating conversations with tools and a simulated user costs far more than generating prompts, so split the work:- Run a synthesis job without tools that produces the opening user messages and a
user_personafor each row. - Review a sample of rows. Check for duplicates, confirm that personas vary, and confirm that the prompts exercise each tool.
- Run Generate Completions on that dataset with tools and a user model, using a strong model as the assistant.
- Evaluate the output and keep only rows that pass your evaluators. Also remove rows with repeated tool calls or the
tool_call_limit_exceededflag.
WITH THE API
SetagenticInferenceConfig on a POST /synthesis:generate-responses request, or in the recipeConfig of a POST /synthesis:run request. See agenticInferenceConfig. Calls use your API key in the X-API-Key header.
synthesis:run requires a hosted model, and Document Q&A synthesis does not accept tool implementations. synthesis:generate-responses also accepts custom and pretrained models that support tool calling.