Difference between revisions of "GDE/Current/User/Slots"

From Genesys Documentation
Jump to: navigation, search
m (Text replacement - "\|Platforms?=([^\|]*)PureEngage([\|]*)" to "|Platform=$1GenesysEngage-onpremises$2")
(Published)
Line 1: Line 1:
 
{{Article
 
{{Article
 
|Standalone=No
 
|Standalone=No
|DisplayName=Slots
+
|DisplayName=Slots and Slot Types
|Context=<span>A '''Slot''' is a specific piece of information that can be derived from an utterance and mapped to an entity.</span>
+
|Context=<span>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.</span>
 
|ComingSoon=No
 
|ComingSoon=No
 
|Platform=GenesysEngage-onpremises, PureConnect
 
|Platform=GenesysEngage-onpremises, PureConnect
Line 8: Line 8:
 
|sectionHeading=What are slots?
 
|sectionHeading=What are slots?
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=Dialog Engine is designed to parse an utterance provided by the user and identify their intent. Dialog Engine uses a process called ''slot filling'' to identify pieces of information and maps them to corresponding entities. Each mapping of an intent to a discrete piece of information is termed a '''slot'''. Based on the slots identified and mapped, the bot can continue the conversation with the user.
+
|structuredtext=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'''.  
  
Suppose the input is: ''I want to book two rooms''. This utterance allows the bot to identify a single entity: '''number of rooms required'''. And the bot might respond up with follow-up questions.
+
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.
  
Slot filling allows collecting multiple pieces of information about the user's intent. Consider, ''I want to book two rooms for three nights starting tomorrow''. The bot identifies slots mentioned in the conversation: ''two rooms'', ''three nights'', and ''tomorrow'' and maps them accordingly to the corresponding entities.
+
In the previous utterance, the slot was identified as '''rooms required''' and the slot is mapped to a '''''number''''' slot type.
  
Dialog Engine supports two types of slots:
+
There are two types of slot types supported in Dialog Engine:
 +
*{{Link-SomewhereInThisVersion|manual=User|topic=Slots|anchor=built-in-slot-type|display text=built-in}} slot types
 +
*{{Link-SomewhereInThisVersion|manual=User|topic=Slots|anchor=custom-slot-types|display text=custom slot type}}
 +
**A list custom slot type
 +
**A regular expression (regex) custom slot type
  
*A built-in predefined slot type available 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.
*A custom slot type that you can create in the '''Slot Types''' screen.
+
|FAQHeading=What is a slot?
 
 
{{AnchorDiv|predefined=}}
 
===Predefined Slot Types===
 
 
 
There are four built-in slot types available by default in Dialog Engine:
 
 
 
*<code>de:datetime</code> : maps any date and time values.
 
*<code>de:amountOfMoney</code> : maps any amount values.
 
*<code>de:duration</code> : maps any duration type values.
 
*<code>de:number</code> : maps any numeric values.
 
 
 
<br />
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 39: Line 32:
 
*From the '''Slots''' tab, click '''Add Slot'''.
 
*From the '''Slots''' tab, click '''Add Slot'''.
 
*Enter a name to identify the slot.
 
*Enter a name to identify the slot.
*Select an entity for the slot name. You can choose from a {{Link-SomewhereInThisVersion|manual=User|topic=Slots|anchor=.7B.7B.7B1.7D.7D.7D|display text=predefined}} slot type or any {{Link-SomewhereInThisVersion|manual=User|topic=Slots|anchor=addcustomslottype|display text=custom slot type}}.
+
*Select a slot type. You can choose from a {{Link-SomewhereInThisVersion|manual=User|topic=Slots|anchor=.7B.7B.7B1.7D.7D.7D|display text=built-in}} slot type or any {{Link-SomewhereInThisVersion|manual=User|topic=Slots|anchor=custom-slot-types|display text=custom slot type}}.
 
*Check '''Slot Required''' if you want this slot to be mandatory in the utterance.
 
*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.
 
*Enter the prompt to be displayed to the user. Add more prompts, if needed.
Line 45: Line 38:
  
 
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'''.
 
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'''.
 +
|FAQHeading=How do I add a slot?
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
|sectionHeading=Add a custom slot type
+
|sectionHeading=Using built-in slot types
 +
|anchor=built-in-slot-type
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=A custom slot type allows you to define slot types and use them to identify intents. 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.
+
|structuredtext=Dialog Engine includes the following built-in slot types by default:
  
Dialog Engine supports two types of custom slot types: a list type and a regular expression (regex) based type.
+
*<code>builtin:datetime</code> : maps any date and time values.
 +
*<code>builtin:date</code> : maps any date values. Use when you want to map dates only.
 +
*<code>builtin:time</code> : maps any time values. Use when you want to map time only.
 +
*<code>builtin:amountOfMoney</code> : maps any amount values.
 +
*<code>builtin:duration</code> : maps any duration type values.
 +
*<code>builtin:number</code> : maps any numeric values. Currently only integers are supported.
  
If your custom slot type data is a set of predefined words in the utterance, say like location names, use the list slot 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.
+
These slot types are available to define slots when creating a slot under the '''Slot Type''' option.
 +
|FAQHeading=What slot types does Dialog engine support?
 +
|Status=No
 +
}}{{Section
 +
|sectionHeading=Using custom slot types
 +
|anchor=custom-slot-types
 +
|alignment=Vertical
 +
|structuredtext=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.  
  
===Adding a set of custom values to a slot type===
+
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.
 
*Click '''Add Slot Type''' from the '''Slot Types''' page. or click '''Add Slot Type''' in the left pane.
Line 63: Line 79:
 
*Add more entity values as needed.
 
*Add more entity values as needed.
  
You can also add synonyms for an entity so that Dialog Engine can recognize the value when identifying the slots. 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''.
+
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.
 
*Select the '''Allow Synonyms''' checkbox to enable adding synonyms.
  
*Click the '''Enter synonym''' field next to the entity value and type an alternate name or value this entity value can have and press '''Enter'''.
+
*Click the '''Enter synonym''' field next to the slot type value and type an alternate name and press '''Enter'''.
 
*Add more synonyms, if needed.
 
*Add more synonyms, if needed.
  
 
To delete any synonyms, hover over the synonym and click the X that appears.
 
To delete any synonyms, hover over the synonym and click the X that appears.
  
===Using a regular expression to map to a slot type===
+
===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.
 
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.
+
*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'''.
 
*Enter a name for the custom slot type and click '''Save'''.
 
*Choose '''Regular Expression''' as the  custom slot type.
 
*Choose '''Regular Expression''' as the  custom slot type.
 
*Type a regular expression and press '''Enter'''.
 
*Type a regular expression and press '''Enter'''.
 +
|FAQHeading=How do I define and use a custom slot type?
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
|sectionHeading=Map a slot
+
|sectionHeading=Map slots in utterances
 
|anchor=mapslot
 
|anchor=mapslot
 
|alignment=Vertical
 
|alignment=Vertical
|structuredtext=After you define slots, you can map specific words to corresponding entities, and Dialog Engine will pick up those slot values.
+
|structuredtext=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 a specific word/phrase in an utterance.
+
*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.
 
*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.
 
*Click '''Save''' to save the changes to your bot.
|FAQHeading=How do I map slots with utterances
+
|FAQHeading=How do I map slots with utterances?
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section

Revision as of 09:23, July 22, 2020

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 (2025-06-20 09:28:21)"
Comments or questions about this documentation? Contact us for support!