Skip to content

Latest commit

 

History

History
68 lines (52 loc) · 4.87 KB

CONFIGURE_TESTS.md

File metadata and controls

68 lines (52 loc) · 4.87 KB

Configure tests in Power CAT Copilot Studio Kit

Create a new test set

Test sets are used to group multiple tests together. That way, when running tests, you select a test set, and each test in the test set will be executed as part of the run.

  1. Open the Power CAT Copilot Studio Kit application (as seen in installation instructions)
  2. Navigate to Test Sets.
  3. Create a New Copilot Test Set record.
  4. Provide a Name.
  5. Save.

The different types of test

Test Type Description
Response Match This is the simplest type of test, and it can be immediately evaluated.
Compares the copilot response with the expected response.
Attachments (Adaptive Cards, etc.) Compares the copilot attachments JSON response with the expected attachments JSON.
Note: this is the full array of attachments
Topic Match Only available when Dataverse enrichment is configured.
When the Dataverse enrichment step completes, compares the expected topic name and the triggered topic name.
Generative Answers Only available if AI Builder enrichment is configured.
Uses a large language model to assess if the AI-generated answer is close to a sample answer or honors validation instructions.
When Azure Application Insights enrichment is configured, negative tests, such as Moderation or No Search Results can also be tested.

Create a new test

After you've created a Test Set, you can add Tests to it. From the Tests subgrid, select New Copilot Test

image

Column Name Required Description
Name Yes Name of the test. This can be an internal reference ID, e.g., TST-001.
Copilot Test Set Yes Parent test set for the test
Test Type Yes One of the above test types
Send startConversation Event If enabled, the startConversation start will be sent to the copilot so that it proactively starts the conversation, and the test utterance is only sent after.
Expected Position of the Response Message Don't set a value if unsure.
This option allows the to capture a specific copilot response if it sends multiple messages. For example, if the copilot first says "Hello" and then "How can I help you?", and if you want to test the second message, set 2.
Test Utterance Yes The message that you want to send to the copilot as part of the test
Expected Response Depends Mandatory for a Response Match.
Expected response from the copilot.
For a Generative Answers test, this is where you can set a sample answer or your own validation instructions for the large language model.
External Variables JSON JSON record for any external or contextual value you may want to pass of the Copilot as part of the test. E.g.,
{ "Language": "fr" }
Expected Generative Answers Outcome Depends Mandatory for the Generative Answers type of test. Should be either Answered or Not Answered.
When Azure Application Insights enrichment is enabled, you may choose Moderated or No Search Results.
Expected Topic Name Depends Mandatory for Topic Match type of test.
Name of the topic that is expected to be triggered
Expected Attachments JSON Depends Mandatory for Attachments (Adaptive Cards, etc.) type of test.
Full attachments JSON array that is expected from the copilot response.

Use Excel to bulk create or update tests

After creating a test set, you may use Excel to bulk create or update tests.

  1. From your test set record
  2. Switch the subgrid view from Tests to Export/Import View.
  3. In the subgrid commands, select Export Copilot Tests.
  4. Make sure you set the same Copilot Test Set name (must be unique for the import to succeed).
  5. Fill out the required columns.
  6. Navigate to Tests in the left-hand navigation bar.
  7. Select Import from Excel
  8. Select your file and select Next.
  9. Submit for import.
  10. Wait for the import to complete and succeed.

Note

Learn more about Excel import and export in Power Apps model-driven apps here: How to import data

Duplicating a Test Set

Users may duplicate a full test set by selecting the Duplicate Test Set command.

image

Next step