Work with entities
Scenario
In this lab, you will:
- Create and use entities
What you will learn
- How to create and use entities to improve the copilot
High-level lab steps
- Create entities
- Use entities in nodes
Prerequisites
- Must have completed Lab 3: Nodes
Detailed steps
Exercise 1 - Create entities
Microsoft Copilot Studio uses entities to understand user intent. There are many prebuilt entities included for commonly used information. You can create custom entities for your specific purpose.
Task 1.1 - View prebuilt entities
-
Navigate to the Microsoft Copilot Studio portal
https://copilotstudio.microsoft.com
and ensure you are in the appropriate environment. -
Select the Test button in the upper-right of the screen to close the testing panel if the panel is open.
-
Select Copilots from the left navigation pane.
-
Select the copilot you created in the earlier lab.
-
Select Settings in the upper-right of the screen.
-
Select the Entities tab.
Task 1.2 - Create the property type entity
-
Select + Add an entity and select + New entity.
-
Select the Closed list tile.
-
Enter
Property Type
in the Name field. -
Enter
Apartment
in the Enter item field and select Add. -
Enter
Condominium
in the Enter item field and select Add. -
Enter
Duplex
in the Enter item field and select Add. -
Enter
House
in the Enter item field and select Add. -
Select + Synonyms for Apartment, enter
Flat
and select the + icon and select Done. -
Select + Synonyms for Condominium, enter
Townhouse
and select the + icon and select Done. -
Select + Synonyms for House, enter
Single-family home
and select the + icon and select Done. -
Select Save.
-
Select Close.
Task 1.3 - Create number of bedrooms entity
-
Select + Add an entity and select + New entity.
-
Select the Regular expression (Regex) tile.
-
Enter
Number of Bedrooms
in the Name field. -
Enter
[1-5]
in the Pattern field. -
Select Save.
-
Select Close.
Exercise 2 - Use entities to improve the copilot
Use entities in the conversational flow to improve the copilot.
Task 2.1 - Use entities
-
Select your copilot in the Copilot pane on the left-hand side of the screen to return to the Overview tab.
-
Select the Topics tab.
-
Select the Book a Real Estate Showing topic.
-
Select the the + icon above the property question node and select Ask a question.
-
In the Enter a message field, enter the following text:
What type of property do you want to see?
-
Select Property Type for Identify.
-
Select Select options for user and check the Display option for all list values.
-
Select the variable in Save user response as and enter
PropertyType
for Variable name -
Select the the + icon below the new question node and select Ask a question.
-
In the Enter a message field, enter the following text:
How many bedrooms do you need?
-
Select Number of Bedrooms for Identify.
-
Select the variable in Save user response as and enter
NumberofBedrooms
for Variable name -
Select Save.