Skip to main content
Version: 1.4.0

Slot

This chapter will explain what slots are and how to create and use slots on the platform.

Definition of slot

In the intention, agents often need to save all kinds of core information about the dialogue and use this information to promote the development of the following text.

slot is a variable that stores the key information required for intention. It can be inherited in the dialogue. The agent gives follow-up operation and feedback according to the value in the slot.

For example, agents need to complete a task of "booking air tickets".

Therefore, the information to be collected includes "place of departure", "destination", "class", "departure time", etc.

The variable that stores these data is the slot.

The agent takes the "value" from elsewhere and assigns the "value" to the slot. This process is called "filling slot", which is referred to as filling slot.

The filling sources of the agent are: -Dialogue slot filling: get information from the user session to fill the slot -Fill the groove with words -Fill the slot by sentences -Interface slot filling: receive data from external interface to fill the slot

Dialogue slot filling

There are four types of dialogue slot filling: whole sentence slot filling, intention slot filling, entity slot filling and sentence slot filling

A slot can be configured with multiple slot filling methods at the same time. The priority from high to low is: sentence slot filling > entity slot filling = intention slot filling > whole sentence slot filling

Fill in the slot by words

Fill in slot by entities

For example, the slot "destination" refers to the entity "station"; In the entity "station", there is the entity value of "Shanghai Hongqiao"; "Shanghai Hongqiao" is one of the many expressions of entity value.

When the following conversation occurs:

User: help me book the train ticket to Shanghai tomorrow

agent: OK

When the user says "help me book the train ticket to Shanghai tomorrow", the agent makes the following judgments and actions according to various statements of "Shanghai":

-User information includes "Shanghai Hongqiao" -"Shanghai Hongqiao" is a multiple expression of the entity value "Shanghai", so the entity value "Shanghai" is extracted -Fill "Shanghai" in the slot "destination"

Fill in the slot by characters

When there are two identical entities in the process and they must be distinguished by roles, role filling is needed. The role name is defined in the intent.

Fill in the slot by sentences

Fill in the slot by intents

When the whole sentence of the user matches the intention, fill the slot by the normalized value of the intention. It is generally used to express various selective branches, such as "that's OK", "forget it" and so on.

agent: how are you feeling recently? Is there any serious discomfort in the wound

User: much better, basically no pain.

  • slot [patient symptom] = Health

agent: that's great. Please keep it up.

  • the user's expression of the same meaning is relatively random, and the subsequent branch process is continued through intention matching.

Fill in the slot b y a whole sentence

Take the whole sentence of the user as the slot value. It is generally used to collect other suggestions from users, or as a bottom cover when other slot filling methods fail to obtain values.

agent: please leave your mobile phone number so that we can contact you

User: I don't want to leave my cell phone number

  • if the slot is not filled with a whole sentence, the agent cannot extract the 11 digit number that meets the entity rules and fill the slot, resulting in the stagnation of the process.

  • if the whole sentence is used to fill the slot, the agent will fill "I don't want to leave my mobile phone number" into the slot "mobile phone number" and continue the process. agent: is there anything else to add?

User: by the way, I may not reply in time after a two-day business trip.

  • it's hard to predict the speech skills of users in the supplementary link. The complete content can be left directly by filling the slot by the whole sentence.

Interface slot filling

Query information from the third-party interface. See the interface unit of the dialogue process for detailed configuration methods.

< intention of booking air tickets >

After a series of inquiries, the agent obtains the user's departure place, arrival place and departure time.

The agent transmits the departure place, arrival place and departure time to the third-party interface. The interface finds the flight according to the information, and then sends the result to the user.

In the last step, you need to fill the information from the third-party interface into the slot, and then send it to the user in the subsequent process.