Build Power Virtual Agent topics with GPT

There were so many announcements this month and most of them were around Microsoft’s new offering called Copilot. Microsoft Copilot is a new product that helps end users be more productive by providing personalized assistance and support within the Microsoft 365 suite of applications. Essentially, Copilot is an AI-powered tool that uses natural language processing and machine learning to understand users’ requests and provide personalized recommendations, tips, and assistance. This means that users can ask Copilot questions and get instant answers, guidance, and suggestions to help them work more efficiently. Copilot is designed to be available across multiple Microsoft 365 applications, including Word, Excel, PowerPoint, Teams and Outlook, and is intended to be context-aware, meaning it understands the user’s specific needs and the task at hand. Some examples of this functionality are the ability to point copilot to a word document, and request to create a power point presentation based on the data in the document! Pretty mind-blowing right?! For more information on how Copilot works check out this video and for more details, make sure to review this video. But it doesn’t stop there! Copilot will also work with tools from the Power Platform and Dynamics 365 products! In this article I am going to discuss Copilot for Power Virtual Agents and show you how much easier bot-building will become!

Preview

First things first, keep in mind this is still a preview feature, which means this is not something that is a finished product yet. This preview also works in conjunction with the existing preview for Power Virtual Agents, which has the new authoring canvas experience, conversation booster and lots of other things. For more information, take a look at this article I wrote on this topic. After you create a new bot (or open an existing bot that was created under the preview instance) and navigate to topics you’ll notice an additional menu item when clicking on ‘+New topic’. The menu item shows as ‘Create with copilot(preview)’. NOTE: If you don’t see this menu item you need to enable Intelligent authoring support by clicking the settings icon on the top right and selecting General Settings. Turn on ‘Intelligent authoring support’. When you click this button a screen will load where you can name the topic and explain what you want the topic to do. In order to try this out you can start entering information in simple English, adding messages PVA should show and questions it should ask, etc. You can also use one of the examples that are shown on the bottom of the screen.

For testing purposes I am using the ‘Let someone order a pizza, choosing from common pizza types and how many they want to order.’ example as shown above, named my topic ‘Pizza Order’ and click create. It look only a few minutes for the topic to be created once it’s done the new topic opens in the authoring canvas. Make sure you save first! In my case, the system created 10 trigger phrases (looks like these are based on the topic name) and two questions. The first question is asking for a pizza type, uses the ‘Multiple choice options’ as the entity and shows the options ‘Pepperoni’, ‘Cheese’ and ‘Veggie’ to choose from. The selected value is set to be stored in a choice type of variable.
The second question asks ‘How many pizza’s would you like to order?’, has the entity set to ‘number’ and stores the number in a number variable! Wow that’s pretty impressive! Copilot did all of this based on the text I entered at creation! This is not all we can do with copilot, this is just the beginning!
You’ll notice on the top right of the screen, there is a button named ‘Edit with Copilot’. This will allow makers to utilize the copilot/AI features when modifying a topic. You will see this button on all topics, not just the topics that were created with Copilot! The functionality is similar to creating a new topic.
When you click the ‘Edit with Copilot’ button on the authoring canvas a window opens with a box that reads ‘What do you want to do?’. Here you can (again) enter in plane and simple text what you want to change, or add. Once you entered the information click ‘Update’ to make the change. For this exercise I used the following phrase: ‘Add a question to ask what toppings they want to add. Use common pizza topping types.’

This didn’t seem to work the way I wanted it to… Copilot did add the question and the options to select from, but it also removed the ‘How many pizza’s’ question. When Copilot makes an update/change that you don’t like, you have the ability to undo the change. This will be visible from within the ‘Edit with Copilot’ window and will be shown in a green box. You can click ‘Undo’ from within the box which will remove the updates/changes. I clicked ‘Undo’ and then I decided to manually remove the message node at the end after which I tried again This time I got the outcome I wanted. The question was added, and no nodes were deleted. Another way to use Copilot to edit a topic is by node. NOTE: Nodes are the different ‘boxes’ that you see in the authoring canvas, which can be questions, messages, conditions etc. All you have to do is click on a node and then click on ‘Edit with Copilot’ again. I clicked on the ‘How many pizzas would you like to order’ question node and entered ‘Add a condition when the quantity is greater than 20 to show a message that says we don’t have 20 pizzas” in the ‘What do you want to do’ box. This also worked! Unfortunately it didn’t create the condition after the question I had highlighted, it added it to the end instead, but it still works for me! This logic could’ve also been done on the question itself, by using either a PowerFX condition or a custom condition (under the additional entity validation section) in the question properties, but I don’t think Copilot is smart enough to do that just yet! Hopefully in the future!
The last thing I am going to add by using Copilot is an adaptive card that summarizes the information that was gathered from the user. I entered ‘Summarize the information gathered from the user in an Adaptive Card.’ in the ‘What do you want to do?’ box, clicked ‘Update’ and my (simple) Adaptive card is added!

Limitations

As I mentioned earlier, Copilot for Power Virtual Agents is in preview today, which means there are some limitations to what it can do: during this preview Copilot can create messages, questions, and conditions when creating and editing topics. Other node types aren’t supported at this time. I hope my article makes it clear that Copilot understands the required properties on these message, question, and condition nodes, (I.E the text that is used when prompting the user; creating appropriate output variables, like a number variable for the ‘How many pizza’s question). However, Copilot doesn’t understand the more advanced properties that can be configured on a question node like PowerFX functions, or the reprompt and interruption settings, I’m guessing (and hoping) that is coming later. All and all, I’m very impressed with this new functionality! And you’ll have to admit, building topics this way is a lot faster and easier, especially for new makers! I hope you enjoyed reading this article! Be sure to check in again next week for a new article or subscribe here to never miss another post!

Share this!

2 Comments to Build Power Virtual Agent topics with GPT

  1. Good stuff Dian!! I’m excited for this functionality. It really simplifies the entire PVA experience.