I'm flying from San Francisco on United and the AI Agent asks
What city are you departing from? — this question would be redundant and create a poor user experience.
Instead, Slot Fillers ensure that only missing information is requested.
Key Benefits
- Collecting and Remembering Information. With Slot Fillers, all required data is gathered and retained throughout the conversation, reducing errors and making conversations with the AI Agent smoother and more natural.
- Handling Different Input Types. Slot Fillers accept various formats, for example, dates and numbers, making it flexible for user inputs.
Restrictions
- Slot Fillers fail when multiple values share the same Slot type, making it impossible to distinguish between them. For example,
I'm flying from SFO to ORD on United. The AI Agent can’t distinguish between departure airport and arrival airport because both matchairport_code. To avoid this restriction, you can:- Create separate Slot Fillers for each value:
Departure Airport— use a Context Key, for example,departure_city.Arrival Airport— use a Context Key, for example,arrival_city.
- Modify the Flow to ask distinct questions for each Slot instead of extracting both from a single user input.
- Create separate Slot Fillers for each value:
Working with Slot Fillers
- GUI
- API
You can create, edit, and delete Slot Fillers in NLU > Slot Fillers in the Flow editor.
Slot Filler Settings
Required Fields
Required Fields
| Field | Description | Example |
|---|---|---|
| Name | The display name of the Slot Filler, used for identification. | Departure Airport Slot |
| Type | Defines the type of input expected. You can select from the following Slot types: - Slot – a Lexicon Slot. Make sure a Lexicon is attached and that this Slot is included in it. - Regular Expression – a Regex Slot. - Intent – extracts values based on recognized Intents. Useful when Slot filling is tied to Intent classification. - System Slot – predefined Slot types that automatically extract common entity types such as dates, numbers, temperatures, and more. | - |
| Slot Name | This parameter appears if the Slot type is selected. Specifies which Slot this Filler is associated with. | airport_code, date, name |
| Regular Expression | This parameter appears if the Regular Expression type is selected. Enter the regular expression to extract specific patterns from user input. Regex expressions must start with / and end with /g for global matching, for example, /^\d{3}-\d{3}-\d{4}$/g. | |
| Context Key | The variable name used to store the extracted value in the Context object. | departure_city, arrival_date |
Optional Fields
Optional Fields
| Field | Description | Example |
|---|---|---|
| Additional Validation | Allows extra validation rules to ensure correct formatting or values. | Ensure date format is YYYY-MM-DD. |
| Result Location | Determines where the extracted data is stored. | Context or Contact Profile. |
| Store result in Context | Stores the extracted value in the Context object. | "departure_city": "SFO". |
| Store result in Contact Profile | Stores the extracted value in the Contact Profile for future interactions. | Store “preferred_airline” for returning users. |
| Store Detailed Results | Stores metadata about the extracted Slot, for example, confidence scores. | Confidence score of 0.92 for "ORD". |
| Use Positive Keyphrases Only | Limits Slot extraction to predefined keyphrases. | Only accept "San Francisco" for departure_city. |
| Skip if the result is already in Context | Prevents asking for the Slot again if a valid value already exists in the Context object. | If "departure_city": "LAX" is set, don’t ask again. |
Example
Step 1. Add Slots
Step 1. Add Slots
- Create a new Flow called
Slot Fillers. - Navigate to the NLU tab and attach relevant Lexicons, for example,
airportsandairlines. - On the Slot Fillers tab, follow these steps:
- Create a new Slot Filler named
Airline. - Select Slot from the Type list.
- Create a new Slot Filler named
- Enter
airlinein both the Slot name and Context Key fields. - Repeat the steps 3.1 and 3.2 to create another Slot Filler named
Airport, enterairport_codein the Slot name and Context Key fields. - Click Build Model.
Step 2. Configure Question Nodes
Step 2. Configure Question Nodes
- Create a Question Node, enter
What is your departure airport?in the Text field and select Slot from the Question Type list. - Enter
airport_codein Slot Name and Context Key to use. - Enable Skip if answer exists in Context.
- Repeat the process for
What is your airline?, enterairlinein the Slot name and Context Key fields.
Step 3. Test Slot Fillers
Step 3. Test Slot Fillers
Provide all information at once:
User Input:
Result:
Provide partial information:
User Input:
AI Agent:
User Input:
Result: The AI Agent skips asking for the airline.
User Input:
I'm leaving San Francisco on United.Result:
No additional questions are asked.Provide partial information:
User Input:
I'm flying on United.AI Agent:
What is your departure airport?User Input:
SFOResult: The AI Agent skips asking for the airline.