Automate evaluations with the Power Platform API - Microsoft Copilot Studio (original) (raw)

Copilot Studio provides makers with tools to continuously evaluate agent performance by running automated tests against predefined test sets using the Power Platform REST API. By using the REST API, you can programmatically trigger agent evaluations as part of your development workflows, such as during agent updates, release validation, or regression testing.

Automating evaluations helps you:

Prerequisites

Overview for running evaluations by using REST API

To run an evaluation by using the Power Platform API, follow these general steps:

  1. Complete the prerequisites.
  2. Find and retrieve the test set ID of the test set you want to use.
  3. Run the evaluation.
  4. Retrieve the results by using the evaluation run ID.

When the request is successful, the evaluation runs asynchronously and produces results that you can review in Copilot Studio.

API operations for automating evaluations

Copilot Studio supports REST API operations that you can use to programmatically trigger evaluations against your agent by using an existing test set.

For more information on how and when to use the Power Platform API, see:

Get agent test sets

Learn more in List Maker Evaluation Test Sets.

Get agent test set details

Learn more in List Maker Evaluation Test Sets.

Start an agent evaluation

Learn more in Run Maker Evaluation Test Set.

Get agent test runs

Learn more in List Maker Evaluation Test Runs.

Get agent test run details

Learn more in Get Maker Evaluation Test Run.

Use a Microsoft Studio Connector ID for evaluations

For Start an agent evaluation, you can optionally add a Microsoft Studio Connector ID to the call as a user profile for the evaluation. To find your mcsConnectionId:

  1. Go to Power Automate.
  2. Open the Connections page.
  3. Select the Microsoft Copilot Studio connection.
  4. Copy the mcsConnectionId from the URL:.../connections/shared_microsoftcopilotstudio/{mcsConnectionId}/details