text
stringlengths
1
353
Welcome to the advanced course on the UNIT dialogue system.
I am Sun Shuqi, an R&D engineer for the UNIT platform.
In this lesson, we will learn about dialogue states and action triggers.
During the previous lesson on dialogue management, we learned about the various dialogue management functions on UNIT, which are performed by using dialogue states and action triggers.
In fact, a dialogue state is passed over each turn of a dialogue.
We may often find dialogues like these when booking a hotel, for example.
In a multi-turn dialogue, intents, slots and other information of each turn need to be passed, and they constitute the entire dialogue state.
A dialogue state is also called a session.
It is stored in the bot_session field of the request interface and the response interface.
All of you should have seen this field in the documents.
It is passed between UNIT and the developer, or the requester.
And, it is updated by UNIT.
When certain conditions have been fulfilled, the developer can also clear the dialogue state, that is, to reset it.
For example, we can clear it when there is a change of intents.
We may also configure the system to not store sessions before the Nth turn of dialogue.
It works just like in the diagram on the left.
First, we have an empty session and we pass it to UNIT.
UNIT responds and at the same time updates the session.
Then, during the second round of request, the session is passed as it is, and so on and so forth.
UNIT will clear the session when a certain condition is triggered.
The requester can also send an empty session to clear the current one.
With dialogue states, we can trigger dialogue actions based on some Boolean rules.
Boolean rules essentially involve the operations of AND, OR, and NOT.
They can be used to determine what the intent of the previous turn is, Whether the slots of this turn or the previous turn have been filled, and if so, whether it contains something or whether it equals to something.
The picture on the right shows such expressions on our system interface.
There are a series of trigger rules and some expressions.
These rules can be placed into groups within which they are of the AND relation, and among which they are of the OR relation.
We can trigger a series of dialogue actions based on such Boolean expressions.
What kinds of dialogue actions specifically?
As we can see, there are three.
The first one is answering, the second one is guide toward a dialogue intent, and the third is guide toward a Q&A intent.
Answering include two types, namely answering in text form and executing functions.
You can read the detailed descriptions of these types of answering in the diagram on the left.
I shan't go over them in detail.
Next, I have two tips to share.
First, we can have different actions triggered in different sequences.
Second, we can provide multiple dialogue actions for the developer, or the caller at the same time, then allow them to decide which ones to execute, ranging from all to none.
OK, that's about it.
Thank you!
Hello, everyone!
Welcome to the advanced course on the UNIT dialogue system.
I'm Sun Shuqi, an R&D engineer for UNIT platform.
In this lesson, we will learn about UNIT's feedback learning mechanism.
The reason for having a feedback learning mechanism is to prevent abnormal conditions from disrupting the normal operation of UNIT.
For example, abnormal requests before NLU and abnormal results after NLU will all cause problems for UNIT's operation.
Ordinary users will find it difficult to deal with such problems, so we need to introduce some mechanisms to solve these problems.
When a request arrives, we first need to determine whether it is a feedback or a normal request.
If it is a feedback, it needs to be sent directly to DM so as to modify the dialogue state and dialogue result at the previous turn.
If it is a normal request, we need to perform a quality check of the NLU result after the NLU procedure.
It will only be sent to DM if the NLU result is of good quality.
If the NLU result is of poor quality, the corresponding clarification mechanism will be triggered to get the user to clarify the result.
Of course, we also need to have a feedback memory mechanism at the end.
The feedback memory mechanism works like this - if a particular request has been given feedback before, subsequent identical or similar requests will be handled using the same feedback result, thus preventing past errors from reoccurring.
Next, let's see what functions there are for feedbacks.
The first function is correcting ASR errors.
There are five ways to do that – clarifying the correct Chinese character by using a word, clarifying the correct Chinese character by using a radical, clarifying the correct Chinese character by using disassembled components, partial repeating of the phrase, and full repeating of the phrase.
Here are some examples.
As you can see, speech recognition errors can be fixed.
The second function is intervening in NLU results.
When an error occurs in the interpretation of intents and slots, we can correct the result and thus allow the dialogue to proceed normally by using natural language utterances, as shown in this example.
Aside from intervention mechanisms, there are also clarification mechanisms.
This refers to UNIT's ability to proactively initiate queries regarding potential errors, such as queries about intents and slots when the intents are vague or the slot has more than one possible meaning.
These proactive queries will help to prevent problems from occurring.
Lastly, the feedback memory can be added to the sample set to assist the training of the natural language understanding module.
You can learn more about this function in the feedback learning log.
For example, in this one: "Cai Xukun is so handsome!"
Do you mean you want to listen to his songs?
No, I'm just fangirling.
During this dialogue, "Cai Xukun is so handsome" is labeled as a sys_other intent.
After training, the same clarification process will not be repeated if the same utterance appears again.
Instead, it will be directly handled as a sys_other intent.
OK, that's all for this lesson.
Thank you!
Hello everyone!
Welcome to the advanced course on the UNIT dialogue system.
I am Sun Shuqi, an R&D engineer for the Baidu UNIT platform.
In this course, I will introduce to you the UNIT dialogue management.
Dialogue management is aimed at dealing with businesses or things that cannot be fully said or done in one sentence.
There are three major tasks in dialogue management.
Firstly, the information mentioned in previous sessions have to be remembered.
Secondly, the missing key information have to be clarified.
Thirdly, specific dialogue branches should be triggered in different situations.
Let's refer to a few cases to understand how these dialogue management tasks are performed.
For example, in the dialogue shown on the left, the user wants to reserve a room, the bot asks how long he intends to stay, and the user says "till next Monday", to which the bot says "OK".
The user then changes his mind and says, "please make it till next Tuesday", and the bot says "OK".
What happened during this dialogue?
Firstly, there was an interpretation of intents and slots, naturally.
For example, the intent was identified as room reservation, the merchant as Beijing Hotel, and the check-in date as September 14.
During the second turn of dialogue, the user updated a slot by adding the check-out date, which was September 17.
The previous two slots and the intent were inherited.
This is the function of remembering and updating historical information.
And the slot can also be overwritten.
For example, when the user spoke the third sentence, the check-out date was updated to September 18.
That is the function of overwriting information.
In general, that is how the memory and update mechanism of UNIT works.
In the second case, let's take a look at the clarification function.
This is a slot-filling task.
Let's first look at the dialogue on the left.
"I want to reserve a room and stay for three days", says the user.
The bot asks, "What is the check-in date?"