Work with entities
Scenario
In this exercise, you will:
- Create and use entities
This exercise will take approximately 15 minutes to complete.
What you will learn
- How to use entities with generative AI
- How entities turn free-form input into structured variables
High-level lab steps
- Create entities
- Use entities in nodes
Prerequisites
- Must have completed Lab: Manage nodes
Detailed steps
Exercise 1 - Create a Property Type entity
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.comand ensure you are in the appropriate environment. -
Select Agents from the left navigation pane.
-
Open the Real Estate Booking Service agent.
-
Select Settings in the upper-right of the screen.
-
Select the Entities tab. You should see a list of the prebuilt entities for your agent.

Task 1.2 - Create the Property Type entity
-
Select + Add an entity and select + New entity.

-
Select Closed list.
-
Enter
Property Typein the Name field. - Add the following items to the list:
- Apartment
- Condominium
- Duplex
- House
-
Select + Synonyms for Apartment, enter
Flatand select the + icon and select Done. -
Select + Synonyms for Condominium, enter
Townhouseand select the + icon and select Done. -
Select + Synonyms for House, enter
Single-family homeand select the + icon and select Done. -
Enable Smart matching.

-
Select Save.
- Once the entity is saved, close the Property Type window.
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 Bedroomsin the Name field. -
Enter
[1-5]in the Pattern field. -
Select Save.
-
Once the entity is saved, close the Number of Bedrooms pane.
-
Select the X icon in the top-right to close out of Settings and return to your agent.
Exercise 2 - Use entities to improve the agent
Use entities in the conversational flow to improve the agent.
Task 2.1 - Use entities
-
Select the Topics tab.
-
Select the Book Showing topic.
-
Select the the + icon between the Condition and property Question nodes, then 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 four values.
-
Select the variable in Save user response as and enter
PropertyTypefor 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
NumberofBedroomsfor Variable name -
Select Save.
Task 2.2 - Test entity extraction
-
Open the Test panel.
-
Enable Track between topics.
-
Start a new test session.
-
When the Conversation Start message appears, type and send
I want to book a real estate showing. -
Confirm that the agent responds with the greeting message from the Book Showing topic.
-
Provide a name and email address when prompted and confirm the information.
-
When asked which type of property you want to see, enter
I'm looking for a house.This response is intentionally using natural language. The Property Type entity should capture House.
-
When asked which property you want to see, enter
555 Oak Lane, Denver, CO 80203. -
When asked what date and time you want to see the property, enter
Tomorrow 8:00 AM.
Confirm that the agent responds with the message indicating the booking request is being scheduled.
Summary
In this lab, you used entities to extract structured values from natural language while keeping generative AI enabled. Entities allow your agent to accept flexible input while maintaining predictable behavior.
In the next lab, you will use tools to act on these structured values and perform real operations, such as retrieving or creating data.