Detecting unrelated utterances in a chatbot system
Techniques are described to determine whether an input utterance is unrelated to a set of skill bots associated with a master bot. In some embodiments, a system described herein includes a training system and a master bot. The training system trains a classifier of the master bot. The training includes accessing training utterances associated with the skill bots and generating training feature vectors from the training utterances. The training further includes generating multiple set representations of the training feature vectors, where each set representation corresponds to a subset of the training feature vectors, and configuring the classifier with the set representations. The master bot accesses an input utterance and generates an input feature vector. The master bot uses the classifier to compare the input feature vector to the multiple set representations so as to determine whether the input feature falls outside and, thus, cannot be handled by the skill bots.
1 . A computer-implemented method comprising:
accessing an input utterance;
determining that the input utterance includes a word that is not included in a plurality of training utterances;
in response to determining that the input utterance includes a word that is not included in the plurality of training utterances, processing the input utterance to generate an input feature vector for the input utterance;
providing the input feature vector to a trained classifier model;
using the trained classifier model to determine that the input utterance is unrelated to any skill bot of a plurality of skill bots based on the input feature vector, wherein the trained classifier model determines that the input utterance is unrelated to any skill bot of the plurality of skill bots by comparing the input feature vector to each set representation of a plurality of set representations, wherein each set representation of the plurality of set representations represents a cluster of training feature vectors associated with training data used to train the trained classifier model, a composite feature vector that is an aggregate of one or more of the training feature vectors, or a combination thereof; and
in response to determining that the input utterance is unrelated to any skill bot of the plurality of skill bots, outputting an indication representing that the input utterance cannot be handled by any skill bot of the plurality of skill bots.
2 . The method of claim 1 , further comprising:
accessing the training data, wherein the training data comprises the training utterances;
generating training feature vectors from the training utterances, the training feature vectors comprising respective training feature vectors associated with each skill bot of the plurality of skill bots;
generating the plurality of set representations; and
training a classifier model to result in the trained classifier model based on the plurality of set representations.
3 . The method of claim 2 , wherein:
generating the plurality of set representations comprises generating clusters to which the training feature vectors are assigned.
4 . The method of claim 3 , further comprising:
accessing a second input utterance as a second user input;
generating a second input feature vector from the second input utterance;
determining that the second input feature vector falls inside a boundary of a respective cluster of training feature vectors of the plurality of clusters of training feature vectors; and
in response to determining that the second input feature vectors falls inside the boundary of the respective cluster of training feature vectors, forwarding the second input utterance to a skill bot associated with the respective cluster of training feature vectors for processing.
5 . The method of claim 2 , wherein generating the plurality of set representations:
dividing the training utterances into conversation categories; and
generating a plurality of composite feature vectors, wherein the plurality of composite feature vectors correspond to the conversation categories, wherein generating the plurality of composite feature vectors comprises, for each conversation category of the conversation categories, generating a respective composite feature vector of the plurality of composite feature vectors as an aggregate of respective training feature vectors of the training feature vectors.
6 . The method of claim 5 , further comprising:
accessing a second input utterance as a second user input;
generating a second input feature vector from the second input utterance;
determining that the second input feature vector is sufficiently similar to a respective composite feature vector of the plurality of composite feature vectors; and
in response to determining that the second input feature vector is sufficiently similar to the composite feature vector, forwarding the second input utterance to a skill bot associated with the respective composite feature vector for processing.
7 . The method of claim 1 , further comprising:
processing the input utterance to perform an action responsive to the input utterance.
8 . A system comprising:
one or more processors; and
one or more computer readable storage media storing instructions that, when executed by the one or more processors, cause the system to perform operations comprising:
accessing an input utterance;
determining that the input utterance includes a word that is not included in a plurality of training utterances;
in response to determining that the input utterance includes a word that is not included in the plurality of training utterances, processing the input utterance to generate an input feature vector for the input utterance;
providing the input feature vector to a trained classifier model;
using the trained classifier model to determine that the input utterance is unrelated to any skill bot of a plurality of skill bots based on the input feature vector, wherein the trained classifier model determines that the input utterance is unrelated to any skill bot of the plurality of skill bots by comparing the input feature vector to each set representation of a plurality of set representations, wherein each set representation of the plurality of set representations represents a cluster of training feature vectors associated with training data used to train the trained classifier model, a composite feature vector that is an aggregate of one or more of the training feature vectors, or a combination thereof; and
in response to determining that the input utterance is unrelated to any skill bot of the plurality of skill bots, outputting an indication representing that the input utterance cannot be handled by any skill bot of the plurality of skill bots.
9 . The system of claim 8 , wherein the operations further comprise:
accessing the training data, wherein the training data comprises the training utterances;
generating training feature vectors from the training utterances, the training feature vectors comprising respective training feature vectors associated with each skill bot of the plurality of skill bots;
generating the plurality of set representations; and
training a classifier model to result in the trained classifier model based on the plurality of set representations.
10 . The system of claim 9 , wherein:
generating the plurality of set representations comprises generating clusters to which the training feature vectors are assigned.
11 . The system of claim 10 , wherein the operations further comprise:
accessing a second input utterance as a second user input;
generating a second input feature vector from the second input utterance;
determining that the second input feature vector falls inside a boundary of a respective cluster of training feature vectors of the plurality of clusters of training feature vectors; and
in response to determining that the second input feature vectors falls inside the boundary of the respective cluster of training feature vectors, forwarding the second input utterance to a skill bot associated with the respective cluster of training feature vectors for processing.
12 . The system of claim 9 , wherein generating the plurality of set representations comprises:
dividing the training utterances into conversation categories; and
generating a plurality of composite feature vectors, wherein the plurality of composite feature vectors correspond to the conversation categories, wherein generating the plurality of composite feature vectors comprises, for each conversation category of the conversation categories, generating a respective composite feature vector of the plurality of composite feature vectors as an aggregate of respective training feature vectors of the training feature vectors.
13 . The system of claim 12 , wherein the operations further comprise:
accessing a second input utterance as a second user input;
generating a second input feature vector from the second input utterance;
determining that the second input feature vector is sufficiently similar to a respective composite feature vector of the plurality of composite feature vectors; and
in response to determining that the second input feature vector is sufficiently similar to the composite feature vector, forwarding the second input utterance to a skill bot associated with the respective composite feature vector for processing.
14 . The system of claim 8 , further comprising the skill bot, wherein the skill bot is configured to process the input utterance to perform an action responsive to the input utterance.
15 . One or more non-transitory computer-readable media storing computer-readable instructions that, when executed by a processing system, cause a system to perform operations comprising:
accessing an input utterance;
determining that the input utterance includes a word that is not included in a plurality of training utterances;
in response to determining that the input utterance includes a word that is not included in the plurality of training utterances, processing the input utterance to generate an input feature vector for the input utterance;
providing the input feature vector to a trained classifier model;
using the trained classifier model to determine that the input utterance is unrelated to any skill bot of a plurality of skill bots based on the input feature vector, wherein the trained classifier model determines that the input utterance is unrelated to any skill bot of the plurality of skill bots by comparing the input feature vector to each set representation of a plurality of set representations, wherein each set representation of the plurality of set representations represents a cluster of training feature vectors associated with training data used to train the trained classifier model, a composite feature vector that is an aggregate of one or more of the training feature vectors, or a combination thereof; and
in response to determining that the input utterance is unrelated to any skill bot of the plurality of skill bots, outputting an indication representing that the input utterance cannot be handled by any skill bot of the plurality of skill bots.
16 . The one or more non-transitory computer-readable media of claim 15 , wherein the operations further comprise:
accessing the training data, wherein the training data comprises the training utterances;
generating training feature vectors from the training utterances, the training feature vectors comprising respective training feature vectors associated with each skill bot of the plurality of skill bots;
generating the plurality of set representations; and
training a classifier model to result in the trained classifier model based on the plurality of set representations.
17 . The one or more non-transitory computer-readable media of claim 16 , wherein:
generating the plurality of set representations comprises generating clusters to which the training feature vectors are assigned.
18 . The one or more non-transitory computer-readable media of claim 17 , wherein the operations further comprise:
accessing a second input utterance as a second user input;
generating a second input feature vector from the second input utterance;
determining that the second input feature vector falls inside a boundary of a respective cluster of training feature vectors of the plurality of clusters of training feature vectors; and
in response to determining that the second input feature vectors falls inside the boundary of the respective cluster of training feature vectors, forwarding the second input utterance to a skill bot associated with the respective cluster of training feature vectors for processing.
19 . The one or more non-transitory computer-readable media of claim 16 , wherein generating the plurality of set representations comprises:
dividing the training utterances into conversation categories; and
generating a plurality of composite feature vectors, wherein the plurality of composite feature vectors correspond to the conversation categories, wherein generating the plurality of composite feature vectors comprises, for each conversation category of the conversation categories, generating a respective composite feature vector of the plurality of composite feature vectors as an aggregate of respective training feature vectors of the training feature vectors.
20 . The one or more non-transitory computer-readable media of claim 19 , wherein the operations further comprise:
accessing a second input utterance as a second user input;
generating a second input feature vector from the second input utterance;
determining that the second input feature vector is sufficiently similar to a respective composite feature vector of the plurality of composite feature vectors; and
in response to determining that the second input feature vector is sufficiently similar to the composite feature vector, forwarding the second input utterance to a skill bot associated with the respective composite feature vector for processing.