Slots
Last updated
Last updated
Slots describe the input and output fields associated with the intents, which are used for processing the intent. These might also include the inputs for the Web API requests, if any, associated with the intent. You can define the Slots by using the slot button under the Action column.
Slots UI displays all the available (created) slots. You can create a new slot using the `+` button on the top right corner. Each slot are characterized by
Name
Display Name
Slot Type
Custom Entity Type
Allow Multiple
Delay Template
Only English
Last Option
Sensitive
Actions
Name is a unique identifier of the type string to identify the slot. The slot can also have a display name. Slots Type defines the data type of the slot.
Available data types include
INTEGER
DATE
TIME
NAME
ARTEFACT
LOCATION
BOOLEAN
CODE
PAST_DATE
FUTURE_DATE
ADDRESS
RELATIONSHIP
PASS_THROUGH
PHONE_NUMBER
EMAIL_ID
NUM_PLATE
EVENTS
SYSTEM FILLED
QUERY_PHRASE
In addition to the in-build types, Dhee.AI also supports custom types. If the developer needs to select a Custom Type, the _Slot Type_ needs to be set to _Custom_ and _Custom Entity Type_ needs to be set the user-defined custom entity type
The rest of the configuration options include
Allow Multiple
If true indicates a list of values
Delay Template
if true Entity based slot extraction has priority over template based extraction of slots
Only English
If true, prioritize English values over the language of conversation. Useful for handling names
Last Option
If a conflict exists for the candidate for a slot, prefer capturing other slots before capturing the current one
Sensitive
Mask the slot value before storing in conversation logs
In natural language, users often provide multiple information in a single sentence, especially in commonly used phrases. Consider the following examples
Templates allow multiple slots to be captured together from User utterances. In the above examples, multiple slots can be captured from the slot from single sentences. To define a template, select the `Template` button under the _Action_.
Templates allow multiple slots to be captured together from User utterances. In the above examples, multiple slots can be captured from the slot from single sentences. In order to define a template, select the Template
button under the Action.
Templates are defined by using the $slotName
syntax for capturing slots. For example, assuming we have startDate and endDate as our slot names, a template in a leave management application might look like
The Templates can be instructed to support multilingual functionality if the bot was designed to the multilingual. You can enable the functionality by using the Auto-translate flag.
We can use the Templates to read multiple inputs together from user utterances. For example, for the startDate, we can define the template as "leaves from ${startDate} to ${endDate}". This would ensure the startDate and endDate are filled when the user utterance is similar to any of the following.
In addition, you can also define Prompts for each of the slots if the User fails to provide the required inputs. These are the messages which the chatbot would ask the user when there is missing information. For example, for the startDate the prompt could be defined as
Dhee.AI also allows configuring slots using prompts that show predefined values. For example, We could prompt the user for specifying the reason for leave application using predefined custom values. For example,
This would show a prompt including the possible reasons for leave as shown in the image below.