Slots

Capture and Utilize User Information with Slots

Slots are used to store important information during a conversation, allowing the system to understand user requests and provide suitable responses. They enable the system to recognize and remember specific details in a user's input that are crucial for fulfilling requests. Commonly used slots may include a user's name, location, or preferences—all of which are pertinent to the interaction and the AI system's ability to respond appropriately.

Slots Variable

The following displays the structure of a slot variable:

GroupPrefixKeyTypeDescription

slots

slots.

slots.<slotName>

string

Provides access to a slot of the last received intent.

Whenever it's necessary to recall information provided by the user, we suggest saving the input value (for example, slots.numbers) in a Storage block, as seen here:

In the visual example provided, storage.persons and storage.duration are variables that reference the numbers slot, which is assigned to an intent.

Original Value

You have the capability to access the initial, unprocessed value of a slot with the variable syntax {{slots.slotname_original}}. This "original value" refers to the exact text as it was understood from the user's input. For instance, the original value for a slot capturing numerical information would reflect the text 'fifteen' rather than the digit '15'. This nuance is crucial, as demonstrated in a transaction within the Debugger tool:

Please note that slot values are designed to be temporary, relevant primarily to the active intent or the current state of the conversation. They will be replaced as soon as a new value is identified in subsequent user input. Thus, it's prudent to consider slots as ephemeral storage points, which retain information only for the immediate interaction.

Last updated