Items marked preview in this article are currently in preview. This preview is provided without a service-level agreement, and Microsoft doesn’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.
Prerequisites
- Complete the cloud evaluation prerequisites and client setup.
- A model deployment that supports the Responses API for query generation.
- A model or agent target to evaluate.
Generate synthetic queries
Use theazure_ai_synthetic_data_gen_preview data source type to generate synthetic test queries, send them to a deployed model or Foundry agent, and evaluate the responses. Use this scenario when you don’t have a test dataset. The service generates queries based on a prompt you provide (and/or from the agent’s instructions), runs them against your target, and evaluates the responses.
Before you begin, complete client setup.
How synthetic data evaluation works
- The service generates synthetic queries based on your
promptand optional seed data files. - Each query is sent to the specified target (model or agent) to generate a response.
- Evaluators score each response using the generated query and response.
- The generated queries are stored as a dataset in your project for reuse.
Parameters
Set up evaluators and data mappings
For target evaluations, map every required evaluator input explicitly. In this synthetic-data example, generated queries are available as{{item.query}},
and target responses are available as {{sample.output_text}}.
Create evaluation and run
- Python
- C#
- JavaScript/TypeScript
- cURL
Model target
Generate synthetic queries and evaluate a model:input_messages with synthetic data generation, include only system role messages - the service provides the generated queries as user messages automatically.Agent target
Generate synthetic queries and evaluate a Foundry agent:Next steps
- To poll for completion and interpret results, see Get cloud evaluation results. The response includes an
output_dataset_idproperty that contains the ID of the generated dataset, which you can use to retrieve or reuse the synthetic data. - For complete runnable examples, see sample_synthetic_data_agent_evaluation.py and sample_synthetic_data_model_evaluation.py on GitHub.