From the course: Building in Microsoft Copilot Studio

Create a topic from a description with Copilot

From the course: Building in Microsoft Copilot Studio

Create a topic from a description with Copilot

- [Instructor] You can use generative AI to simplify the development of your AI agents. For example, you can create a topic from a description in Microsoft Copilot Studio. Previously, we manually built a topic about weather. It helps users get the current weather conditions for a specific city. Also to promote our California tour business, if people want to know the weather in Los Angeles, the AI agent will ask if they're interested in our tour information. Microsoft Copilot Studio provides a low code platform, so you can build a topic without extensive programming skills. However, you can further speed up the development process, you can use generative AI to create and edit a topic. Let's see how to do this. Go to topics. Click add a topic. Then click create from description with Copilot. First, name your topic, Current Weather Generative AI, just to differentiate from our previous current weather topic. Next, describe the topic's purpose. For example, create a topic to let a user check the current weather conditions for a city. Click create. In a moment, AI created a topic for us. We can see the topic has a trigger with the AI generated description. A question note saying, "Please enter the city for which you want "to check the weather conditions." Identifying a city entity and a saving user response as a city variable and a message note to show the result. We can further edit the topic with Copilot. Under, what do you want to do, enter "If the city is Los Angeles or San Francisco, "show a message to promote our tour packages." Click the update button. Copilot added a condition note to the topic. It checks if the city is equal to Los Angeles or San Francisco, then displaying a promotional message with the city name. Up to now, the AI generated topic looks very close to the one we manually created. The only thing missing is calling the weather plugin action. We can simply add this note. Click the plus sign to add a note after the question note. Select call an action, click plugin, then choose get current weather. In a plugin action note, we can set value for inputs. Select location, and get a value from the variable city. Click set value again, then select units. Enter a value I, which means imperial. Now we can delete the old message note. Finally, we can save our topic. Now let's test our AI agent. Click topics in the menu. We have two current weather topics with similar trigger descriptions. To avoid confusing our AI agent, let's disable the one we manually created. Click test. In the test your agent pane, start a new conversation. Enter weather today. Our agent will ask, "Please enter the city "for which you want to check the weather conditions." If we enter New York, the agent will just return the weather information. Enter weather today again, then enter Los Angeles. The agent will provide weather information and promote our tour packages for Los Angeles. Up to this point, we have successfully created a topic from description powered by Copilot.

Contents