Skip to main content
Items marked (preview) in this article are currently in public preview. This preview is provided without a service-level agreement, and we don’t recommend it for production workloads. Certain features might not be supported or might have constrained capabilities. For more information, see Supplemental Terms of Use for Microsoft Azure Previews.
Generate simulated conversations from scenario descriptions and evaluate them at the conversation level. Use this scenario to test your agent’s behavior in controlled situations before deployment. The service generates realistic conversations based on your scenario descriptions and then evaluates them.

Prerequisites

The examples use the SDK client configured in Set up the SDK client.

Understand conversation simulation

This approach is useful for:
  • Pre-deployment testing: Validate agent behavior across diverse scenarios without real user traffic.
  • Edge case coverage: Test scenarios that rarely occur naturally but are important to handle well.
  • Regression testing: Ensure agent updates don’t degrade performance on known scenarios.
  • Scale testing: Generate many conversations quickly to stress-test agent capabilities.
Conversation simulation follows these steps:
  1. You provide a dataset of scenario descriptions—each row describes a situation the simulated user tries to accomplish.
  2. The service uses a simulator model to play the role of the user, interacting with your agent based on the scenario.
  3. Each scenario generates one or more complete conversations.
  4. Conversation-level evaluators assess the generated conversations.
  5. Your project stores both the conversations and evaluation results.

Prepare scenario data

Instead of authoring scenarios by hand, generate them by using the Simulation seed (multi-turn) task type. The generated dataset contains the required test_case_description field and can also contain id, category, and desired_num_turns. Use the generated dataset’s ID as scenarios_id in the simulation run and skip the upload step. See Generate a simulation seed dataset.
Create a JSONL file where each line describes a scenario for the simulated user. Each row must contain test_case_description. The id, category, and desired_num_turns fields are optional. Include details about the user’s goal, context, and constraints. For a complete example, see the conversation evaluation samples in the SDK.
Use these parameters to configure the simulation:

Define evaluators

Select evaluators designed for conversation-level assessment. The simulated conversations automatically map to the evaluators.

Create the evaluation and run

Download sample_data_simulation_scenarios.jsonl.

Next steps