Slots and Slot Types

From Genesys Documentation
Jump to: navigation, search
This topic is part of the manual Genesys Dialog Engine User Guide for version Current of Genesys Dialog Engine.
Read this topic for other versions:

A Slot is a specific piece of information that can be derived from an utterance and is used to fulfill the user's intent. Each slot is mapped to a Slot Type. The slot type defines the type of information that the bot should look for as the slot within an utterance.

What are slots?

Dialog Engine identifies discrete pieces of information (called slots) from an utterance to understand the user's intent. Consider the utterance: I want to book two rooms. This utterance allows the bot to identify a single piece of information or slot: rooms required.

Once a slot has been identified, it is mapped to a slot type. A slot type defines how the bot will process the information available in the identified slot. Each slot must be mapped to a slot type. Slot type help the bot define the information that the bot should look for when trying to find a slot in the utterance.

In the previous utterance, the slot was identified as rooms required and the slot is mapped to a number slot type.

There are two types of slot types supported in Dialog Engine:

An utterance could also include multiple such slots or none (in some cases). Consider, I want to book two executive rooms for three nights starting tomorrow. The bot identifies slots mentioned in the utterance: two rooms, three nights, and tomorrow and maps them accordingly to the corresponding entities. While number of rooms required, number of nights, and date can be mapped to built-in slot types, the type of room requested (executive) can be mapped to a custom slot type.

Add a slot

You can add slots to an utterance in two ways: from the Slots tab or from the Utterance tab.

  • From the Slots tab, click Add Slot.
  • Enter a name to identify the slot.
  • Select a slot type. You can choose from a built-in slot type or any custom slot type.
  • Check Slot Required if you want this slot to be mandatory in the utterance.
  • Enter the prompt to be displayed to the user. Add more prompts, if needed.
  • Click Save.

To add slots from the Utterance tab, select and click a word or phrase that will be extracted as a slot value and select Add New Slot.

Using built-in slot types

Dialog Engine includes the following built-in slot types by default:

  • builtin:datetime : maps any date and time values.
  • builtin:date : maps any date values. Use when you want to map dates only.
  • builtin:time : maps any time values. Use when you want to map time only.
  • builtin:amountOfMoney : maps any amount values.
  • builtin:duration : maps any duration type values.
  • builtin:number : maps any numeric values. Currently only integers are supported.

These slot types are available to define slots when creating a slot under the Slot Type option.

Using custom slot types

A custom slot type allows you to define slot types and use them to map slots. For example, you may require a location slot to denote cities for your travel bot. You can define a custom slot type and use that location slot to mark up locations in your utterances.

Dialog Engine supports two types of custom slot types:

  • a list type
  • a regular expression (regex) type.


If your bot has to identify a complex content in the utterance, say a flight number or flight code, a regex pattern is more useful in defining the slot type.

Using a list slot type

If your custom slot type data is a set of predefined words in the utterance, say like location names, use the list slot type.

  • Click Add Slot Type from the Slot Types page. or click Add Slot Type in the left pane.
  • Enter a name for the custom slot type and click Save.
  • Select List as the custom slot type.
  • Type a value for the custom slot and press Enter.
  • Add more entity values as needed.

You can also add synonyms for a slot type so that Dialog Engine can recognize multiple words and phrases for the same slot. For example, an entity value of New York can have the synonyms: Big Apple or NYC. This allows the bot to understand that when the user says NYC, it is mapped to New York.

To add synonyms

  • Select the Allow Synonyms checkbox to enable adding synonyms.
  • Click the Enter synonym field next to the slot type value and type an alternate name and press Enter.
  • Add more synonyms, if needed.

To delete any synonyms, hover over the synonym and click the X that appears.

Using a regular expression (regex) slot type

You can use regular expressions (regex or regexp) to map values to slot types. For example, if you want to match flight codes for your travel bot, you might want to know the flight number for handling any cancellations, the regex pattern, ^[A-Z]{2}\d{3,4}$ will match any phrases in the utterance that match this pattern as a flight number.

  • Click Add Slot Type from the Slot Types page or click Add Slot Type in the left pane.
  • Enter a name for the custom slot type and click Save.
  • Choose Regular Expression as the custom slot type.
  • Type a regular expression and press Enter.

Map slots in utterances

Once you've created slots with the associated slot types, you must map specific words and phrases in the utterances to the correct slots.

  • In the Utterances tab, double-click or select a specific word/phrase in an utterance.
  • Choose a slot name from the Select Slot menu. The selected word/phrase is now indicated as a slot value by a colored underline for the phrase.
  • Click Save to save the changes to your bot.

Modify a slot's information

You can modify any of the slot information by selecting a slot from the Slots tab and clicking the Edit button.

Delete a slot

You can delete a slot by selecting a slot from the Slots tab and clicking the Delete button.

Retrieved from "https://all.docs.genesys.com/GDE/Current/User/Slots (2020-08-08 06:22:28)"