Intent detection and Slot filling
A dialog system usually has to perform two important tasks: understand the intent of an input sentence and identify the entities in the sentence that are important to response on this intent. These two tasks are respectively known as intent detection and slot filling.
For example, the utterance “Is there something new you can play by Lola Monroe?” has the intent PlayMusic
and the slots sort
, artist
with the entities “new”, “Lola Monroe” respectively.
We use the open-source Snips NLU-benchmark to train and test our model. The dataset contains seven intents with about 2000 instances for each, as well as a validation dataset with 100 instances for each intent.
Intent | train data | validation data |
---|---|---|
SearchCreativeWork |
1,954 | 100 |
PlayMusic |
2,000 | 100 |
SearchScreeningEvent |
1,959 | 100 |
GetWeather |
2,000 | 100 |
AddToPlaylist |
1,942 | 100 |
BookRestaurant |
1,973 | 100 |
RateBook |
1,956 | 100 |
Total | 13,784 | 700 |
Pythia-NLU is a generative model that takes advantage of the probabilities that intent parser and slot filler to input sentences. Mathematically we search for the intent that is assigned the highest probability by both sub-models and choose the subset of slots that are associated with this intent:
where i is the predicted intent, i is the set of possible intents, e are the slot entities and x is the sequence of tokens in the input sentence.
soon.