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

  1. Navigate to the Microsoft Copilot Studio portal https://copilotstudio.microsoft.com and ensure you are in the appropriate environment.

  2. Select the Test button in the upper-right of the screen to close the testing panel if the panel is open.

  3. Select Copilots from the left navigation pane.

  4. Select the copilot you created in the earlier lab.

  5. Select Settings in the upper-right of the screen.

  6. Select the Entities tab.

    Screenshot of the Entities tab.

Task 1.2 - Create the property type entity

  1. Select + Add an entity and select + New entity.

    Screenshot of the selecting the method for a new entity.

  2. Select the Closed list tile.

  3. Enter Property Type in the Name field.

  4. Enter Apartment in the Enter item field and select Add.

  5. Enter Condominium in the Enter item field and select Add.

  6. Enter Duplex in the Enter item field and select Add.

  7. Enter House in the Enter item field and select Add.

  8. Select + Synonyms for Apartment, enter Flat and select the + icon and select Done.

  9. Select + Synonyms for Condominium, enter Townhouse and select the + icon and select Done.

  10. Select + Synonyms for House, enter Single-family home and select the + icon and select Done.

    Screenshot of the a new entity.

  11. Select Save.

  12. Select Close.

Task 1.3 - Create number of bedrooms entity

  1. Select + Add an entity and select + New entity.

  2. Select the Regular expression (Regex) tile.

  3. Enter Number of Bedrooms in the Name field.

  4. Enter [1-5] in the Pattern field.

  5. Select Save.

  6. 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

  1. Select your copilot in the Copilot pane on the left-hand side of the screen to return to the Overview tab.

  2. Select the Topics tab.

  3. Select the Book a Real Estate Showing topic.

  4. Select the the + icon above the property question node and select Ask a question.

  5. In the Enter a message field, enter the following text:

    What type of property do you want to see?

  6. Select Property Type for Identify.

  7. Select Select options for user and check the Display option for all list values.

  8. Select the variable in Save user response as and enter PropertyType for Variable name

    Screenshot of the a new entity.

  9. Select the the + icon below the new question node and select Ask a question.

  10. In the Enter a message field, enter the following text:

    How many bedrooms do you need?

  11. Select Number of Bedrooms for Identify.

  12. Select the variable in Save user response as and enter NumberofBedrooms for Variable name

  13. Select Save.