Use Generative Actions in Microsoft Copilot Studio (preview)

Important

Power Virtual Agents capabilities and features are now part of Microsoft Copilot Studio following significant investments in generative AI and enhanced integrations across Microsoft Copilot.

Some articles and screenshots may refer to Power Virtual Agents while we update documentation and training content.

[This article is prerelease documentation and is subject to change.]

Generative actions allow you to replace the traditional, natural language-based approach for topic triggering (using the trigger phrases you've defined in each topic). Instead, your copilot uses GPT to select one or more topics or plugin actions to respond to a user's query. All topics and plugin actions have an associated description, which is the primary piece of information used when selecting which item should be selected.

Important

This is a preview feature. Preview features aren't meant for production use and may have restricted functionality. These features are available before an official release so that customers can get early access and provide feedback.

Tip

When using AI-generated content, such as the generated questions when running a plugin action, it's a good idea to inform your users that some of the conversation may be generated by AI.

For example, you could add an extra message in the Start conversation System topic, which controls the message shown to your users when a new conversation is started with the bot.

Enable generative actions

To enable the generative actions preview:

  1. Navigate to the Generative AI page using the left hand navigation.

  2. Enable the toggle for Dynamic chaining with generative actions.

  3. Click Save at the top of the page.

Once generative actions is enabled, the Topics page in the left hand navigation is replaced with Plugins (preview).

Screenshot of the Generative AI page with generative actions enabled.

How your copilot responds to user queries with generative actions

Generative actions create more natural and fluid conversations for users in your copilot.

When a user sends a message, GPT selects one or more plugin actions or topics in its response. Various factors determine which topics and plugin actions are used. The primary factor comes from the description with each item. Other factors include the name and any inputs or outputs (and their names and descriptions).

Once plugin actions and topics are selected, a plan is generated that determines the order they get executed. The copilot prepopulates any inputs required by the plugin actions and topics. These inputs are extracted values from the user's query or identified values from the previous conversation context.

The plan is reassessed and updated, if needed, after each new message is received from the user. The reassessment allows for scenarios such as interruption, where additional items are added to the plan, or cancellation.

Testing your copilot using generative actions

When testing your copilot with generative actions enabled, you can open the new tracing mode, by selecting the tracing mode button at the top of the test canvas pane.

Screenshot of the test canvas, showing the tracing mode button with the tracing mode window open.

Now, when you ask your copilot a question in your test canvas, you can see a visual representation of the plan that was generated. Here, the user asked, "what's the weather like?", and you can see the plugin action that was selected to respond and the missing input that needs to be collected, along with annotations from the copilot about its decision making.

Screenshot of tracing mode showing an example of how a plan is represented.

Authoring descriptions

Once generative actions are enabled, each of the plugin actions and Topics within your copilot must have a high quality description to ensure your copilot selects the right ones to respond to a user.

For plugin actions, authoring a description is part of the wizard used to add them to the copilot. They're often prepopulated for you, but you can make changes as appropriate. You can find more details about how to add and manage plugin actions in your copilot at the plugin actions article.

For topics, once generative actions is enabled, the Dynamic Chaining trigger is shown in place of the previous Phrases trigger, which allows you to add or edit the description for the topic.

Dynamic chaining trigger for a topic with a description populated

Tip

For any topics that have trigger phrases that exist within your copilot when you enable generative actions, a default description is generated for you using those trigger phrases. In many cases this should allow your topic to be selected in response to relevant user queries, it's a good idea to amend the description using the advice provided in this article.

Writing a good quality description

Here are some best practices for drafting clear, concise, and relevant descriptions for topics and plugin actions within your copilot.

  • Use simple and direct language. Avoid jargon, slang, or technical terms.
  • Use the active voice and the present tense for descriptions. For example, write "This plugin provides weather information" instead of "Weather information is provided by this plugin".
  • Use keywords that relate to the plugin's functionality and the user's intent. For example, if the plugin provides weather information, use keywords like "weather", "forecast", "temperature", "rain", "snow", and so on.
  • For the description, write a short and informative summary of the plugin's functionality. The summary should be one or two sentences long and explain what the plugin does and how it benefits the user.
  • As well as a good description, use a descriptive and unique name for the plugin that is a short phrase. Avoid using generic or ambiguous names that could be confusing. For example, instead of naming the plugin "Weather", name it "Weather Forecast" or "Weather Report".

Here is an example of a description for a Topic that can provide information about current weather conditions.

Name: Weather Forecast 
Description: This topic provides weather information for any location in the world. You can ask for the current weather, the hourly forecast, or the daily forecast.  

Examples of generative actions handling user requests

The following examples are based on a copilot that has two custom topics, one for finding store hours and another for locating a nearby store, and a plugin action based on the prebuilt MSN Weather connector.

Example 1

In this example, the user asks, "What is the weather like in Seattle?". The copilot selects the current weather plugin action and also prepopulates the Location input with Seattle, which was extracted from the user's question.

Screenshot of example 1, showing the weather plugin within tracing mode.

Example 2

In this example, the user asks, "I need to get store hours and find my nearest store". Here, the copilot selects two items, the Store Hours topic and the Store Locator topic, and chains them together to respond to both parts of the user's query.

Screenshot of example 2, showing the 2 Topics that are chained together in tracing mode.

Example 3

In this example, the user has found their nearest store, which was identified as Kirkland, earlier within the conversation. The user then asked, "what's the weather like there?". Here, the copilot selects the current weather plugin action, but prepopulates the location with Kirkland, based on the recent conversation context.

Screenshot of example 3, showing the conversation history and the weather plugin within tracing mode.