Entities and Slot Filling
How-to guide for using entities and slot filling to capture structured information in Copilot Studio agent conversations, including built-in entities, custom entities, and variable management in government environments.
Overview
Most useful agent conversations require the agent to collect specific information. A room booking needs a date, time, and room name. A support ticket needs an issue category and description. A travel request needs a destination and travel dates. Without a structured way to capture this information, your agent would need to ask rigid, sequential questions that feel more like filling out a form than having a conversation.
Entities and slot filling solve this problem. Entities teach your agent to recognize specific types of information in user messages, and slot filling lets the agent intelligently collect whatever it still needs. The result is conversations that feel natural while still capturing every required data point.
This video covers how entities work, how to use built-in and custom entities, and how to implement slot filling in your Copilot Studio agents.
What You’ll Learn
- Entities: What they are and how they extract structured data from natural language
- Built-in entities: Prebuilt recognition for dates, numbers, emails, and more
- Custom entities: How to define your own categories and patterns
- Slot filling: How to collect required information naturally and efficiently
- Variables: How to store and use extracted data throughout conversations
Script
Hook: Making sense of user input
When a user types “I need to book a conference room for next Tuesday at 2 PM,” how does your agent pull out the date, the time, and the room request? When someone says “I submitted ticket INC-2026-00347 last week and haven’t heard back,” how does your agent extract that ticket number?
Entities and slot filling are the answer. Entities teach your agent to recognize specific types of information in natural language, and slot filling ensures the agent collects everything it needs without asking unnecessary questions.
In the next ten minutes, you will learn how to capture exactly the information your agent needs from every conversation.
What are entities?
An entity is a category of information that your agent can recognize and extract from user messages. Think of entities as labels your agent applies to parts of what a user says. When a user types “Schedule a meeting for March 15th,” the agent recognizes “March 15th” as a date entity. When they type “My email is jsmith@agency.gov,” the agent recognizes that as an email entity.
Entities bridge the gap between unstructured natural language and structured data your agent can work with. Without entities, your agent would just see a string of text. With entities, your agent understands that “next Tuesday” is a date, “Room 204” is a location, and “annual leave” is a leave type.
Every entity value gets stored in a variable. Variables are named containers that hold data during a conversation. When your agent extracts a date entity, that date goes into a variable you can reference later, whether in a response message, a condition branch, or a call to an external system.
Here is a government example. A user sends a facility maintenance request: “The lights are flickering on the third floor of Building 7.” With the right entities configured, your agent extracts the issue type as “lighting,” the floor as “3,” and the building as “7.” Instead of asking three separate questions, the agent already has what it needs to route the request.
Built-in entities
Copilot Studio comes with a library of prebuilt entities that cover the most common types of information. These built-in entities work out of the box with no configuration required.
The list includes age, boolean values, city, color, continent, country or region, currency, date and time, duration, email address, number, ordinal number, organization, percentage, person name, phone number, state, street address, temperature, URL, and zip code. That is a comprehensive set that covers the majority of data collection scenarios.
Built-in entities are intelligent about variations. The date and time entity understands “next Tuesday,” “February 11th,” “2/11/2026,” and “tomorrow at 3 PM” as the same type of data. The number entity handles “fifteen,” “15,” and “15.0” interchangeably. This flexibility means users can express information naturally and your agent still captures it correctly.
To use a built-in entity, add a question node in your topic and select the entity type for the expected answer. For example, if you need a date, set the question node to expect a “Date and time” entity. Copilot Studio handles the extraction automatically.
For government agents, the most commonly needed built-in entities are date and time for scheduling and deadlines, email and phone number for contact information, person name for routing requests to the right individual, and number for quantities, room numbers, or floor numbers.
Creating custom entities
Built-in entities cover common data types, but your agent will often need to recognize information specific to your agency or process. That is where custom entities come in.
The first type is a closed-list entity. This is a fixed set of predefined values. For example, if your agent handles leave requests, you might create a “Leave Type” entity with values: annual leave, sick leave, compensatory time, FMLA leave, and military leave. For each value, you add synonyms. “Annual leave” might also be triggered by “vacation,” “PTO,” “annual,” or “time off.” “Sick leave” might match “sick day,” “medical leave,” or “calling in sick.”
To create a closed-list entity, go to the Entities section in Copilot Studio, click “Add an entity,” and select “Closed list.” Name it clearly, such as “LeaveType” or “OfficeLocation.” Add each value and its synonyms. The more synonyms you add, the better the entity recognizes variations in user input.
The second type is a regular expression entity. This uses pattern matching to identify data that follows a specific format. Government agencies often have standardized formats for ticket numbers, case IDs, badge numbers, or authorization codes. If your incident tickets follow the format “INC-2026-XXXXX,” you can create a regex entity that matches that pattern. The agent will automatically extract matching strings from user messages.
Best practices for custom entities: name them descriptively so other makers understand what they represent. For closed-list entities, invest time in comprehensive synonyms by listening to how real users refer to each option. For regex entities, test your patterns against real data samples to make sure they match correctly without false positives.
Here is a government scenario. Your agency has offices in five locations: headquarters, the regional office, the field office, the training center, and the data center. Create a closed-list entity called “OfficeLocation” with each location and its common abbreviations and nicknames. “Headquarters” might also match “HQ,” “main office,” and “central.” Now any topic in your agent can recognize office locations automatically.
Slot filling in action
Slot filling is what makes entity-powered conversations feel natural instead of robotic. Without slot filling, your agent asks questions one at a time in a fixed order, regardless of what the user already told you. With slot filling, your agent extracts whatever information the user provides upfront and only asks for what is still missing.
Here is how it works. You define required slots for a topic, which are the entity values the agent needs to complete the task. When a user sends a message, the agent checks if any of those slots are already filled by information in the message. For slots that are filled, the agent moves on. For slots that are still empty, the agent asks.
Walk through an example. Your agent handles conference room bookings and needs four pieces of information: room name, date, start time, and duration. A user types “I need Conference Room A for next Friday.” The agent extracts the room name and the date from that single message. Two slots are filled. The agent then asks only for the start time and duration. If instead the user had typed “Book a room,” all four slots would be empty, and the agent would ask for each one.
To configure slot filling in Copilot Studio, set up question nodes in your topic with the appropriate entity types. Mark each question as required so the agent knows it must collect that information before proceeding. Write clear prompts for when the agent needs to ask, such as “What time would you like the room?” or “How long do you need it for?”
The benefit is twofold. Conversations feel more natural because users can provide information in any order and in any combination. And conversations are shorter because the agent never asks for information it already has.
Here is a government scenario. Your agent handles travel authorization requests. It needs a destination, travel dates, and purpose of travel. A user types “I need to travel to the Denver regional office next month for the quarterly program review.” The agent extracts the destination and the purpose. It then asks only for the specific travel dates. Instead of three rigid questions, the user answered two slots naturally in their opening message.
Variables and entity values
When your agent extracts an entity value, it stores that value in a variable. Understanding how variables work is essential for building capable agents.
Variables in Copilot Studio come in two scopes. Topic variables exist only within the current topic and are cleared when the topic ends. Global variables persist across the entire conversation and are available to every topic. Use topic variables for information that is only relevant to the current interaction and global variables for information like the user’s name or role that multiple topics might need.
You can reference variables in agent messages to create dynamic responses. Instead of a generic “Your request has been submitted,” you can say “Your {LeaveType} request for {RequestedDate} has been submitted. You’ll receive a confirmation at {UserEmail}.” This personalization makes the agent feel responsive and professional.
Variables also power condition nodes. You can route the conversation based on entity values. If the leave type is “FMLA,” branch to a topic that covers FMLA-specific requirements. If the office location is “headquarters,” provide building-specific instructions.
When passing variables between topics during handoffs, make sure the variable names are consistent and clearly documented. A variable called “RequestDate” in one topic should use the same name in the receiving topic.
For government environments, be mindful of data sensitivity. Avoid storing personally identifiable information in global variables longer than necessary. If your agent collects a Social Security number or other sensitive data for a specific verification step, use a topic-scoped variable and ensure it is not passed to other topics unnecessarily.
Close: Structured conversations
Let us recap. Entities teach your agent to recognize and extract structured data from natural language. Built-in entities handle common types like dates, numbers, and emails. Custom entities let you define agency-specific categories and patterns. Slot filling uses entities to collect required information naturally, asking only for what is missing. And variables store everything so your agent can use the data throughout the conversation.
Together, these capabilities transform your agent from a simple Q&A tool into an intelligent assistant that can collect information, make decisions, and take action.
Here are your next steps. Identify the key data points your agent needs to collect in its most important topics. Create custom entities for any agency-specific categories, reference numbers, or location lists. Implement slot filling in your most complex topics so users can provide information naturally.
The best agents do not interrogate users. They have natural conversations and capture what they need along the way.
Sources & References
- Entities and slot filling in Copilot Studio — Official documentation for entities, custom entities, and slot filling configuration
- Use variables in Copilot Studio — Guide to variable scoping, passing between topics, and variable best practices
- Microsoft Copilot Studio documentation — Comprehensive documentation hub for all Copilot Studio capabilities