Stopword Data Augmentation for Natural Language Processing
Stopword data augmentation enhances chatbot training by preserving stop words and replacing non-stop words, improving intent classification accuracy and handling diverse user inputs.
Patent Information
- Application Number
- JP2022516740
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2019-09-16
- Filing Date
- 2020-09-11
- Publication Date
- 2024-10-04
- Estimated Expiration
- 2040-09-11
AI Technical Summary
Building chatbots is challenging due to the need for specific domain knowledge and professional development, and training data quality significantly impacts intent classification accuracy, leading to incorrect decisions.
A method for stopword data augmentation that preserves existing stop words in training data and randomly replaces non-stop words with stop words or phrases to generate expanded training sets, enhancing the accuracy of intent classification in chatbots.
Improves the accuracy of intent classification by allowing machine learning models to focus on important utterance features, reducing incorrect decisions and enhancing the chatbot's ability to handle out-of-domain utterances.
Smart Images

Figure 0007561836000003 
Figure 0007561836000004 
Figure 0007561836000005
Abstract
Description
[Technical field]
[0001] Claiming priority This application is a nonprovisional application claiming the benefit of and priority to U.S. Provisional Patent Application No. 62 / 901,203, filed September 16, 2019, pursuant to 35 U.S.C. § 119(e), entitled "STOP WORD AUGMENTATION TOOL," the entire disclosure of which is hereby incorporated by reference herein for all purposes.
[0002] FIELD OF THEINVENTION The present disclosure relates generally to chatbot systems, and more particularly to stop word data augmentation techniques for training chatbot systems in natural language processing. [Background technology]
[0003] background Many users around the world rely on instant messaging or chat platforms to get instant responses. Organizations often use these instant messaging or chat platforms to have live conversations with customers (or end users). However, hiring service personnel for live communication with customers or end users can be very costly for organizations. Chatbots or bots have started to be developed that simulate conversations with end users, especially over the internet. End users can communicate with the bots through messaging apps that are already installed and used. Intelligent bots, which generally run on artificial intelligence (AI), can potentially improve the conversation experience by having a more natural conversation between the bot and the end user, as they are more intelligent and contextual in their communication during live conversations. Instead of end users having to learn a set of fixed keywords or commands that the bot knows how to respond to, intelligent bots can potentially understand the end user's intent based on the user's utterances in natural language and respond accordingly. Summary of the Invention [Problem to be solved by the invention]
[0004] However, building a chatbot is challenging because chatbot automation solutions require specific domain knowledge and application of specific techniques that may require specialized developers. As part of building such a chatbot, a developer may first need to understand the needs of the enterprise and end users. The developer may then perform analysis and decision-making related to, for example, selecting a dataset to use for analysis, preparing the input dataset for analysis (e.g., cleansing the data, extracting, formatting, and / or transforming data before analysis, performing data feature engineering, etc.), identifying appropriate machine learning (ML) technique(s) or model(s) to perform the analysis, and improving the technique or model to improve the results / outcomes based on feedback. Identifying an appropriate model may involve developing multiple models, possibly in parallel, iteratively testing and experimenting with these models, and then identifying the specific model(s) to use. Furthermore, supervised learning-based solutions generally include a training phase followed by an application (i.e., inference) phase, and an iterative loop between the training and application phases. The developer may be responsible for carefully implementing and monitoring these phases to achieve an optimal solution. For example, to train an ML technique(s) or model(s), accurate training data is needed so that the algorithm can understand and learn certain patterns or features (e.g., in the case of a chatbot, not just raw language processing, but intent extraction and careful syntactic parsing) that are used by the ML technique(s) or model(s) to predict a desired outcome (e.g., inferring intent from an utterance). To ensure that the ML technique(s) or model(s) properly learns these patterns and features, developers may be responsible for selecting, enriching, and optimizing the set of training data for the ML technique(s) or model(s).
[0005] A quick overview The technology disclosed herein generally relates to chatbots. More specifically, but not limited to, the technology disclosed herein relates to a technique for stop word data augmentation of a set of training data for training a chatbot system in natural language processing. A chatbot can classify a user's utterance into different classes, such as the user's predefined intents. The chatbot's classifier may include a trained ML model that generates an output (e.g., intent) based on an input (e.g., a user's utterance). If the training data used to train the trained ML model is not appropriate, the chatbot may more frequently determine an incorrect intent. The technology disclosed herein may provide a stop word augmentation data set for training the ML model such that the ML model is stopped to pick patterns in the stop words and more accurately learn the patterns or boundaries of the intents. Various embodiments are described herein, including methods, systems, non-transitory computer readable storage media storing programs, codes, or instructions executable by one or more processors, and the like. [Means for solving the problem]
[0006] In various embodiments, a computer-implemented method is provided, the method comprising: receiving, at a data processing system, a training set of utterances for training an intent classifier to identify one or more intents for one or more utterances; and the data processing system augmenting the training set of utterances with stop words to generate an augmented training set of out-domain utterances for unresolved intent categories corresponding to the unresolved intents, where augmenting includes selecting one or more utterances from the training set of utterances, and for each selected utterance, preserving existing stop words in the utterance and replacing at least one non-stop word in the utterance with a stop word or stop word phrase selected from the list of stop words to generate the out-domain utterance, and the method further comprises the data processing system training the intent classifier using the training set of utterances and the augmented training set of out-domain utterances.
[0007] In some embodiments, for each selected utterance, the existing stop words in the utterance are preserved and all of the non-stop words in the utterance are replaced with stop words or stop word phrases selected from the list of stop words.
[0008] In some embodiments, for each selected utterance, the existing stop words in the utterance are preserved and at least one of the non-stop words in the utterance is randomly replaced with a stop word or stop word phrase selected from the list of stop words.
[0009] In some embodiments, selecting an utterance includes searching for consecutive stop words at the beginning of an utterance in a training set of utterances and selecting an utterance having the longest consecutive stop words at the beginning of the utterance in the training set of utterances.
[0010] In some embodiments, selecting an utterance includes searching for n consecutive stop words anywhere in the utterance in the training set of utterances and selecting an utterance having n consecutive stop words anywhere in the utterance.
[0011] In some embodiments, augmenting the training set of utterances with stop words further includes (i) repeatedly selecting one or more utterances from the training set of utterances and processing each utterance once to generate a corresponding out-domain utterance based on a pre-defined expansion percentage; (ii) generating one or more utterances from the training set of utterances and processing the one or more utterances multiple times to generate multiple out-domain utterances from each utterance based on a pre-defined expansion percentage; or (iii) any combination thereof.
[0012] In some embodiments, the predefined expansion ratio is a ratio of original speech to expanded speech between 1:0.05 and 1:1.
[0013] In various embodiments, a computer-implemented method is provided, the method comprising: a chatbot system receiving utterances generated by a user interacting with the chatbot system; and classifying the utterances into a resolved intent category corresponding to a resolved intent or an unresolved intent category corresponding to an unresolved intent using an intent classifier deployed within the chatbot system, the intent classifier including a plurality of model parameters identified using training data, the training data including a training set of utterances for training the intent classifier to identify one or more resolved intents for the one or more utterances; and an expanded training set of out-domain utterances for training the intent classifier to identify one or more unresolved intents for one or more utterances, where the expanded training set of out-domain utterances is artificially generated to include utterances from the training set of utterances, where existing stop word patterns in the utterances are preserved and at least one non-stop word in each of the utterances is randomly replaced with a stop word, and a plurality of model parameters are identified using the training data based on minimization of a loss function, and the method further comprises using the intent classifier to output a resolved intent or an unresolved intent based on the classification.
[0014] In various embodiments, a system is provided that includes one or more data processors and a non-primary computer-readable storage medium containing instructions that, when executed on the one or more data processors, cause the one or more data processors to perform some or all of one or more of the methods disclosed herein.
[0015] In various embodiments, a computer program product is provided, the computer program product tangibly embodied in a non-transitory machine-readable storage medium and including instructions configured to cause one or more data processors to perform some or all of one or more of the methods disclosed herein.
[0016] Some embodiments of the present disclosure include a system comprising one or more data processors. In some embodiments, the system comprises a non-transitory computer-readable storage medium comprising instructions that, when executed on the one or more data processors, cause the one or more data processors to perform some or all of one or more of the methods and / or some or all of one or more processes disclosed herein. Some embodiments of the present disclosure include a computer program product tangibly embodied in a non-transitory machine-readable storage medium, the non-transitory machine-readable storage medium comprising instructions configured to cause the one or more data processors to perform some or all of one or more of the methods and / or some or all of the processes disclosed herein.
[0017] The techniques described above and below can be implemented in many ways and in many contexts. Some example implementations and contexts are provided with reference to the following figures, as described in more detail below. However, the following implementations and contexts are only a few of many. [Brief description of the drawings]
[0018] [Figure 1] FIG. 1 is a simplified block diagram illustrating a distributed environment incorporating an illustrative embodiment. [Diagram 2] FIG. 2 is a simplified block diagram illustrating a computing system implementing a MasterBot, according to certain embodiments. [Diagram 3] FIG. 1 is a simplified block diagram illustrating a computing system for implementing a skillbot, according to certain embodiments. [Figure 4] FIG. 1 is a simplified block diagram illustrating a chatbot training and deployment system according to various embodiments. [Diagram 5] FIG. 2 illustrates a process flow for augmenting a training dataset with stop words, according to various embodiments. [Figure 6] FIG. 1 is a simplified diagram illustrating a distributed system for implementing various embodiments. [Figure 7] A simplified block diagram illustrating one or more components of a system environment in which services provided by one or more components of an embodiment system may be offered as cloud services, according to various embodiments. [Figure 8] FIG. 1 illustrates an example of a computer system that can be used to implement various embodiments. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] Detailed Description In the following description, for purposes of explanation, specific details are set forth in order to provide a thorough understanding of certain embodiments. It will be apparent, however, that various embodiments may be practiced without these specific details. The figures and descriptions are not intended to be limiting. The word "exemplary" is used herein to mean "serving as an example, instance, or illustration." Any embodiment or design described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments or designs.
[0020] Introduction A digital assistant is an artificial intelligence-driven interface that helps users accomplish various tasks through natural language conversation. For each digital assistant, customers can assemble one or more skills. Skills (also referred to herein as chatbots, bots, or skillbots) are individual bots that focus on a specific type of task, such as tracking inventory, submitting time cards, and creating expense reports. When an end user engages with a digital assistant, the digital assistant evaluates the end user's input and routes the conversation to or from the appropriate chatbot. Digital assistants are available to end users through various channels, such as FACEBOOK® Messenger, SKYPE MOBILE® Messenger, and Short Message Service (SMS). Channels carry chats back and forth from end users on various messaging platforms to the digital assistant and its various chatbots. Channels can also support user-agent escalation, event-initiated conversations, and testing.
[0021] Intents allow a chatbot to understand what a user wants from the chatbot. Intents consist of a sequence of typical user requests and statements, also called utterances (e.g., get account balance, make a purchase, etc.). As used herein, an utterance or message may refer to a sequence of words (e.g., one or more sentences) exchanged during a conversation with a chatbot. An intent may be created by providing a name that exemplifies a certain user action (e.g., order a pizza) and compiling a set of real-world user statements or utterances that are commonly associated with triggering the action. Since the chatbot's cognition is derived from these intents, each intent may be created from a robust and diverse dataset (1-20 utterances) to enable the chatbot to interpret ambiguous user input. A rich set of utterances allows the chatbot to understand what the user wants when it receives messages such as "Forget this order" or "Cancel delivery" - messages that mean the same thing but are expressed differently. Collectively, the intents and their associated utterances constitute the training corpus for the chatbot. By training a model with this corpus, customers can essentially use the model as a reference tool to resolve end-user input to a single intent. Customers can iteratively improve their chatbot's recognition by testing intents and training intents.
[0022] However, building a chatbot that can determine an end user's intent based on the user's utterances is a challenging task, in part due to the subtleties and ambiguities of natural language, as well as the dimensionality of the input space (e.g., possible user utterances), and the largeness of the output space (number of intents). As such, chatbots may need to be trained, monitored, debugged, and retrained to improve their performance and the user experience of using them. Conventional systems provide training systems for training and retraining machine learning models of digital assistants or chatbots in Speech Language Understanding (SLU) and Natural Language Processing (NLP). Conventionally, models used for chatbot systems are trained in NLP using "manufactured" utterances for any intent. For example, using the utterance "Would you like to change the price?", a classifier model for the chatbot system can be trained to classify this type of utterance as an intent - "Would you like to price match?". Training the model with manufactured utterances is useful for initial training of the chatbot system to provide services, and can then be retrained once the chatbot system is deployed and gets real utterances from users.
[0023] Training a traditional model for text classification starts from pre-labeled data. One option to obtain labeled data is to annotate all the data itself by manually reading each text and classifying the text (e.g., classifying an utterance as an intent). Another option is to outsource the labeling to a freelancer or company that specializes in data labeling. Both options are costly in terms of time and money. To overcome this problem in similar technical domains such as image analysis, data augmentation is used to increase the image dataset size for image classification tasks and speed up the labeling process. While images have natural augmentation primitives such as rotation, small translation, and additive Gaussian noise, similar primitives are less developed for text data. For example, text-based data augmentation requires modifying the input data while preserving the class labels. If the augmentation approach significantly changes the meaning of the utterance (e.g., a sentence or phrase), the original class labels may no longer be valid. Thus, conventional augmentation primitives developed for text focus on the words present in each sentence (e.g., synonym replacement, random insertion with synonyms, random swap, random deletion, etc.) and the length of the sentence or phrase to maintain the original class label of the sentence or phrase. However, these approaches may be difficult to implement for enterprise systems that employ many chatbot systems trained for many different tasks in multiple languages and receive a wide variety of utterances per task, many of which are very short utterances. Systems employing such chatbots need to automatically apply augmentation in a composition-agnostic manner to quickly and efficiently generate large corpora of training data in multiple languages for many different chatbots.
[0024] Thus, a different approach is needed to address these problems. In various embodiments, a method is provided that includes receiving a training set of utterances for training an intent classifier to identify one or more intents for one or more utterances, and augmenting the training set of utterances with stop word text to obtain an augmented training set of text data. The augmenting includes generating utterance sets for unresolved intent categories corresponding to the unresolved intents, the utterance sets including utterances from the training set of utterances, where existing stop word patterns are preserved, and where at least one non-stop word in the utterance set is randomly replaced with a stop word. The computer-implemented method further includes training the intent classifier with the augmented training set of text data.
[0025] Bots and Analytics Systems A bot (also called a skill, chatbot, chatterbot, or talkbot) is a computer program that can have a conversation with an end user. A bot can generally respond to natural language messages (e.g., questions or comments) through a messaging application using natural language messages. Businesses can use one or more bot systems to communicate with end users through messaging applications. The messaging application, sometimes called a channel, can be an end user's preferred messaging application that the end user already has installed and is familiar with. Thus, end users do not need to download and install a new application to chat with a bot system. Messaging applications may include, for example, over-the-top (OTT) messaging channels (such as Facebook Messenger, Facebook WhatsApp, WeChat, Line1, Kik, Telegram, Talk, Skype, Slack or SMS), virtual private assistants (such as Amazon Dot, Echo or Show, Google Home, Apple HomePod), mobile and web app extensions that extend native or hybrid / responsive mobile apps or web applications with chat capabilities, or voice-based input (such as Siri®, Cortana, Google Voice or other devices or apps with an interface that interacts using voice input).
[0026] In some examples, the bot system may be associated with a Uniform Resource Identifier (URI). The URI may identify the bot system using a string of characters. The URI may be used as a webhook to one or more messaging application systems. The URI may include, for example, a Uniform Resource Locator (URL) or a Uniform Resource Name (URN). The bot system may be designed to receive a message (e.g., a HyperText Transfer Protocol (HTTP) post call message) from the messaging application system. The HTTP post call message may be directed to the URI from the messaging application system. In some embodiments, the message may differ from the HTTP post call message. For example, the bot system may receive a message from a Short Message Service (SMS). Although the discussion herein may refer to a communication received by the bot system as a message, it should be understood that the message may be an HTTP post call message, an SMS message, or other type of communication between the two systems.
[0027] End users may interact with bot systems through conversational interactions (sometimes called conversational user interfaces (UIs)) similar to human-to-human interactions. In some cases, an interaction may involve the end user saying "hello" to the bot, with the bot responding with "hi" and asking the end user how they can help. In other cases, an interaction may be a transactional interaction with a banking bot, e.g., transferring money from one account to another, an informational interaction with a human resources bot, e.g., checking a vacation balance, or an interaction with a retail bot, e.g., discussing the return of a purchase or asking for technical support.
[0028] In some embodiments, the bot system may intelligently handle interactions with end users without interaction with an administrator or developer of the bot system. For example, an end user may send one or more messages to the bot system to achieve a desired goal. The messages may include specific content, such as text, emojis, voice, images, video, or other methods of conveying a message. In some embodiments, the bot system may convert the content into a standardized format (e.g., a representational state transfer (REST) call to an enterprise service with appropriate parameters) and generate a natural language response. The bot system may prompt the end user for additional input parameters or request other additional information. In some embodiments, the bot system may initiate communication with the end user rather than passively responding to the end user's utterances. Described herein are various techniques for identifying explicit invocations of the bot system and determining inputs of the invoked bot system. In certain embodiments, analysis of the explicit invocation is performed by the master bot based on detecting the invocation name in the utterance. In response to detecting the invocation name, the utterance may be refined for input to a skill bot associated with the invocation name.
[0029] A conversation with a bot may follow a particular conversation flow that includes multiple states. The flow may define what happens next based on the input. In some embodiments, a state machine that includes user-defined states (e.g., end user intents) and actions in or from states may be used to realize the bot system. A conversation may take different paths based on end user input, which may affect the decisions the bot makes about the flow. For example, at each state, based on end user input or utterances, the bot may determine the end user intent to determine the appropriate action to take next. As used herein and in the context of utterances, the term "intent" refers to the intent of the user who provided the utterance. For example, a user may intend to engage a bot in a conversation to order a pizza, so the user's intent may be expressed through the utterance "order a pizza". The user's intent may be directed to a particular task that the user wants the chatbot to perform on the user's behalf. Thus, utterances can be phrases such as questions, commands, and requests that reflect the user's intent. Intents may include goals that the end user wants to achieve.
[0030] In the context of configuring a chatbot, we use "intent" herein to refer to configuration information for mapping a user's utterance to a specific task / action or category of tasks / actions that the chatbot can perform. To distinguish between an utterance intent (i.e., a user's intent) and a chatbot's intent, we may refer to the latter as a "bot's intent." A bot's intent may consist of a set of one or more utterances associated with the intent. For example, an intent to order pizza may have various permutations of utterances expressing the desire to order pizza. These associated utterances may be used to train the chatbot's intent classifier, which can then determine whether an input utterance from a user matches the pizza ordering intent. A bot intent may be associated with one or more dialog flows to initiate a conversation with a user, with a particular state. For example, the initial message of a pizza ordering intent may be the question, "What kind of pizza would you like?" In addition to the associated utterances, a bot intent may further include a named entity associated with the intent. For example, a pizza ordering intent may include variables or parameters used to perform the task of ordering a pizza, such as topping 1, topping 2, pizza type, pizza size, and pizza quantity, etc. The values of the entities are typically obtained through conversation with the user.
[0031] FIG. 1 is a simplified block diagram illustrating an environment 100 incorporating a chatbot system according to certain embodiments. The environment 100 includes a digital assistant builder platform (DABP) 102 that enables its users to create and deploy digital assistant or chatbot systems. The DABP 102 can be used to create one or more digital assistants (or DAs) or chatbot systems. For example, as shown in FIG. 1, a user 104 representing a particular business can use the DABP 102 to create and deploy a digital assistant 106 for users of the particular business. For example, the DABP 102 can be used by a bank to create one or more digital assistants for use by the bank's customers. The same DABP 102 platform can be used by multiple businesses to create digital assistants. As another example, a restaurant (e.g., a pizza place) owner can use the DABP 102 to create and deploy a digital assistant that enables restaurant patrons to order food (e.g., order pizza).
[0032] For purposes of this disclosure, a "digital assistant" is an entity that assists a user of the digital assistant in accomplishing various tasks through natural language conversation. A digital assistant can be implemented using software alone (e.g., a digital assistant is a digital entity implemented using programs, codes, or instructions executable by one or more processors), using hardware, or using a combination of hardware and software. Digital assistants can be embodied or implemented in a variety of physical systems or devices, such as computers, mobile phones, watches, home appliances, and vehicles. Digital assistants are also sometimes referred to as chatbot systems. Thus, for purposes of this disclosure, the terms digital assistant and chatbot system are interchangeable.
[0033] A digital assistant, such as a digital assistant 106 built using DABP 102, can be used to perform a variety of tasks via a natural language-based conversation between the digital assistant and its user 108. As part of the conversation, the user can provide one or more user inputs 110 to the digital assistant 106 and receive responses 112 from the digital assistant 106. A conversation can include one or more of the inputs 110 and the responses 112. Through these conversations, the user can request one or more tasks to be performed by the digital assistant, in response to which the digital assistant is configured to perform the tasks requested by the user and return an appropriate response to the user.
[0034] The user input 110 is generally in a natural language format and is referred to as an utterance. The user utterance 110 may be in a text format, such as when the user types a sentence, a question, a text fragment, or a single word to provide as input to the digital assistant 106. In some embodiments, the user utterance 110 may be in a voice input or voice format, such as when the user says or speaks something that is provided as input to the digital assistant 106. The utterance is typically in the language that the user 108 speaks. For example, the utterance may be in English or in another language. When the utterance is in a voice format, the voice input is converted into a text format utterance in that particular language, and the text utterance is then processed by the digital assistant 106. Various voice-to-text processing techniques may be used to convert the voice or audio input into a text utterance, which is then processed by the digital assistant 106. In some embodiments, the voice-to-text conversion may be performed by the digital assistant 106 itself.
[0035] The utterance, which may be a text utterance or a voice utterance, may be a fragment, a sentence, multiple sentences, one or more words, one or more questions, a combination of the aforementioned types, and the like. The digital assistant 106 is configured to apply natural language understanding (NLU) techniques to the utterance to understand the meaning of the user input. As part of the NLU processing of the utterance, the digital assistant 106 is configured to perform processing to understand the meaning of the utterance, which includes identifying one or more intents and one or more entities that correspond to the utterance. Upon understanding the meaning of the utterance, the digital assistant 106 can perform one or more actions or operations responsive to the understood meaning or intent. For purposes of this disclosure, it is assumed that the utterance is a text utterance provided directly by a user 108 of the digital assistant 106 or is the result of a conversion of an input voice utterance into text form. However, this is not intended to be limiting or restrictive in any manner.
[0036] For example, user 108 input may request a pizza order by providing an utterance such as "I would like to order a pizza." Upon receiving such an utterance, digital assistant 106 is configured to understand the meaning of the utterance and take appropriate action. The appropriate action may include, for example, responding to the user with a question requesting user input regarding the type of pizza the user would like to order, the size of the pizza, and any toppings on the pizza. Also, the responses provided by digital assistant 106 may be in natural language format, typically in the same language as the input utterance. As part of generating these responses, digital assistant 106 may perform natural language generation (NLG). In the case of a user ordering a pizza, through a conversation between the user and digital assistant 106, the digital assistant may guide the user to provide all the information required to order the pizza, and at the end of the conversation, have the pizza ordered. Digital assistant 106 may end the conversation by outputting information to the user indicating that the pizza has been ordered.
[0037] At a conceptual level, the digital assistant 106 performs various processes in response to utterances received from a user. In some embodiments, this process includes a series or pipeline of processing steps, including, for example, understanding the meaning of the input utterance (sometimes referred to as natural language understanding (NLU)), determining an action to be taken in response to the utterance, executing the action if necessary, generating a response to be output to the user in response to the user's utterance, and outputting the response to the user. NLU processing may include parsing the received input utterance to understand the structure and meaning of the utterance, refining and refining the utterance to develop a more understandable form (e.g., a logical form) or structure for the utterance. Generating a response may include using NLG techniques.
[0038] The NLU processing performed by a digital assistant such as digital assistant 106 may include various NLP-related processing such as parsing the sentence (e.g., tokenizing, lemmatizing, identifying part-of-speech tags for the sentence, identifying named entities in the sentence, generating a dependency tree to represent the sentence structure, splitting the sentence into clauses, analyzing the individual clauses, performing anaphora resolution, and chunking, etc.). In certain embodiments, the NLU processing, or parts thereof, are performed by the digital assistant 106 itself. In some other embodiments, the digital assistant 106 may use other resources to perform parts of the NLU processing. For example, the syntax and structure of an input spoken sentence may be identified by processing the sentence with a parser, a part-of-speech tagger, and / or a named entity recognizer. In one implementation, for the English language, parsers, part-of-speech taggers, and named entity recognizers such as those provided by the Stanford Natural Language Processing (NLP) group are used to analyze the structure and syntax of the sentence. These are provided as part of the Stanford CoreNLP toolkit.
[0039] Although various examples provided in this disclosure show speech in English, this is intended to be an example only. In certain embodiments, the digital assistant 106 can also process speech in languages other than English. The digital assistant 106 may provide subsystems (e.g., components that realize NLU functions) configured to perform processing for different languages. These subsystems may be realized as pluggable units that can be invoked using service calls from the NLU core server. This makes NLU processing flexible and extensible for each language, such as processing in a different order. A language pack may be provided for each language, and the language pack can register a list of subsystems that can be provided by the NLU core server.
[0040] A digital assistant, such as the digital assistant 106 shown in FIG. 1, can be available or accessible to its user 108 through a variety of different channels, such as, but not limited to, through a particular application, through social media platforms, through various messaging services and applications, and other applications or channels. A single digital assistant can have several channels configured for running on and being accessed by different services simultaneously.
[0041] A digital assistant or chatbot system typically includes or is associated with one or more skills. In certain embodiments, these skills are individual chatbots (called skillbots) that are configured to interact with a user and perform certain types of tasks, such as tracking inventory, submitting time cards, creating expense reports, ordering food, checking bank accounts, making reservations, and purchasing widgets. For example, for the embodiment shown in FIG. 1, the digital assistant or chatbot system 106 includes skills 116-1 and 116-2, etc. For purposes of this disclosure, the terms "skill" and "skills" are used interchangeably with the terms "skillbot" and "skillbots," respectively.
[0042] Each skill associated with a digital assistant helps a user of the digital assistant complete a task through a conversation with the user, which may include a combination of text or voice input provided by the user and responses provided by the skill bot. These responses may be in the form of text or voice messages to the user and / or may use simple user interface elements (e.g., selection lists) that are presented to the user for the user to make a selection.
[0043] There are various ways in which skills or skill bots can be associated or added to a digital assistant. In some cases, skill bots are developed by companies and can then be added to a digital assistant using DABP 102. In other cases, skill bots are developed and created using DABP 102 and can then be added to a digital assistant created using DABP 102. In yet other examples, DABP 102 provides an online digital store (referred to as a "skill store") that offers multiple skills directed to a wide range of tasks. Skills offered through the skill store can also expose various cloud services. To add a skill to a digital assistant being created using DABP 102, a user of DABP 102 can access the skill store via DABP 102, select a desired skill, and indicate that the selected skill should be added to a digital assistant being created using DABP 102. Skills from the skill store can be added to a digital assistant as is or in modified form (e.g., a user of DABP102 can select and clone a particular skillbot offered by the skill store, make customizations or modifications to the selected skillbot, and then add the modified skillbot to a digital assistant created using DABP102).
[0044] A variety of different architectures may be used to realize a digital assistant or chatbot system. For example, in certain embodiments, a digital assistant created and deployed using DABP 102 may be realized using a masterbot / child (or sub)bot paradigm or architecture. According to this paradigm, the digital assistant is realized as a masterbot that interacts with one or more child bots, which are skillbots. For example, in the embodiment shown in FIG. 1, the digital assistant 106 includes a masterbot 114 and skillbots 116-1, 116-2, etc., that are child bots of the masterbot 114. In certain embodiments, the digital assistant 106 may itself function as a masterbot.
[0045] A digital assistant realized according to the Masterbot-Childbot architecture allows a user of the digital assistant to interact with multiple skills through a unified user interface, i.e., the Masterbot. When a user engages with the digital assistant, the user input is received by the Masterbot. The Masterbot then performs processing to determine the meaning of the user input utterance. The Masterbot then determines whether the task requested by the user in the utterance can be handled by the Masterbot itself, if not, the Masterbot selects a suitable skillbot to handle the user's request and routes the conversation to the selected skillbot. This allows a user to converse with the digital assistant through a common single interface and provides the ability to use multiple skillbots configured to perform specific tasks. For example, in the case of a digital assistant developed for an enterprise, the Masterbot of the digital assistant can interface with skillbots having specific capabilities, such as a CRM bot for performing functions related to customer relationship management (CRM), an ERP bot for performing functions related to enterprise resource planning (ERP), an HCM bot for performing functions related to human capital management (HCM), etc. In this way, the end user or consumer of the digital assistant only needs to know how to access the digital assistant through a common master bot interface, and behind the scenes, multiple skill bots are provided to handle the user's requests.
[0046] In a particular embodiment, in a masterbot / childbot infrastructure, the masterbot is configured to be aware of an available list of skillbots. The masterbot has access to metadata identifying the various available skillbots and, for each skillbot, the skillbot's capabilities, including tasks that can be performed by the skillbot. Upon receiving a user request in the form of an utterance, the masterbot is configured to identify or predict, from among the multiple available skillbots, a specific skillbot that can best fulfill or respond to the user request. The masterbot then forwards the utterance (or a portion of the utterance) to this specific skillbot for further processing. In this way, control flows from the masterbot to the skillbot. The masterbot can support multiple input and output channels.
[0047] 1 illustrates a digital assistant 106 including a masterbot 114 and skillbots 116-1, 116-2, and 116-3, but is not intended to be limiting. The digital assistant may include various other components (e.g., other systems and subsystems) that provide the functionality of the digital assistant. These systems and subsystems may be realized solely in software (e.g., code, instructions stored on a computer-readable medium and executable by one or more processors), solely in hardware, or in an implementation using a combination of software and hardware.
[0048] DABP 102 provides infrastructure and various services and features that enable a user of DABP 102 to create a digital assistant including one or more skillbots associated with the digital assistant. In some cases, a skillbot can be created by cloning an existing skillbot, for example, a skillbot provided by a skill store. As described above, DABP 102 provides a skill store or skill catalog that provides multiple skillbots for performing various tasks. A user of DABP 102 can clone a skillbot from a skill store. If necessary, modifications or customizations can be made to the cloned skillbot. In some other cases, a user of DABP 102 created a skillbot from scratch using tools and services provided by DABP 102. As described above, a skill store or skill catalog provided by DABP 102 may provide multiple skillbots for performing various tasks.
[0049] In particular embodiments, at a high level, creating or customizing a skillbot involves the following steps:
[0050] (1) Configure a new skill bot. (2) Configure one or more intents for the skill bot.
[0051] (3) Set one or more entities for one or more intents. (4) Train the skill bot.
[0052] (5) Create a dialogue flow for the skill bot. (6) Optionally, add custom components to your skill bot.
[0053] (7) Test and deploy the skill bot. Each of the above steps is briefly described below.
[0054] (1) Configuring a New Skillbot – Various configurations can be made to a skillbot. For example, a skillbot designer can specify one or more call names for the skillbot being created. Using these call names, a user of the digital assistant can explicitly call the skillbot. For example, a user can enter a call name in a user utterance to explicitly call the corresponding skillbot.
[0055] (2) Configuring one or more intents and associated example utterances for the skillbot - A skillbot designer specifies one or more intents (also called bot intents) for the skillbot being created. The skillbot is then trained based on these specified intents. These intents represent categories or classes for which the skillbot is trained to infer input speech. Upon receiving an utterance, the trained skillbot infers the intent of the utterance, which is selected from a predefined set of intents used to train the skillbot. The skillbot then performs an appropriate action corresponding to the utterance based on the inferred intent for the utterance. In some cases, the intents of the skillbot represent tasks that the skillbot can perform for a user of the digital assistant. Each intent is given an intent identifier or intent name. For example, for a skillbot trained for banking, the specified intents for the skillbot may include "CheckBalance", "TransferMoney", and "DepositCheck", etc.
[0056] For each intent defined in a skillbot, the skillbot designer may also provide one or more example utterances that represent and explain the intent. These example utterances are meant to represent utterances that a user can input to the skillbot for the intent. For example, for a CheckBalance intent, example utterances may include "What is the balance in my savings account?", "How much is in my checking account?", and "How much money do I have in my account?". Thus, various permutations of typical user utterances may be specified as example utterances for an intent.
[0057] The intents and their associated example utterances are used as training data to train the skill bot. A variety of different learning techniques may be used. This training results in a predictive model configured to take an utterance as input and output an intent inferred by the predictive model for the utterance. In some cases, the input utterance is provided to an intent analysis engine configured to use the trained model to predict or infer an intent for the input utterance. The skill bot can then take one or more actions based on the inferred intent.
[0058] (3) Configuring Entities for One or More Intents of a Skill Bot - There are cases where additional context is required for a skill bot to be able to respond appropriately to a user utterance. For example, there are situations where a user input utterance resolves to the same intent for a skill bot. For example, in the above example, both the utterances "What is my savings balance?" and "How much do I have in my checking account?" resolve to the same CheckBalance intent, but these utterances are different requests for different things. To disambiguate such requests, one or more entities are added to the intent. Using the banking skill bot example, adding an entity called AccountType that defines values "checking" and "saving" allows the skill bot to parse the user request and respond appropriately. In the above example, although these utterances resolve to the same intent, the values associated with the AccountType entity are different for the two utterances. This allows the skill bot to take possibly different actions for these two utterances, even though they resolve to the same intent. A particular intent configured for a skill bot can have one or more entities specified. Entities are thereby used to add context to the intent itself - they help to more completely describe the intent, enabling the skill bot to complete the user request.
[0059] In a particular embodiment, there are two types of entities: (a) built-in entities provided by DABP 102, and (2) custom entities that can be specified by the skill bot designer. Built-in entities are generic entities that can be used with a wide variety of bots. Examples of built-in entities include, but are not limited to, entities related to time, date, address, number, email address, duration, periodic period, currency, phone number, and URL. Custom entities are used for more customized applications. For example, for a banking skill, an AccountType entity is defined by the skill bot designer, which enables various banking transactions by checking user input for keywords such as check, savings, and credit card.
[0060] (4) Training the Skillbot—The skillbot is configured to receive user input in the form of an utterance, parse or otherwise process the received input, and identify or select an intent associated with the received user input. As described above, the skillbot must be trained for this. In certain embodiments, the skillbot is trained based on intents configured for the skillbot and examples of utterances associated with the intents (collectively, training data) to enable the skillbot to resolve user input utterances to one of its configured intents. In certain embodiments, the skillbot uses a predictive model trained using the training data to enable the skillbot to identify what the user has said (or, in some cases, what he or she is trying to say). DABP 102 provides a variety of different training techniques, including various machine learning-based training techniques, rule-based training techniques, and / or combinations thereof, that a skillbot designer can use to train the skillbot. In certain embodiments, a portion of the training data (e.g., 80%) is used to train the skillbot model, and another portion (e.g., the remaining 20%) is used to test or validate the model. Once trained, the trained model (sometimes called a trained skill bot) can then be used to process user utterances and respond to them. In certain cases, a user utterance may be a question that requires only a single answer and no further conversation. To accommodate such situations, a Q&A (Question and Answer) intent may be defined for the skill bot. This allows the skill bot to output an answer to a user request without updating the dialog definition. A Q&A intent is created in a similar way to a regular intent. The dialog flow for a Q&A intent may differ from that of a regular intent.
[0061] (5) Creating a Dialog Flow for a Skill Bot—The dialog flow specified for a skill bot describes how the skill bot responds when its different intents are resolved depending on the user input received. The dialog flow defines the behavior or actions that the skill bot takes, for example, how the skill bot responds to user utterances, how the skill bot prompts the user for input, how the skill bot returns data, etc. The dialog flow is like a flowchart that the skill bot follows. Skill bot designers specify the dialog flow using a language such as Markdown language. In certain embodiments, a version of YAML called OBotML may be used to specify the dialog flow for a skill bot. The dialog flow definition for a skill bot serves as a model of the conversation itself, enabling the skill bot designer to choreograph the interaction between the skill bot and the user that the skill bot serves.
[0062] In particular embodiments, the dialog flow definition for a skill bot includes three sections:
[0063] (a) Context Section (b) Default transition section (c) Status Section Context Section - A skill bot designer can define variables in the context section that will be used in the conversation flow. Other variables that can be named in the context section include, but are not limited to, variables for error handling, variables for built-in or custom entities, and user variables that allow the skill bot to recognize and preserve user preferences.
[0064] Default Transitions Section - Transitions for skill bots can be defined in the dialog flow states section or in the default transitions section. Transitions defined in the default transitions section act as fallbacks and are triggered when there is no applicable transition defined within a state or the conditions required to trigger a state transition are not met. The default transitions section can be used to define routing for skill bots to gracefully handle unexpected user actions.
[0065] States Section - A dialog flow and its associated behaviors are defined as a set of transitional states that manage the logic within the dialog flow. Each state node in a dialog flow definition names a component that provides the functionality needed at that point in the dialog. In this way, states are built around components. A state contains component-specific properties and defines transitions to other states that are triggered after the component is executed.
[0066] Special scenarios can be handled using the state section. For example, you might want to provide a user with the option to temporarily leave a first skill they are engaged in to do something in a second skill within the digital assistant. For example, if a user is interacting with a shopping skill (e.g., the user has selected some purchases), the user might want to jump to a banking skill (e.g., the user wants to check if they have enough money for the purchase), and then return to the shopping skill to complete the user's order. To address this, an action in a first skill can be configured to initiate an interaction with a second, different skill in the same digital assistant, and then return to the original flow.
[0067] (6) Adding Custom Components to a Skillbot—As described above, states specified in a skillbot's dialog flow name components that provide the required functionality for those states. The components enable the skillbot to perform the functions. In certain embodiments, DABP 102 provides a set of pre-configured components to perform a wide range of functions. A skillbot designer can select one or more of these pre-configured components and associate them with states in the dialog flow for the skillbot. A skillbot designer can also create custom or new components using tools provided by DABP 102 and associate the custom components with one or more states of the dialog flow for the skillbot.
[0068] (7) Skillbot Testing and Deployment – DABP102 provides several features that enable skillbot designers to test the skillbots they are developing, after which they can be deployed and included in a digital assistant.
[0069] While the above description describes how to create a skill bot, similar techniques can also be used to create a digital assistant (or master bot). At the master bot or digital assistant level, built-in system intents can be configured on the digital assistant. These built-in system intents are used to identify common tasks that the digital assistant itself (i.e., the master bot) can handle without invoking a skill bot associated with the digital assistant. Examples of system intents defined on the master bot include: (1) Exit: applied when a user signals a desire to exit the digital assistant's current conversation or context; (2) Help: applied when a user asks for help or orientation; and (3) UnresolvedIntent: applied to user input that does not match well with the exit and help intents. The digital assistant also stores information about one or more skill bots associated with the digital assistant. This information enables the master bot to select a specific skill bot to process an utterance.
[0070] At the MasterBot or Digital Assistant level, when a user inputs a phrase or utterance into the digital assistant, the digital assistant is configured to perform processing to determine how to route the utterance and associated conversation. The digital assistant makes this determination using a routing model, which may be rule-based, AI-based, or a combination thereof. The digital assistant uses the routing model to determine whether the conversation corresponding to the user input utterance should be routed to a specific skill for processing, handled by the digital assistant or MasterBot itself according to built-in system intents, or handled as a different state in the current conversation flow.
[0071] In certain embodiments, as part of this processing, the digital assistant determines whether the user input utterance explicitly identifies the skill bot with its call name. If a call name is present in the user input, this is treated as an explicit call of the skill bot corresponding to the call name. In such a scenario, the digital assistant can forward the user input to the explicitly called skill bot for further processing. In the absence of a specific or explicit call, in certain embodiments, the digital assistant evaluates the received user input utterance and calculates a confidence score for the system intent and skill bot associated with the digital assistant. The calculated score for the skill bot or system intent represents how likely it is that the user input represents a task that the skill bot is configured to perform or represents a system intent. A system intent or skill bot with an associated calculated confidence score exceeding a threshold (e.g., a confidence threshold routing parameter) is selected as a candidate for further evaluation. The digital assistant then selects a specific system intent or skill bot from among the identified candidates for further processing of the user input utterance. In certain embodiments, after one or more skill bots are identified as candidates, the intents associated with those candidate skills are evaluated (according to the intent model for each skill) and a confidence score is determined for each intent. In general, intents with a confidence score above a threshold (e.g., 70%) are treated as candidate intents. If a particular skill bot is selected, the user's utterance is routed to that skill bot for further processing. If a system intent is selected, one or more actions are performed by the master bot itself according to the selected system intent.
[0072] FIG. 2 is a simplified block diagram illustrating a Masterbot (MB) system 200, according to certain embodiments. The MB system 200 can be implemented in software only, hardware only, or a combination of hardware and software. The MB system 200 includes a pre-processing subsystem 210, a multiple intent subsystem (MIS) 220, an explicit invocation subsystem (EIS) 230, a skillbot invocation device 240, and a data store 250. The MB system 200 illustrated in FIG. 2 is only one example of an arrangement of components in a Masterbot. Those skilled in the art will recognize many possible variations, alternatives, and modifications. For example, in some implementations, the MB system 200 may have more or fewer systems or components than those illustrated in FIG. 2, may combine two or more subsystems, or may have a different configuration or arrangement of the subsystems.
[0073] The pre-processing subsystem 210 receives an utterance "A" 202 from a user and processes the utterance via a language detector 212 and a language parser 214. As discussed above, the utterance can be provided in a variety of ways, including audio or text. The utterance 202 can be a sentence fragment, a complete sentence, multiple sentences, and the like. The utterance 202 can include punctuation. For example, if the utterance 202 is provided as audio, the pre-processing subsystem 210 may convert the audio to text using a speech-to-text converter (not shown) that inserts punctuation marks, such as commas, semicolons, periods, and the like, into the resulting text.
[0074] The language detection unit 212 detects the language of the utterance 202 based on the text of the utterance 202. Each language has its own grammar and semantics, so different languages handle the utterance 202 differently. The differences between languages are taken into account when analyzing the syntax and structure of the utterance.
[0075] The language parser 214 parses the utterance 202 to extract part-of-speech (POS) tags for individual linguistic units (e.g., words) in the utterance 202. POS tags include, for example, nouns (NN), pronouns (PN), and verbs (VB). The language parser 214 may also tokenize the linguistic units of the utterance 202 (e.g., to convert each word into an individual token) and lemmatize the words. A lemma is a collection of a word's main form as represented in a dictionary (e.g., "run" is a lemma for run, runs, ran, running, etc.). Other types of preprocessing that the language parser 214 can perform include chunking of compound expressions, for example, combining "credit" and "card" into a single expression "credit_card". The language parser 214 can also identify relationships between words in the utterance 202. For example, in some embodiments, the language parser 214 generates a dependency tree that indicates which parts of the utterance (e.g., particular nouns) are direct objects, which parts of the utterance are prepositions, etc. The results of the processing performed by the language parser 214 form the extracted information 205, which is provided as input to the MIS 220 along with the utterance 202 itself.
[0076] As discussed above, an utterance 202 may include more than one sentence. For purposes of multiple intent and explicit invocation detection, an utterance 202 may be treated as a single unit, even if it includes multiple sentences. However, in certain embodiments, the utterance 202 may be preprocessed, for example by the preprocessing subsystem 210, to identify a single sentence among the multiple sentences for multiple intent and explicit invocation analysis. In general, the results generated by the MIS 220 and EIS 230 are substantially the same whether the utterance 202 is processed at the individual sentence level or as a single unit of multiple sentences.
[0077] The MIS 220 determines whether the utterance 202 expresses multiple intents. Although the MIS 220 can detect the presence of multiple intents in the utterance 202, the process performed by the MIS 220 does not involve determining whether the intent of the utterance 202 matches any intent configured for the bot. Instead, the process of determining whether the intent of the utterance 202 matches the intent of the bot can be performed by the intent classifier 242 of the MB system 200 or by the intent classifier of the skill bot (e.g., as shown in the embodiment of FIG. 3). The process performed by the MIS 220 assumes the existence of a bot (e.g., a particular skill bot or the master bot itself) that can process the utterance 202. Thus, the process performed by the MIS 220 does not require knowledge of what bots exist in the chatbot system (e.g., the identity of the skill bots registered with the master bot) or what intents are configured for a particular bot.
[0078] To determine that an utterance 202 includes multiple intents, the MIS 220 applies one or more rules from a rule set 252 in the data store 250. The rules applied to the utterance 202 depend on the language of the utterance 202 and may include a sentence pattern that indicates the presence of multiple intents. For example, the sentence pattern may include a coordinating conjunction that joins two parts of a sentence (e.g., a conjunction), both parts corresponding to separate intents. If the utterance 202 matches the sentence pattern, it can be inferred that the utterance 202 represents multiple intents. Note that an utterance with multiple intents does not necessarily have different intents (e.g., intents directed to different bots or different intents within the same bot). Instead, the utterance may have separate instances of the same intent. For example, "Order a pizza using payment account X, then order a pizza using payment account Y."
[0079] As part of determining that the utterance 202 represents multiple intents, the MIS 220 also determines which portions of the utterance 202 are associated with each intent. For each intent represented in the utterance that includes multiple intents, the MIS 220 constructs a new utterance for separate processing in place of the original utterance, e.g., utterance “B” 206 and utterance “C” 208 as shown in FIG. 2. In this manner, the original utterance 202 may be split into two or more separate utterances that are processed one at a time. The MIS 220 determines which of the two or more utterances should be processed first using the extracted information 205 and / or from an analysis of the utterance 202 itself. For example, the MIS 220 may determine that the utterance 202 includes a marker word that indicates that a particular intent should be processed first. The newly formed utterance that corresponds to this particular intent (e.g., one of the utterances 206 or utterance 208) will be sent first for further processing by the EIS 230. After the conversation triggered by the first utterance has ended (or been temporarily interrupted), the next highest priority utterance (e.g., the other of utterance 206 or utterance 208) may be sent to EIS 230 for processing.
[0080] The EIS 230 determines whether the received utterance (e.g., utterance 206 or utterance 208) includes the invocation name of the skillbot. In a particular embodiment, each skillbot in the chatbot system is assigned a unique invocation name to distinguish the skillbot from other skillbots in the chatbot system. A list of invocation names can be maintained as part of the skillbot information 254 in the data store 250. An utterance is considered to be an explicit invocation if the utterance includes a word that matches the invocation name. If the bot is not explicitly invoked, the utterance received by the EIS 230 is considered an implicit invocation utterance 234 and is input to the masterbot's intent classifier (e.g., intent classifier 242) to determine which bot should be used to process the utterance. In some cases, the intent classifier 242 will determine that the masterbot should process the implicitly invoked utterance. In other cases, the intent classifier 242 will determine which skillbot to route the utterance to for handling.
[0081] The explicit invocation feature provided by the EIS 230 has several advantages. It can reduce the amount of processing that the masterbot must perform. For example, if there is an explicit invocation, the masterbot may not have to perform an intent classification analysis (e.g., using the intent classifier 242) or may have to perform a reduced intent classification analysis to select a skillbot. Thus, the explicit invocation analysis may enable the selection of a particular skillbot without relying on intent classification analysis.
[0082] There may also be overlapping functionality between multiple skillbots. This can happen, for example, when two skillbots handle overlapping or very close intents. In such a situation, it may be difficult for the masterbot to identify which of the multiple skillbots to select based on intent classification analysis alone. In such cases, an explicit invocation will clarify the specific skillbot to use.
[0083] In addition to determining that an utterance is an explicit invocation, EIS 230 is responsible for determining which portions of the utterance should be used as input for the explicitly invoked skillbot. In particular, EIS 230 may determine whether a portion of the utterance is not associated with an invocation. EIS 230 may make this determination through analysis of the utterance and / or analysis of extracted information 205. Instead of sending the entire utterance received by EIS 230, EIS 230 may send the portion of the utterance that is not associated with the invocation to the invoked skillbot. In some cases, the input to the invoked skillbot is formed by simply removing any portion of the utterance that is associated with the invocation. For example, "I want to order a pizza using Pizzabot" can be shortened to "I want to order a pizza" because "using Pizzabot" is related to the invocation of Pizzabot but is unrelated to any processing performed by Pizzabot. In some cases, EIS 230 may reformat the portion sent to the invoked bot to form a complete sentence, for example. In this way, EIS 230 not only determines that there is an explicit call, but also what to send to the skillbot when there is an explicit call. In some cases, there may be no text to input to the bot being called. For example, if the utterance was "pizzabot," EIS 230 may determine that the pizzabot is being called, but there is no text for the pizzabot to process. In such a scenario, EIS 230 may indicate to the skillbot caller 240 that there is nothing to send.
[0084] The skillbot invoker 240 invokes the skillbot in a variety of ways. For example, the skillbot invoker 240 can invoke the bot in response to receiving an indication 235 that a particular skillbot has been selected as a result of an explicit invoke. The indication 235 can be sent by the EIS 230 along with an input about the explicitly invoked skillbot. In this scenario, the skillbot invoker 240 will hand over control of the conversation to the explicitly invoked skillbot. The explicitly invoked skillbot will determine an appropriate response to the input from the EIS 230 by treating the input as an independent utterance. For example, the response can be to perform a particular action or to start a new conversation in a particular state, with the initial state of the new conversation depending on the input sent from the EIS 230.
[0085] Another way that the skillbot invoker 240 can invoke a skillbot is by implicit invocation using the intent classifier 242. The intent classifier 242 can be trained using machine learning and / or rule-based training techniques to determine the likelihood that an utterance represents a task that a particular skillbot is configured to perform. The intent classifier 242 is trained for different classes, one class for each skillbot. For example, whenever a new skillbot is registered with a masterbot, the intent classifier 242 can be trained using a list of example utterances associated with the new skillbot to determine the likelihood that a particular utterance represents a task that the new skillbot can perform. The parameters (e.g., a set of weights and bias values for the machine learning model) generated as a result of this training can be stored as part of the skillbot information 254.
[0086] In certain embodiments, the intent classifier 242 is realized using a machine learning model, as described in further detail herein. Training the machine learning model may include inputting at least a subset of utterances from example utterances associated with various skill bots to generate, as an output of the machine learning model, an inference about which bot is the correct bot to process any particular training utterance. For each training utterance, an indication of the correct bot to use for that training utterance may be provided as ground truth information. The operation of the machine learning model may then be adapted (e.g., by backpropagation) to minimize the difference between the generated inference and the ground truth information.
[0087] In certain embodiments, the intent classifier 242 determines, for each skillbot registered with the master bot, a confidence score indicating the likelihood that the skillbot can process the utterance (e.g., the implicit invocation utterance 234 received from the EIS 230). The intent classifier 242 may also determine a confidence score for each configured system-level intent (e.g., help, exit). If a particular confidence score satisfies one or more conditions, the skillbot invocation device 240 will invoke the bot associated with the particular confidence score. For example, a threshold confidence score value may be required to be met. Thus, the output 245 of the intent classifier 242 is either an identification of a system intent or an identification of a particular skillbot. In some embodiments, in addition to meeting the threshold confidence score value, the confidence score must exceed the next highest confidence score by a certain margin of acquisition. Imposing such a condition allows routing to a particular skillbot if each of the confidence scores of multiple skillbots exceeds the threshold confidence score value.
[0088] After identifying a bot based on the evaluation of the confidence score, the skillbot invoker 240 hands over the processing to the identified bot. In the case of a system intent, the identified bot is a master bot. Otherwise, the identified bot is a skill bot. Furthermore, the skillbot invoker 240 determines what to provide as input 247 for the identified bot. As described above, in the case of an explicit invoke, the input 247 may be based on a portion of the utterance that is not associated with the invoke, or the input 247 may be nothing (e.g., an empty string). In the case of an implicit invoke, the input 247 may be the entire utterance.
[0089] The data store 250 comprises one or more computing devices that store data used by various subsystems of the masterbot system 200. As described above, the data store 250 includes rules 252 and skillbot information 254. The rules 252 include, for example, rules for determining by the MIS 220 when an utterance expresses multiple intents and how to split an utterance expressing multiple intents. The rules 252 further include rules for determining by the EIS 230 which part of an utterance that explicitly invokes a skillbot is sent to the skillbot. The skillbot information 254 includes the call names of the skillbots in the chatbot system, for example, a list of the call names of all skillbots registered to a particular masterbot. The skillbot information 254 may also include information used by the intent classifier 242 to determine a confidence score for each skillbot in the chatbot system, for example, parameters of a machine learning model.
[0090] 3 is a simplified block diagram illustrating a Skillbot system 300, according to certain embodiments. The Skillbot system 300 is a computing system that may be implemented in software only, hardware only, or a combination of hardware and software. In certain embodiments, such as the embodiment illustrated in FIG. 1, the Skillbot system 300 may be used to implement one or more Skillbots within a digital assistant.
[0091] The skillbot system 300 includes an MIS 310, an intent classifier 320, and a conversation manager 330. The MIS 310 is similar to the MIS 220 of FIG. 2 and provides similar functionality, including being operable to determine, using rules 352 in a data store 350, (1) whether an utterance represents multiple intents, and if so, (2) how to split the utterance into separate utterances for each of the multiple intents. In certain embodiments, the rules that the MIS 310 applies to detect multiple intents and to split the utterance are the same as those applied by the MIS 220. The MIS 310 receives the utterance 302 and the extracted information 304. The extracted information 304 is similar to the extracted information 205 of FIG. 1 and can be generated using the language parser 214 or a language parser local to the skillbot system 300.
[0092] The intent classifier 320 may be trained in a manner similar to the intent classifier 242 described above in connection with the embodiment of FIG. 2 and as described in more detail herein. For example, in certain embodiments, the intent classifier 320 is implemented using a machine learning model. The machine learning model of the intent classifier 320 is trained for a particular skill bot using at least a subset of the example utterances associated with that particular skill bot as training utterances. The ground truth for each training utterance will be the particular bot intent associated with the training utterance.
[0093] The utterance 302 can be received directly from a user or provided via a masterbot. If the utterance 302 is provided via a masterbot, the MIS 310 can be bypassed so as not to repeat the processing already performed by the MIS 220, e.g., as a result of processing via the MIS 220 and the EIS 230 in the embodiment shown in FIG. 2. However, if the utterance 302 is received directly from a user, e.g., during a conversation that occurs after routing to a skillbot, the MIS 310 can process the utterance 302 to determine whether the utterance 302 represents multiple intents. If so, the MIS 310 applies one or more rules to split the utterance 302 into separate utterances for each intent, e.g., utterance "D" 306 and utterance "E" 308. If the utterance 302 does not represent multiple intents, the MIS 310 forwards the utterance 302 to the intent classifier 320 without splitting it for intent classification.
[0094] The intent classifier 320 is configured to match a received utterance (e.g., utterance 306 or 308) to an intent associated with the skillbot system 300. As explained above, a skillbot can be configured with one or more intents, each of which includes at least one example utterance associated with the intent and used to train the classifier. In the embodiment of FIG. 2, the intent classifier 242 of the masterbot system 200 is trained to determine a confidence score for each individual skillbot and a confidence score for the system intent. Similarly, the intent classifier 320 can be trained to determine a confidence score for each intent associated with the skillbot system 300. The classification performed by the intent classifier 242 is at the bot level, whereas the classification performed by the intent classifier 320 is at the intent level and is therefore more fine-grained. The intent classifier 320 can have access to intent information 354. The intent information 354 includes, for each intent associated with the skillbot system 300, a list of utterances that represent and explain the meaning of the intent and that are typically associated with the task performed by the intent. The intent information 354 can further include parameters generated as a result of training on this list of utterances.
[0095] The conversation manager 330 receives as an output of the intent classifier 320 an indication 322 of the particular intent identified by the intent classifier 320 as the best match to the utterance input to the intent classifier 320. In some cases, the intent classifier 320 is unable to determine any match. For example, if the utterance is directed to a system intent or an intent of a different skill bot, the confidence score calculated by the intent classifier 320 may fall below a threshold confidence score value. When this occurs, the skill bot system 300 may refer the utterance to a master bot for processing, for example, for routing to a different skill bot. However, if the intent classifier 320 is successful in identifying the intent within the skill bot, the conversation manager 330 will initiate a conversation with the user.
[0096] The conversation initiated by the conversation manager 330 is specific to the intent identified by the intent classifier 320. For example, the conversation manager 330 may be implemented using a state machine configured to execute a dialog flow for the identified intent. The state machine may include a default starting state (e.g., for when the intent is invoked without additional input) and one or more additional states, each state associating an action to be performed by the skill bot (e.g., completing a purchase transaction) and / or a dialog to be presented to the user (e.g., questions, responses). Thus, the conversation manager 330 may determine an action / dialog 335 upon receiving an instruction 322 identifying an intent, and may determine additional actions or dialogs in response to subsequent utterances received during the conversation.
[0097] The data store 350 consists of one or more computing devices that store data used by various subsystems of the skillbot system 300. As shown in Figure 3, the data store 350 includes rules 352 and intent information 354. In certain embodiments, the data store 350 can be integrated into a masterbot or digital assistant data store, such as data store 250 of Figure 2.
[0098] Stopword Data Extension A chatbot may be trained to determine a user's intent based on the user's utterances. If the training data is not appropriate, the chatbot may determine the wrong intent more frequently. For example, if the training data associated with the unresolved class of intent is not appropriate, the trained chatbot may incorrectly identify a particular utterance as the positive or negative class of the intent. As an example, if the training data for the intent "Need information about membership" includes "Do you have a one-day pass so that I can know if I want to become a member", "Do you have a senior discount on membership", and "Do you have tax-free shopping qualification", the trained chatbot may incorrectly classify any user utterance that includes "do you have" as being associated with the intent "Need information about membership" with high confidence. One existing option is to remove these high frequency words or a list of words selected for a particular domain (hereinafter referred to as stop words) from the training samples. However, removing stop words from the training utterances or de-emphasizing stop words limits the ability of the machine learning model to learn the features and context associated with the intent.
[0099] To overcome this and other problems, various embodiments are directed to techniques for augmenting training data with stop words (e.g., non-stop words or phrases of non-stop words may be randomly replaced with one or more stop words or one or more phrases of stop words) to improve the accuracy of intent classification. Stop words typically refer to the most common words in a language, but there is no single universal list of stop words used by all natural language processing tools. Stop words may include a list of words for a particular domain or intent, or may include high frequency words or any user-selected words (e.g., a set of words commonly used in any language, not just English).
[0100] According to some embodiments, out-domain (OOD) training samples (e.g., sentences) are generated from training samples that are in-domain and associated with the positive class of the intent, and used as training samples associated with the unresolved class of the intent. More specifically, a stop-word expansion technique (SWAT) automatically populates OOD training samples associated with the unresolved intent with existing in-domain training samples, where existing stop-word patterns in the existing in-domain training samples are maintained, but non-stop words or phrases of non-stop words are randomly replaced with one or more stop words or one or more phrases of stop words. For example, a training sentence "do you offer a one day trial membership?" may be transformed into a training sample associated with the unresolved intent, "do you to a one say a likely." In this way, the original stop word "do you...a one..." is preserved, and the non-stop word "offer...day trial membership" is replaced with a random stop word "to...say a likely" selected from a list of words for a particular domain or intent, or includes high-frequency words or any user-selected words.
[0101] The machine learning models trained on the augmented text data may be implemented in a chatbot system as described with respect to Figures 1, 2 and 3. Advantageously, these models and chatbots achieve better accuracy using SWAT, as many utterances may contain 20-50% stop words, and machine learning models may falsely pick up these stop word patterns as described above. Adding OOD sentences generated using SWAT can prevent the machine learning model from picking up the stop word patterns. SWAT may also help define the intent boundaries. Another advantage is that a large number of utterances for unresolved intents may allow the machine learning model to perform better on OOD sentences. Retaining stop words in the utterances may help the machine learning model to distinguish between similar utterances. Thus, higher accuracy and confidence scores may be achieved. Removing or de-emphasizing stop words from the training utterances may not provide the above benefits.
[0102] FIG. 4 is a block diagram illustrating an embodiment of a chatbot system 400 configured to train and utilize a classifier (e.g., intent classifier 242 or 320 described with respect to FIGS. 2 and 3) based on text data 405. As shown in FIG. 4, the text classification performed by the chatbot system 400 in this example includes various stages: a predictive model training stage 410, a skillbot invocation stage 415 to determine the likelihood that an utterance represents a task that a particular skillbot is configured to perform, and an intent prediction stage 420 to classify the utterance as one or more intents. The predictive model training stage 410 builds and trains one or more predictive models 425a-425n (where "n" represents any natural number) used by the other stages (sometimes referred to herein individually as predictive models 425 and sometimes referred to collectively as predictive models 425). For example, predictive models 425 may include a model for determining the likelihood that an utterance represents a task that a particular skillbot is configured to perform, another model for predicting intents from utterances for a first type of skillbot, and another model for predicting intents from utterances for a second type of skillbot. Still other types of predictive models may be implemented in other examples consistent with the present disclosure.
[0103] The predictive model 425 may be a machine learning ("ML") model such as a convolutional neural network ("CNN"), e.g., an inception neural network, a residual neural network ("Resnet"), or a recurrent neural network, e.g., a long short-term memory ("LSTM") model, or a gated recurrent unit ("GRU") model, other variants of deep neural networks ("DNN") (e.g., multi-label n-binary DNN classifiers or multi-class DNN classifiers for single-intent classification). The predictive model 425 may also be any other suitable ML model trained for natural language processing, such as a naive Bayes classifier, a linear classifier, a support vector machine, a bagging model such as a random forest model, a boosting model, a shallow neural network, or a combination of one or more of such techniques - e.g., a CNN-HMM or a multi-scale convolutional neural network (MCNN). The chatbot system 400 may employ the same or different types of predictive models to predict intents from utterances for a first type of skillbot and to predict intents from utterances for a second type of skillbot to determine the likelihood of a task that a particular skillbot is configured to perform. Still other types of predictive models may be implemented in other examples according to the present disclosure.
[0104] To train the various predictive models 425, the training stage 410 is comprised of three main components: dataset preparation 430, feature engineering 435, and model training 440. The dataset preparation 430 includes the process of loading data assets 445, splitting the data assets 445 into training and validation sets 445a-n, and performing basic pre-processing so that the system can train and test the predictive models 425. The data assets 445 may include at least a subset of in-domain utterances from example utterances associated with the various skill bots. As discussed above, the utterances can be provided in a variety of ways, including audio or text. The utterances can be sentence fragments, complete sentences, multiple sentences, and the like. For example, if the utterances are provided as audio, the data preparation 430 may convert the audio to text using a speech-to-text converter (not shown) that inserts punctuation marks, such as commas, semicolons, periods, and the like, into the resulting text. In some cases, the example utterances are provided by a client or customer. In other cases, the example utterances are automatically generated from a prior library of utterances (e.g., identifying utterances from the library that are specific to the skill that the chatbot is to learn). The data assets 445 of the predictive model 425 may include input text or speech (or input features of text or speech frames) and labels 450 corresponding to the input text or speech (or input features) as a matrix or table of values. For example, for each training utterance, an indication of the correct bot to use for that training utterance may be provided as ground truth information for the label 450. The operation of the predictive model 425 may then be adapted (e.g., via backpropagation) to minimize the difference between the generated inference and the ground truth information. Alternatively, the predictive model 425 may be trained for a particular skill bot using at least a subset of the example utterances associated with that particular skill bot as training utterances. The ground truth information for the label 450 for each training utterance would be the intent of the particular bot associated with the training utterance.
[0105] In various embodiments, data preparation 430 comprises stop word expansion 455 to include replacing at least one non-stop word in the set of utterances with at least one stop word (e.g., replacing a non-stop word in the original data with a stop word) to prevent predictive model 425 from picking up stop word patterns and improve the accuracy of intent prediction. By expanding data assets 445 with stop words that replace non-stop words, predictive model 425 is better able to focus on the most important parts of examples that link them to their classes. Expansion 455 is performed using SWAT to incorporate stop words into the source text of data assets 445. SWAT generally consists of multiple operations: (i) obtaining stop word text from a list of words, a text corpus (e.g., a large and structured set of text), a publication, or an original sentence in data assets 445; and (ii) incorporating the stop word text in data assets 445 to the original sentence at a predefined expansion rate or ratio (i.e., the rate at which existing utterances in the original sentence in data assets 445 are converted to expanded utterances). For example, the stop words in each existing training sample may be preserved, but the non-stop word(s) or non-stop word pattern(s) in the existing training sample (e.g., phrases containing only non-stop words) may be replaced with one or more random stop words or stop word patterns at an expansion ratio of 1:0.05 to 1:1, e.g., 1:0.1 or 1:0.5 between the existing utterance and the expanded utterance. The expansion rate may be varied to generate a desired number of expanded samples.
[0106] In some embodiments, SWAT uses existing training samples associated with a positive or negative class for an intent to generate training samples associated with the unresolved intent. More specifically, stop words in each existing training sample associated with a positive or negative class for an intent are preserved, but each non-stop word or non-stop word pattern in the existing training sample is replaced with one or more random stop words or stop word patterns. For example, a training sentence that includes "do you ..." may be converted into an augmented training sentence.
[0107] -do you not what will be on with the empty after ours -do you've been in front -Do you think one person would say -do you 'll a thereupon to anyway a she from the made -do you have a yet always so we can see if we would like a nothing -do you have a ye n't against on off -do you have a few whoever thereupon for me etc. The new augmented training sentences thus generated may be used as training data associated with the unresolved class of intent. The stop words may include a set of words selected for a particular domain, some high frequency words, some "non-content" or "nonsense" words, or words selected by the user, etc. The expansion rate (e.g., the percentage at which existing utterances are transformed) may be varied to generate a desired number of augmented samples.
[0108] In some embodiments, the additional training sample associated with the unresolved intent is generated by searching for the longest consecutive stop words at the beginning of the existing utterance. For example, from the utterance "How do I get the refund?", the beginning pattern "how do i" may be extracted and used as at least a part of the training sample associated with the unresolved intent. In other embodiments, the additional training sample associated with the unresolved intent may be generated by searching for at most n consecutive stop words (called n-gram patterns) anywhere in the existing utterance. For example, in the utterance "How do I get the refund?", n=5 n-gram patterns may include "how", "do", "i", "how do", "do i", "how do i", and "the". The n-gram patterns may be used as at least a part of the training sample associated with the unresolved intent.
[0109] With the introduction of SWAT, the prediction model 425 performs better on utterances with common stop word patterns and on normal utterances (without many stop words) because the prediction model 425 can now focus more on the important parts of the utterance. Furthermore, because SWAT is applied automatically in a synthesis-agnostic manner, the customer or client does not need to worry about adding stop words to the training data. As shown in Table 1, for the intent associated with the UM Flower skill, the stop word patterns were mislearned. However, when SWAT automatically populated the OOD training samples associated with the unresolved intent with the stop word utterances generated from the existing in-domain training samples, the expected confidence score was achieved by the prediction model 425.
[0110] [Table 1-1]
[0111] [Table 1-2]
[0112] In some cases, additional augmentations may be applied to the data assets 445 (with stop word augmentation). For example, Easy Data Augmentation (EDA) techniques may be used to enhance the performance of text classification tasks. EDA includes four operations: synonym replacement, ransomed insertion, random swap, and random deletion, which prevent overfitting and help train more robust models. In contrast to stop word augmentation, EDA generally operates as follows: (i) take words from the source text; and (ii) incorporate words within each data asset 445 for the source text. For example, a synonym replacement operation includes randomly selecting n words from the source text (e.g., an utterance) that are not stop words and replacing each of these words with one of its randomly selected synonyms. A random insertion operation includes finding random synonyms for random words in the source text that are not stop words -n times- and inserting the synonyms into random positions in the sentence. The random swap operation involves randomly selecting two words in the sentence and swapping their positions -n times. The random delete operation involves randomly deleting each word in the sentence with probability p.
[0113] In various embodiments, feature engineering 435 includes converting data assets 445 (with stop word extension) into feature vectors and / or creating new features using data assets 445 (with stop word extension). Feature vectors may include count vectors as features, term frequency-inverse document frequency (TF-IDF) vectors as features such as word level, n-gram level or character level, word embeddings as features, text / NLP as features, topic models as features, or combinations thereof. Count vectors are a matrix representation of data assets 445, where each row represents an utterance, each column represents a term in the utterance, and each cell represents a frequency count of a particular term in the utterance. TF-IDF scores represent the relative importance of a term in the utterance. Word embeddings are a form of dense vector representation of words and utterances. The location of a word in the vector space is learned from the text and is based on the words surrounding the word when it is used. Text / NLP based features may include number of words in an utterance, number of characters in an utterance, average word density, number of punctuation marks, number of capital letters, number of title words, frequency distribution of part of speech tags (such as nouns and verbs), or combinations thereof.Topic modeling is the technique of identifying, from a collection of utterances, groups of words (called topics) that contain the most information in the collection.
[0114] In various embodiments, model training 440 includes training a classifier using the feature vector and / or new features created in feature engineering 435. In some cases, the training process includes iterative operations to find a set of parameters for the predictive model 425 that minimizes a loss or error function of the predictive model 425. Each iteration may include finding a set of parameters for the predictive model 425 such that the value of the loss or error function using the set of parameters is less than the value of the loss or error function using another set of parameters in a previous iteration. The loss or error function may be constructed to measure the difference between the output predicted using the predictive model 425 and the labels 450 included in the data assets 445. Once a set of parameters is identified, the predictive model 425 is trained and can be utilized for prediction as designed.
[0115] In addition to the data assets 445, labels 450, feature vectors, and / or new features, other techniques and information can be employed to refine the training process of the predictive model 425. For example, feature vectors and / or new features can be combined to help improve the accuracy of the classifier or model. Additionally or alternatively, hyperparameters can be adjusted or optimized, e.g., a number of parameters such as tree length, leaves, network parameters, etc., can be fine-tuned to obtain the best fitting model. Although the training mechanisms described herein are primarily focused on training the predictive model 425, these training mechanisms can also be utilized to fine-tune an existing predictive model 425 trained from other data assets. For example, in some cases, the predictive model 425 may have been pre-trained using utterances specific to another skill bot. In such cases, the predictive model 425 can be retrained using the data assets 445 (with stop-word expansion) as discussed herein.
[0116] The predictive model training stage 410 outputs trained predictive models 425, including a task prediction model 460 and an intent prediction model 465. The task prediction model 460 may be used in the skillbot invocation stage 415 to determine the likelihood that an utterance represents a task that a particular skillbot is configured to perform (470), and the intent prediction model 465 may be used in the intent prediction stage 420 to classify the utterance as one or more intents 475. In some cases, the skillbot invocation stage 415 and the intent prediction stage 420 may proceed independently, in some cases with separate models. For example, the trained intent prediction model 465 may be used in the intent prediction stage 420 to predict an intent for a skillbot without first identifying a skillbot in the skillbot invocation stage 415. Similarly, the task prediction model 460 may be used in the skillbot invocation stage 415 to predict a task or skillbot to be used for an utterance, without identifying the intent of the utterance in the intent prediction stage 420.
[0117] Alternatively, the skillbot invocation stage 415 and the intent prediction stage 420 may be performed sequentially, with one stage using the output of the other as input, or one stage being invoked in a specific way for a particular skillbot based on the output of the other. For example, for a given text data 405, a skillbot invoker can invoke a skillbot by implicit invocation with the skillbot invocation stage 415 and the task prediction model 460. The task prediction model 460 can be trained using machine learning and / or rule-based training techniques to determine the likelihood that an utterance represents a task that a particular skillbot 470 is configured to perform. Then, for an identified or invoked skillbot and a given text data 405, the intent prediction stage 420 and the intent prediction model 465 can be used to match a received utterance (e.g., an utterance in a given data asset 445) to an intent 475 associated with the skillbot. As described herein, a skillbot can be configured with one or more intents, each of which includes at least one example utterance associated with the intent and used to train a classifier. In some embodiments, the skillbot invocation stage 415 and the task prediction model 460 used in the masterbot system are trained to determine confidence scores for individual skillbots and confidence scores for system intents. Similarly, the intent prediction stage 420 and the intent prediction model 465 can be trained to determine confidence scores for each intent associated with the skillbot system. The classification performed by the skillbot invocation stage 415 and the task prediction model 460 is at the bot level, whereas the classification performed by the intent prediction stage 420 and the intent prediction model 465 is at the intent level and is therefore more fine-grained.
[0118] Techniques for stop word data augmentation and speech classification FIG. 5 is a flow chart illustrating a process 500 for augmenting a training dataset with stop words, according to certain embodiments. The process illustrated in FIG. 5 may be implemented in software (e.g., code, instructions, programs) executed by one or more processing units (e.g., processors, cores) of a respective system, hardware, or combination thereof. The software may be stored in a non-transitory storage medium (e.g., memory device). The method illustrated in FIG. 5 and described below is intended to be exemplary and non-limiting. Although FIG. 5 depicts various processing steps occurring in a particular sequence or order, this is not intended to be limiting. In certain alternative embodiments, the steps may be performed in some different order, or some steps may be performed in parallel. In certain embodiments, such as those illustrated in FIGS. 1-4, the process illustrated in FIG. 5 may be performed by a pre-processing subsystem (e.g., pre-processing subsystem 210 or predictive model training stage 410) to generate a stop-word augmented dataset for training by one or more predictive models (e.g., intent classifier 242 or 320 or predictive model 425).
[0119] At 505, a training set of utterances is received. The training set of utterances consists of in-domain utterances and is received to train an intent classifier to identify one or more intents from one or more utterances. An in-domain utterance is an utterance related to one or more intents to be identified by the classifier. For example, an in-domain utterance for a pizza ordering intent of a restaurant ordering skill may be "I would like to order a pizza." The training set of utterances is received by a data processing system, (e.g., the chatbot system 400 described with respect to FIG. 4), and an intent classifier, such as the predictive model 425, is implemented in one or more computing systems, such as a chatbot system, as described with respect to FIGS. 1, 2, and 3.
[0120] At 510, the training set of utterances is augmented by the data processing system with stop words to generate an augmented training set of out-domain utterances for the unresolved intent category corresponding to the unresolved intent. In various embodiments, the augmenting includes (i) selecting one or more utterances from the training set of utterances, and (ii) for each selected utterance, preserving existing stop words and / or stop word phrases in the utterance and replacing at least one non-stop word in the utterance with a stop word or stop word phrase (two or more stop words combined to create a phrase) selected from the list of stop words to generate an out-domain utterance. An out-domain utterance is an utterance that is unrelated to the one or more intents to be identified by the classifier. For example, an out-domain utterance for the same pizza ordering intent of a restaurant ordering skill might be "What's the weather like today?" Although the classifier can distinguish cases where a user's utterance or message is so different from the training set of utterances that it cannot easily classify it, the classifier still needs to be trained to classify such utterances into unresolved intents. Unresolved intents are defined as utterances that include out-domain utterances that should not be resolved by the classifier to any of the skill's intents.
[0121] In some cases, for each selected utterance, existing stop words in the utterance are preserved and all non-stop words in the utterance are replaced with a stop word or stop word phrase selected from the list of stop words. In other cases, the at least one non-stop word is one, two, three, four, or five of the non-stop words in the utterance. In other cases, for each selected utterance, existing stop words in the utterance are preserved and at least one of the non-stop words in the utterance is randomly replaced with a stop word or stop word phrase selected from the list of stop words. The list of stop words may be generated from a list of common words, a text corpus, a publication, source text from a training set of utterances, or any combination thereof.
[0122] It should be understood that one or more utterances from the training set of examples are saved to maintain a training set of utterances for training the intent classifier to identify one or more intents from the one or more utterances while building an additional "expanded" training set of out-domain utterances for unresolved intent categories corresponding to the unresolved intents. Further, one or more utterances are selected and processed (i.e., preserving stop words and / or replacing non-stop words) to generate an expanded training set of out-domain utterances based on a predefined expansion ratio. This may include (i) iteratively selecting one or more utterances from the training set of utterances and processing each utterance once to generate a corresponding single out-domain utterance based on a predefined expansion ratio, (ii) selecting one or more utterances from the training set of utterances and processing the one or more utterances multiple times to generate multiple out-domain utterances from each utterance based on a predefined expansion ratio, or (iii) any combination thereof. The predefined expansion ratio is 1:0.05 to 1:1 (original utterance:expanded utterance).
[0123] In some embodiments, selecting an utterance includes repeatedly or randomly selecting an utterance from a training set of utterances. In some embodiments, selecting an utterance includes searching for consecutive stop words (i.e., two or more stop words combined in succession) at the beginning of the utterance in the training set of utterances and selecting an utterance with the longest consecutive stop words at the beginning of the utterance in the training set of utterances. In some embodiments, selecting an utterance includes searching for n consecutive stop words anywhere in the utterance in the training set of utterances and selecting an utterance with n consecutive stop words anywhere in the utterance. In addition to or instead of replacing at least one non-stop word in the utterance with a stop word or stop word phrase selected from the list of stop words, the longest consecutive stop word at the beginning of the utterance and / or the n consecutive stop words anywhere in the utterance may be extracted and used as the out-domain utterance itself.
[0124] At 515, the predictive model is trained using the expanded training set of utterances to determine the likelihood that the utterance represents a task that the skillbot is configured to perform or to match the utterance to an intent associated with the skillbot. The trained predictive model may then be deployed in the chatbot system (e.g., as part of the skillbot) at 520 to determine the likelihood that the utterance represents a task that the skillbot is configured to perform or to match the utterance to an intent associated with the skillbot. For example, an utterance may be received and analyzed to determine whether the utterance includes a call name for the skillbot. If a call name is not found, the utterance is deemed to be an implicit call and processing proceeds with an intent classifier, such as a trained model. If a call name is determined to be present, the utterance is deemed to be an explicit call and the process proceeds to determine which portion of the utterance is associated with the call name.
[0125] In cases where a trained model is invoked, the entire received utterance is provided as input to the intent classifier. The intent classifier that receives the utterance may be the intent classifier of the master bot (e.g., intent classifier 242 of FIG. 2). The intent classifier may be a machine learning-based or rule-based classifier trained with stop-word augmentation data to determine whether the intent of the utterance matches a system intent (e.g., exit, help) or a specific skill bot. As described herein, the intent analysis performed by the master bot may be limited to matching a specific skill bot without determining which intent in the specific skill bot best matches the utterance. Thus, the intent classifier that receives the utterance may identify a specific skill bot to be invoked. Alternatively, if the utterance represents a specific system intent (e.g., the utterance includes the words "exit" or "help"), the intent classifier that receives the utterance may identify a specific system intent and trigger a conversation between the master bot and the user based on the dialog flow configured for this specific system intent.
[0126] In cases where an invocation name is present, one or more explicit invocation rules are applied to determine which portions of the utterance are associated with the invocation name. This determination may be based on an analysis of the sentence structure of the utterance using part-of-speech tags, dependency information, and / or other extracted information received with the utterance. For example, the portion associated with the invocation name may be a noun phrase that includes the invocation name, or a prepositional object that corresponds to the invocation name. The portion associated with the invocation name determined based on the processing is removed. Other portions of the utterance that are not necessary to convey the meaning of the utterance (e.g., prepositional words) may also be removed. The removal of the particular portion of the utterance generates an input for the skillbot associated with the invocation name. If a portion of the received utterance remains after the removal, the remaining portion forms a new utterance for input to the skillbot, e.g., as a text string. Otherwise, if the received utterance is completely removed, the input may be an empty string.
[0127] The skill bot associated with the invocation name is then invoked and the skill bot is provided with the generated input. Upon receiving the generated input, the invoked skill bot performs intent analysis to process the input, e.g., using the skill bot's intent classifier trained with stop word augmentation data, to identify a bot intent that matches the user intent expressed in the input. Identifying a matching bot intent allows the skill bot to perform a specific action or start a conversation with the user according to a dialog flow associated with the matching bot intent. For example, if the input is an empty string, the conversation may start in a default state (e.g., a welcome message) defined in the dialog flow. Alternatively, if the input is not an empty string, the conversation may start in some intermediate state, e.g., because the input contains values of entities or other information that the skill bot no longer needs to ask the user because it was received as part of the input. As another example, the skill bot may determine that it cannot process the input (e.g., because the confidence scores of all bot intents configured for the skill bot are below a certain threshold). In this situation, the skillbot may return the input to the masterbot for processing (e.g., intent analysis using the masterbot's intent classifier) or the skillbot may prompt the user for an explanation.
[0128] In various embodiments, deploying and using an intent classifier in a chatbot system includes: the chatbot system receiving utterances generated by a user interacting with the chatbot system; classifying the utterance into a resolved intent category corresponding to a resolved intent or an unresolved intent category corresponding to an unresolved intent using the intent classifier deployed in the chatbot system; and outputting the resolved intent or the unresolved intent using the intent classifier based on the classification. The intent classifier includes a plurality of model parameters identified using training data, the training data including a training set of utterances for training the intent classifier to identify one or more resolved intents for one or more utterances, and an expanded training set of out-domain utterances for training the intent classifier to identify one or more unresolved intents for the one or more utterances, the expanded training set of out-domain utterances being artificially generated to include speech from the training set of utterances where existing stop word patterns in the utterances are preserved and at least one non-stop word in each of the utterances is randomly replaced with a stop word. A number of model parameters are identified using the training data based on minimizing a loss function.
[0129] Explanatory Systems 6 is a simplified diagram illustrating a distributed system 600. In the illustrated example, the distributed system 600 includes one or more client computing devices 602, 604, 606, and 608 coupled to a server 612 via one or more communication networks 610. The client computing devices 602, 604, 606, and 608 may be configured to execute one or more applications.
[0130] In various examples, the server 612 may be adapted to execute one or more services or software applications that enable one or more embodiments described in this disclosure. In certain examples, the server 612 may provide other services or software applications, which may include non-virtual and virtual environments. In some examples, these services may be provided as web-based or cloud services, such as under a Software as a Service (SaaS) model, to users of the client computing devices 602, 604, 606, and / or 608. Thus, users operating the client computing devices 602, 604, 606, and / or 608 may utilize one or more client applications that interact with the server 612 to utilize the services provided by these components.
[0131] In the configuration shown in Figure 6, server 612 may include one or more components 618, 620, and 622 that implement the functions performed by server 612. These components may include software components that may be executed by one or more processors, hardware components, or combinations thereof. It should be understood that a variety of different system configurations are possible that may differ from distributed system 600. Thus, the example shown in Figure 6 is one example of a distributed system for implementing the example system and is not intended to be limiting.
[0132] A user may use client computing devices 602, 604, 606 and / or 608 to execute one or more applications, models or chatbots, which may then generate one or more events or models that may be implemented or serviced according to the teachings of this disclosure. The client devices may provide an interface that allows a user of the client device to interact with the client device. The client devices may also output information to the user via this interface. Although FIG. 6 depicts only four client computing devices, any number of client computing devices may be supported.
[0133] Client devices may include various types of computing systems, such as portable handheld devices, general purpose computers such as personal computers and laptops, workstation computers, wearable devices, gaming systems, thin clients, various messaging devices, and sensors or other sensing devices. These computing devices may run various types and versions of software applications and operating systems (e.g., Microsoft Windows, Apple Macintosh, UNIX or UNIX-like operating systems, Linux or Linux-like operating systems such as Google Chrome OS, etc.), including various mobile operating systems (e.g., Microsoft Windows Mobile, iOS, Windows Phone, Android, BlackBerry, Palm OS, etc.). Portable handheld devices may include mobile phones, smartphones (e.g., iPhone), tablets (e.g., iPad), personal digital assistants (PDAs), etc. Wearable devices may include Google Glass head-mounted displays and other devices. The gaming systems may include various portable gaming devices, Internet-enabled gaming devices (e.g., Microsoft Xbox® gaming consoles with or without Kinect® gesture input devices, Sony PlayStation® systems, and various gaming systems offered by Nintendo®, etc.) The client devices may be capable of running a variety of different applications, such as various Internet-related apps, communication applications (e.g., email applications, short message service (SMS) applications), etc., and may use a variety of communication protocols.
[0134] The network(s) 610 may be any type of network familiar to those skilled in the art that may support data communications using any of a variety of available protocols, including, but not limited to, TCP / IP (Transmission Control Protocol / Internet Protocol), SNA (Systems Network Architecture), IPX (Internet Packet Exchange), AppleTalk, etc. By way of example only, the network(s) 610 may be a local area network (LAN), an Ethernet, a token ring based network, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., a network operating under any of the IEEE (Institute of Electrical and Electronics) 1002.11 suite of protocols, Bluetooth, and / or other wireless protocols), and / or combinations of these and / or other networks.
[0135] The servers 612 may be comprised of one or more general purpose computers, dedicated server computers (including, by way of example, PC (personal computer) servers, UNIX servers, mid-range servers, mainframe computers, rack-mounted servers, etc.), server farms, server clusters, or any other suitable arrangement and / or combination. The servers 612 may include one or more virtual machines running a virtual operating system, or other computing architectures involving virtualization, such as one or more flexible pools of logical storage devices that may be virtualized to maintain virtual storage devices for the servers. In various examples, the servers 612 may be adapted to run one or more services or software applications that provide the functionality described in the foregoing disclosure.
[0136] The computing system of server 612 may run one or more operating systems, including any of those discussed above, as well as any commercially available server operating system. Server 612 may also run any of a variety of additional server applications and / or mid-tier applications, including a hypertext transport protocol (HTTP) server, a file transfer protocol (FTP) server, a common gateway interface (CGI) server, a JAVA server, and a database server. Exemplary database servers include, but are not limited to, those commercially available from Oracle, Microsoft, Sybase, and IBM.
[0137] In some implementations, the server 612 may include one or more applications for analyzing and consolidating data feeds and / or event updates received from users of the client computing devices 602, 604, 606, and 608. By way of example, the data feeds and / or event updates may include, but are not limited to, Twitter® feeds, Facebook® updates, or real-time updates and continuous data streams received from one or more third-party information sources, which may include real-time events associated with sensor data applications, financial tickers, network performance measurement tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, automotive traffic monitoring, and the like. The server 612 may also include one or more applications for displaying the data feeds and / or real-time events via one or more display devices of the client computing devices 602, 604, 606, and 608.
[0138] The distributed system 600 may also include one or more data repositories 614, 616. These data repositories may be used to store data and other information in certain examples. For example, one or more of the data repositories 614, 616 may be used to store information, such as information about chatbot performance or generated models, for use by the chatbot used by the server 612 in performing various functions according to various embodiments. The data repositories 614, 616 may reside in various locations. For example, the data repository used by the server 612 may be local to the server 612 or may be remote from the server 612 and in communication with the server 612 via a network-based or dedicated connection. The data repositories 614, 616 may be of different types. In certain examples, the data repository used by the server 612 may be a database, e.g., a relational database such as databases provided by Oracle Corporation and other vendors. One or more of these databases may be adapted to enable data to be stored, updated, and retrieved from the database in response to SQ formatted commands.
[0139] In particular examples, one or more of the data repositories 614, 616 may be used by an application to store application data. The data repositories used by the application may be of different types, such as, for example, a key-value store repository, an object store repository, or a general storage repository supported by a file system.
[0140] In certain examples, the functionality described in this disclosure may be provided as a service via a cloud environment. FIG. 7 is a simplified block diagram of a cloud-based system environment in which various services may be provided as cloud services according to certain examples. In the example shown in FIG. 7, a cloud infrastructure system 702 may provide one or more cloud services that may be requested by a user using one or more client computing devices 704, 706, and 708. The cloud infrastructure system 702 may be comprised of one or more computers and / or servers, which may include those described above for server 612. The computers of the cloud infrastructure system 702 may be organized as general purpose computers, specialized server computers, server farms, server clusters, or any other suitable arrangement and / or combination.
[0141] The network(s) 710 may facilitate communication and exchange of data between the clients 704, 706, and 708 and the cloud infrastructure system 702. The network(s) 710 may include one or more networks. The networks may be of the same type or different types. The network(s) 710 may support one or more communication protocols, including wired and / or wireless protocols, to facilitate communication.
[0142] The example shown in Figure 7 is merely one example of a cloud infrastructure system and is not intended to be limiting. It should be understood that in some other examples, cloud infrastructure system 702 may have more or fewer components than those shown in Figure 7, may combine two or more components, or may have a different configuration or arrangement of components. For example, while Figure 7 depicts three client computing devices, in alternative examples any number of client computing devices may be supported.
[0143] Typically, the term cloud services is used to refer to services made available to users on demand over a communications network, such as the Internet, by a service provider's system (e.g., cloud infrastructure system 702). Generally, in a public cloud environment, the servers and systems that make up the cloud service provider's system are different from the customer's own on-premise servers and systems. The cloud service provider's systems are managed by the cloud service provider. As such, customers can utilize the cloud services provided by the cloud service provider without having to separately purchase licenses, support, or hardware and software resources for the services. For example, the cloud service provider's system may host applications, and users can order and use the applications on demand over the Internet without having to purchase infrastructure resources to run the applications. Cloud services are designed to provide easy and scalable access to applications, resources, and services. Several providers offer cloud services. For example, some cloud services offered by Oracle Corporation of Redwood Shores, California include middleware services, database services, and Java cloud services.
[0144] In particular examples, cloud infrastructure system 702 may provide one or more cloud services using different models, such as a Software as a Service (SaaS) model, a Platform as a Service (PaaS) model, and an Infrastructure as a Service (IaaS) model, including a hybrid service model. Cloud infrastructure system 702 may include a suite of applications, middleware, databases, and other resources that enable the delivery of various cloud services.
[0145] The SaaS model allows applications or software to be provided to customers as a service over a communications network such as the Internet without the customer having to purchase hardware or software for the underlying application. For example, the SaaS model may be used to provide customers with access to on-demand applications hosted by the cloud infrastructure system 702. Examples of SaaS services offered by Oracle Corporation include, but are not limited to, various services such as human resource / capital management, customer relationship management (CRM), enterprise resource planning (ERP), supply chain management (SCM), enterprise performance management (EPM), analytical services, and social applications.
[0146] The IaaS model is commonly used to provide infrastructure resources (such as servers, storage, hardware and networking resources) as cloud services to customers to provide flexible compute and storage capabilities. A variety of IaaS services are offered by Oracle Corporation.
[0147] The PaaS model is generally used to provide platform and environment resources for customers to develop, run, and manage applications and services as a service, without the customer having to procure, build, or maintain such resources. Examples of PaaS services provided by Oracle Corporation include, but are not limited to, JCS (Oracle Java Cloud Service), DBCS (Oracle Database Cloud Service), data management cloud services, and various application development solution services.
[0148] Cloud services are generally provided on an on-demand self-service basis, on a subscription basis, in a flexible scalable, reliable, available, and highly secure manner. For example, a customer may order one or more services provided by cloud infrastructure system 702 via a subscription order. Cloud infrastructure system 702 then executes processing to provide the services requested in the customer's subscription order. For example, a user may use utterances to request the cloud infrastructure system to take a particular action (e.g., intent), as described above, and / or provide services for a chatbot system, as described herein. Cloud infrastructure system 702 may be configured to provide one or even more cloud services.
[0149] Cloud infrastructure system 702 may provide cloud services through different deployment models. In a public cloud model, cloud infrastructure system 702 may be owned by a third-party cloud service provider and cloud services may be provided to any public customer, which may be an individual or a business. In certain other examples, under a private cloud model, cloud infrastructure system 702 may be operated within an organization (e.g., within a corporate organization) and services may be provided to customers within the organization. For example, the customers may be various departments of a business, such as a human resources department, a payroll department, or even individuals within a business. In certain other examples, under a community cloud model, cloud infrastructure system 702 and the services provided may be shared by multiple organizations within an associated community. Various other models may also be used, such as hybrids of the above-mentioned models.
[0150] Client computing devices 704, 706, and 708 may be of different types (such as client computing devices 602, 604, 606, and 608 shown in FIG. 6) and may be capable of operating one or more client applications. A user may use a client device to interact with cloud infrastructure system 702, such as to request services provided by cloud infrastructure system 702. For example, a user may use a client device to request information or an action from a chatbot, as described in this disclosure.
[0151] In some examples, the processing performed by cloud infrastructure system 702 to provide services may include training and deployment of models. This analysis may include using, analyzing, and manipulating data sets to train and deploy one or more models. This analysis may be performed by one or more processors, and in some cases may be performed by processing the data in parallel, running simulations using the data, etc. For example, big data analysis may be performed by cloud infrastructure system 702 to generate and train one or more models for a chatbot system. The data used in this analysis may include structured data (e.g., data stored in a database or structured according to a structured model) and / or unstructured data (e.g., data blobs (binary large objects)).
[0152] 7, cloud infrastructure system 702 may include infrastructure resources 730 utilized to facilitate the provision of various cloud services provided by cloud infrastructure system 702. Infrastructure resources 730 may include, for example, processing resources, storage or memory resources, and networking resources. In particular examples, storage virtual machines available to service storage requested by applications may be part of cloud infrastructure system 702. In other examples, storage virtual machines may be part of a different system.
[0153] In certain examples, resources may be organized into sets of resources or resource modules (also referred to as "pods") to facilitate efficient provisioning of these resources to support various cloud services offered by cloud infrastructure system 702 for different customers. Each resource module or pod may be composed of a pre-integrated and optimized combination of one or more types of resources. In certain examples, different pods may be pre-provisioned for different types of cloud services. For example, a first set of pods may be provisioned for database services, a second set of pods, which may include a different combination of resources than the pods in the first set of pods, may be provisioned for Java services, etc. Depending on the services, resources allocated to provision the services may be shared between the services.
[0154] Cloud infrastructure system 702 may itself use services 732 internally that are shared by different components of cloud infrastructure system 702 and that facilitate provisioning of services by cloud infrastructure system 702. These internal shared services may include, but are not limited to, security and identity services, integration services, enterprise repository services, enterprise manager services, virus scanning and whitelist services, high availability, backup and recovery services, services to enable cloud support, email services, notification services, file transfer services, and the like.
[0155] Cloud infrastructure system 702 may be comprised of multiple subsystems. These subsystems may be implemented in software, or hardware, or a combination thereof. As shown in FIG. 7, the subsystems may include a user interface subsystem 712 that allows a user or customer of cloud infrastructure system 702 to interact with cloud infrastructure system 702. User interface subsystem 712 may include a variety of different interfaces, such as a web interface 714, an online store interface 716 where cloud services offered by cloud infrastructure system 702 are advertised and available for purchase by consumers, and other interfaces 718. For example, a customer may use a client device to request (service request 734) one or more services offered by cloud infrastructure system 702 using one or more of interfaces 714, 716, and 718. For example, a customer may access an online store, browse cloud services offered by cloud infrastructure system 702, and place a subscription order for one or more services offered by cloud infrastructure system 702 to which the customer wishes to subscribe. The service request may include information identifying the customer and one or more services to which the customer wishes to subscribe. For example, a customer may place a pre-order for services provided by cloud infrastructure system 702. As part of the order, the customer may provide information identifying the chatbot system for which the services will be provided, and optionally one or more credentials for the chatbot system.
[0156] 7, cloud infrastructure system 702 may include an order management subsystem (OMS) 720 configured to process new orders. As part of this processing, OMS 720 may be configured to create an account for the customer if not already done so, receive billing and / or accounting information from the customer that is used to bill the customer for purposes of providing the customer with the requested services, verify the customer information, and upon verification, book the order for the customer, and coordinate various workflows for provisioning the order.
[0157] Upon proper validation, OMS 720 may then invoke an order provisioning subsystem (OPS) 724 configured to provision resources for the order, including processing, memory, and networking resources. Provisioning may include allocating resources for the order and configuring the resources to facilitate the services requested by the customer's order. The manner in which resources are provisioned for the order and the types of resources provisioned may depend on the type of cloud service ordered by the customer. For example, following a workflow, OPS 724 may be configured to determine the specific cloud service being requested and identify the number of pods that may be pre-configured for that specific cloud service. The number of pods allocated for the order may depend on the size / amount / level / scope of the requested service. For example, the number of pods allocated may be determined based on the number of users supported by the service, the duration for which the service is requested, etc. The allocated pods may then be customized for the specific requesting customer to provide the requested service.
[0158] In certain examples, the setup phase processing as described above may be performed by cloud infrastructure system 702 as part of a provisioning process. Cloud infrastructure system 702 may generate an application ID and select a storage virtual machine for the application from among the storage virtual machines provided by cloud infrastructure system 702 itself or from among the storage virtual machines provided by other systems other than cloud infrastructure system 702.
[0159] Cloud infrastructure system 702 may send a response or notification 744 to the requesting customer to indicate when the requested service is available for use. In some cases, information (e.g., a link) may be sent to the customer that enables the customer to begin using and taking advantage of the requested service. In certain examples, for the customer requesting the service, the response may include a chatbot system identity generated by cloud infrastructure system 702 and information identifying the chatbot system selected by cloud infrastructure system 702 for the chatbot system corresponding to the chatbot system identity.
[0160] Cloud infrastructure system 702 may provide services to multiple customers. For each customer, cloud infrastructure system 702 is responsible for managing information related to one or more subscription orders received from the customer, maintaining customer data related to the orders, and providing the requested services to the customer. Cloud infrastructure system 702 may collect usage statistics regarding the customer's use of the subscription services. For example, statistics may be collected about the amount of storage used, the amount of data transferred, the number of users, and the amount of system uptime and system downtime, etc. This usage information may be used to bill the customer. Billing may occur on a monthly cycle, for example.
[0161] Cloud infrastructure system 702 may provide services to multiple customers in parallel. Cloud infrastructure system 702 may store information (possibly including proprietary information) for these customers. In a particular example, cloud infrastructure system 702 includes an identity management subsystem (IMS) 728 configured to manage customer information and provide isolation of the managed information such that information related to one customer is not accessed by other customers. IMS 728 may be configured to provide various security-related services such as identity services such as information access management, authentication and authorization services, services for managing customer identities and roles and related functions.
[0162] FIG. 8 is a diagram illustrating an example of a computer system 800. In some examples, the computer system 800 may be used to implement either a digital assistant or chatbot system in a distributed environment, as well as the various servers and computer systems described above. As shown in FIG. 8, the computer system 800 includes various subsystems, including a processing subsystem 804 that communicates with a number of other subsystems via a bus subsystem 802. These other subsystems may include a processing acceleration unit 806, an input / output subsystem 808, a storage subsystem 818, and a communication subsystem 824. The storage subsystem 818 may include non-transitory computer readable storage media, including a storage medium 822 and a system memory 810.
[0163] Bus subsystem 802 provides a mechanism for allowing the various components and subsystems of computer system 800 to communicate with one another as intended. Although bus subsystem 802 is shown diagrammatically as a single bus, alternative examples of the bus subsystem may utilize multiple buses. Bus subsystem 802 may be any of several types of bus structures including a memory bus or memory controller, a peripheral bus, and a local bus using any of a variety of bus architectures. For example, such architectures may include an Industry Standard Architecture (ISA) bus, a MicroChannel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus, which may be implemented as a mezzanine bus manufactured to the IEEE P1386.1 standard.
[0164] The processing subsystem 804 controls the operation of the computer system 800 and may be comprised of one or more processors, application specific integrated circuits (ASICs), or field programmable gate arrays (FPGAs). The processors may include single-core processors or multi-core processors. The processing resources of the computer system 800 may be organized into one or more processing units 832, 834, etc. The processing units may include one or more processors, one or more cores from the same or different processors, combinations of cores and processors, or other combinations of cores and processors. In some examples, the processing subsystem 804 may include one or more special purpose co-processors, such as a graphics processor or a digital signal processor (DSP). In some examples, some or all of the processing units of the processing subsystem 804 may be implemented using customized circuitry, such as application specific integrated circuits (ASICs), or field programmable gate arrays (FPGAs).
[0165] In some examples, the processing units of the processing subsystem 804 may execute instructions stored in the system memory 810 or the computer readable storage medium 822. In various examples, the processing units may execute various program or code instructions and may maintain multiple simultaneously executing programs or processes. At any given time, some or all of the program code being executed may reside on the system memory 810 and / or the computer readable storage medium 822 potentially contained on one or more storage devices. Through appropriate programming, the processing subsystem 804 may provide various functions as described above. In instances where the computer system 800 is running one or more virtual machines, one or more processing units may be assigned to each virtual machine.
[0166] In certain examples, a processing acceleration unit 806 may be optionally provided to perform customized processing to accelerate the overall processing performed by the computer system 800 or to offload some of the processing performed by the processing subsystem 804.
[0167] Input / output subsystem 808 may include devices and mechanisms for inputting information into computer system 800 and / or outputting information from or through computer system 800. In general, use of the term input device is intended to include all possible types of apparatus and mechanisms for inputting information into computer system 800. User interface input devices may include, for example, keyboards, pointing devices such as mice or trackballs, touchpads or touchscreens integrated into displays, scroll wheels, click wheels, dials, buttons, switches, keypads, voice input devices with voice command recognition systems, microphones, and other types of input devices. User interface input devices may also include motion sensing and / or gesture recognition devices such as Microsoft Kinect® motion sensors, Microsoft Xbot® 360 game controllers, devices that provide an interface for receiving input using gestures and voice commands that allow a user to control and interact with the input device. The user interface input devices may also include eye gesture recognition devices, such as a Google Glass blink detector, that detects a user's eye movements (e.g., "blinking" when taking a picture and / or selecting a menu) and translates the eye gestures as input to the input device (e.g., Google Glass). Additionally, the user interface input devices may include a voice recognition sensing device that allows a user to interact with a voice recognition system (e.g., the Siri navigator) via voice commands.
[0168] Other examples of user interface input devices include, but are not limited to, three-dimensional (3D) mice, joysticks or pointing sticks, game pads and graphic tablets, as well as audio / visual devices such as speakers, digital cameras, digital camcorders, portable media players, webcams, image scanners, fingerprint scanners, barcode readers 3D scanners, 3D printers, laser range finders, and gaze tracking devices. Additionally, user interface input devices may include medical imaging input devices, such as, for example, computed tomography, magnetic resonance imaging, position emission tomography, and medical ultrasound. User interface input devices may also include audio input devices, such as, for example, MIDI keyboards, and digital musical instruments.
[0169] In general, use of the term output device is intended to include all possible types of devices and mechanisms for outputting information from computer system 800 to a user or to another computer. User interface output devices may include non-visual displays such as a display subsystem, indicator lights, or audio output devices. Display subsystems may be flat panel devices such as those using cathode ray tubes (CRTs), liquid crystal displays (LCDs) or plasma displays, projection devices, touch screens, and the like. For example, user interface output devices may include a variety of display devices that visually convey text, graphics, and audio / video information, such as, but not limited to, monitors, printers, speakers, headphones, automobile navigation systems, plotters, audio output devices, and modems.
[0170] The storage subsystem 818 provides a repository or data store for storing information and data used by the computer system 800. The storage subsystem 818 provides a tangible, non-transitory computer readable storage medium for storing basic programming and data constructs that provide some example functionality. The storage subsystem 818 may store software (e.g., programs, code modules, instructions) that, when executed by the processing subsystem 804, provide the functionality described above. The software may be executed by one or more processing units of the processing subsystem 804. The storage subsystem 818 may also provide authentication in accordance with the teachings of the present disclosure.
[0171] The storage subsystem 818 may include one or more non-transient memory devices, including volatile and non-volatile memory devices. As shown in FIG. 8, the storage subsystem 818 includes a system memory 810 and a computer-readable storage medium 822. The system memory 810 may include a number of memories, including a volatile main random access memory (RAM) for storing instructions and data during program execution, and a non-volatile read-only memory (ROM) or flash memory in which fixed instructions are stored. In some implementations, a basic input / output system (BIOS), containing the basic routines that help to transfer information between elements within the computer system 800, such as during start-up, may typically be stored in a ROM. The RAM typically contains data and / or program modules currently being operated on and executed by the processing subsystem 804. In some implementations, the system memory 810 may include a number of different types of memories, such as static random access memory (SRAM) and dynamic random access memory (DRAM).
[0172] 8, system memory 810 may load running application programs 812, program data 814, and operating system 816, which may include a variety of applications such as a web browser, a mid-tier application, a relational database management system (RDBMS), etc. By way of example, operating system 816 may include various versions of Microsoft Windows, Apple Macintosh, and / or Linux operating systems, various commercially available UNIX or UNIX-like operating systems (including, but not limited to, various GNU / Linux operating systems, Google Chrome®, etc.), and / or mobile operating systems such as iOS, Windows Phone, Android® OS, BlackBerry OS, Palm® OS operating systems, etc.
[0173] The computer readable storage medium 822 may store programming and data configurations that provide some example functionality. The computer readable medium 822 may provide storage of computer readable instructions, data structures, program modules, and other data for the computer system 800. Software (programs, code modules, instructions) that provide the above-mentioned functionality when executed by the processing subsystem 804 may be stored in the storage subsystem 818. By way of example, the computer readable storage medium 822 may include non-volatile memory such as hard disk drives, magnetic disk drives, optical disk drives such as CD ROMs, DVDs, Blu-Ray® disks, or other optical media. The computer readable storage medium 822 includes, but is not limited to, Zip® drives, flash memory cards, Universal Serial Bus (USB) flash drives, Secure Digital (SD) cards, DVD disks, digital video tapes, and the like. The computer readable storage medium 822 may also include solid-state drives (SSDs) based on non-volatile memory such as flash memory-based SSDs, enterprise flash drives, SSDs based on volatile memory such as solid state RAM, dynamic RAM, static RAM, DRAM-based SSDs, magnetoresistive RAM (MRAM) SSDs, and hybrid SSDs using a combination of DRAM and flash memory-based SSDs.
[0174] In particular examples, storage subsystem 818 may include a computer-readable storage medium reader 820, which may be further connected to a computer-readable storage medium 822. Reader 820 may be configured to receive and read data from a memory device, such as a disk, a flash drive, or the like.
[0175] In certain examples, computer system 800 may support virtualization techniques, including but not limited to virtualization of processing and memory resources. For example, computer system 800 may provide support for running one or more virtual machines. In certain examples, computer system 800 may execute a program, such as a hypervisor, that facilitates configuration and management of virtual machines. Each virtual machine may be assigned memory, computational (e.g., processors, cores), input / output, and networking resources. Each virtual machine generally operates independently from other virtual machines. A virtual machine generally runs its own operating system, which may be the same as or different from the operating systems executed by other virtual machines executed by computer system 800. Thus, multiple operating systems may be executed simultaneously by computer system 800 in some cases.
[0176] The communication subsystem 824 provides an interface to other computer systems and networks. The communication subsystem 824 serves as an interface for receiving data from the computer system 800 and transmitting data to other systems. For example, the communication subsystem 824 may enable the computer system 800 to establish a communication channel over the Internet to one or more client devices to send and receive information to and from the client devices. For example, if the computer system 800 is used to implement the bot system 120 shown in FIG. 1, the communication subsystem may be used to communicate with a chatbot system selected for the application.
[0177] The communications subsystem 824 may support both wired and / or wireless communication protocols. In particular examples, the communications subsystem 824 may include a radio frequency (RF) transceiver component for accessing wireless voice and / or data networks (e.g., using cellular telephone technology, advanced data network technologies such as 3G, 4G, or EDGE (enhanced data rates for global evolution), WiFi (IEEE 802.XX family standards, or other mobile communications technologies, or any combination thereof), a global positioning system (GPS) receiver component, and / or other components. In some examples, the communications subsystem 824 may provide wired network connectivity (e.g., Ethernet) in addition to or instead of a wireless interface.
[0178] The communications subsystem 824 may receive and transmit data in a variety of forms. In some examples, in addition to other forms, the communications subsystem 824 may receive incoming communications in the form of structured and / or unstructured data feeds 826, event streams 828, event updates 830, etc. For example, the communications subsystem 824 may be configured to receive (or send) data feeds 826, such as web feeds, such as Twitter feeds, Facebook updates, rich site summary (RSS) feeds, etc., in real time from users of social media networks and / or other communications services, and / or to receive (or send) real-time updates from one or more third-party information sources.
[0179] In particular examples, the communications subsystem 824 may be configured to receive data in the form of a continuous data stream that may include an event stream 828 of real-time events and / or event updates 830, which may be of an explicitly unterminated continuous or open-ended nature. Examples of applications that generate continuous data may include, for example, sensor data applications, financial tickers, network performance measurement tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, and automobile traffic monitoring.
[0180] The communications subsystem 824 may also be configured to communicate data from the computer system 800 to other computer systems or networks. Data may be communicated in a variety of different forms, such as structured and / or unstructured data feeds 826, event streams 828, and event updates 830, to one or more databases in communication with one or more streaming data source computers coupled to the computer system 800.
[0181] The computer system 800 may be of various types, including a handheld mobile device (e.g., an iPhone® mobile phone, an iPad® computing tablet, a PDA), a wearable device (e.g., a Google Glass head mounted display), a personal computer, a workstation, a mainframe, a kiosk, a server rack, or other data processing system. Due to the ever-changing nature of computers and networks, the description of the computer system 800 shown in FIG. 8 is intended as a specific example only. Many other configurations are possible having more or fewer components than the system shown in FIG. 8. However, there are other means and / or methods of implementing the various examples based on the disclosure and teachings provided herein.
[0182] While specific examples have been described, various modifications, variations, alternative constructions, and equivalents are possible. The examples are not limited to operation in one particular data processing environment, but may freely operate in multiple data processing environments. Moreover, while the specific examples have been described using a particular sequence of transactions and steps, those skilled in the art will appreciate that this is not intended to be limiting. Although some flow charts describe operations as a sequential process, many of these operations may be performed in parallel or simultaneously. Furthermore, the order of operations may be permuted. Processes may have additional steps not included in the figures. Various features and aspects of the examples described above may be used alone or in combination.
[0183] Additionally, while particular examples have been described using particular combinations of hardware and software, it should be recognized that other combinations of hardware and software are possible. An example may be implemented exclusively in hardware, exclusively in software, or using a combination thereof. The various processes described herein may be implemented on the same processor or on different processors in any combination.
[0184] Where a device, system, component or module is described as being configured to perform certain operations or functions, such configuration may be achieved, for example, by designing an electronic circuit to perform the operations, by programming a programmable electronic circuit (such as a microprocessor) to perform the operations, such as by executing computer instructions or code, or a processor or core programmed to execute code or instructions stored on a non-transitory storage medium, or any combination thereof. Processes may communicate using a variety of techniques, including, but not limited to, conventional techniques for inter-process communication, and different pairs of processes may use different techniques, or the same pair of processes may use different techniques at different times.
[0185] In this disclosure, specific details are provided to thoroughly understand the examples. However, the examples can be practiced without these specific details. For example, well-known circuits, processes, algorithms, structures and techniques are shown without unnecessary detail so as not to obscure the examples. This description is only intended to provide examples and is not intended to limit the scope, applicability, or configuration of other examples. Rather, the above description of the examples provides those skilled in the art with an effective description for implementing various examples. Various changes may be made in the function and arrangement of elements.
[0186] Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense. It will be apparent, however, that additions, subtractions, deletions, and other modifications and alterations may be made without departing from the broader spirit and scope as set forth in the claims. Thus, while specific examples have been described, these are not intended to be limiting. Various modifications and equivalents are within the scope of the following claims.
[0187] In the foregoing specification, aspects of the disclosure have been described with reference to specific examples thereof, but those skilled in the art will recognize that the disclosure is not limited thereto. The various features and aspects of the disclosure described above can be used individually or jointly. Moreover, the examples may be utilized in any number of environments and applications beyond those described herein without departing from the broader spirit and scope of the specification. Thus, the specification and drawings should be regarded as illustrative rather than restrictive.
[0188] In the preceding description, for purposes of illustration, the method has been described in a particular order. It should be understood that in alternative examples, the method may be performed in an order different from that described. It should also be understood that the above-described method may be performed by hardware components or embodied in a sequence of machine-executable instructions that may be used to cause a machine, such as a general-purpose or special-purpose processor or logic circuitry, programmed with those instructions, to perform the method. These machine-executable instructions may be stored on one or more machine-readable media, such as a CD-ROM or other type of optical disk, a floppy disk, a ROM, a RAM, an EPROM, an EEPROM, a magnetic or optical card, a flash memory, or any other type of machine-readable medium suitable for storing electronic instructions. Alternatively, the method may be performed by a combination of hardware and software.
[0189] Where a component is described as being configured to perform a particular operation, such configuration may be achieved, for example, by designing electronic circuitry or other hardware to perform the operation, by programming a programmable electronic circuit (e.g., a microprocessor or other suitable electronic circuitry) to perform the operation, or by any combination thereof.
[0190] Although illustrative examples of the present application have been described in detail herein, it is to be understood that the concepts of the present invention may be variously embodied and employed in other manners, and the appended claims are intended to be construed to include such modifications except insofar as limited by the prior art.
Claims
1. 1. A method comprising: receiving, in a data processing system, a training set of utterances for training an intent classifier to identify one or more intents for one or more utterances; augmenting the training set of utterances with stop words to generate an expanded training set of out-domain utterances for an unresolved intent category corresponding to an unresolved intent, the augmenting comprising: selecting one or more utterances from the training set of utterances; and for each selected utterance, preserving existing stop words in the utterance and replacing at least one non-stop word in the utterance with a stop word or stop word phrase selected from a list of stop words to generate an out-domain utterance, the method further comprising: The method of claim 1, further comprising: the data processing system training the intent classifier using a training set of utterances and an extended training set of out-domain utterances.
2. 2. The method of claim 1, wherein for each selected utterance, the existing stop words in the utterance are preserved and all of the non-stop words in the utterance are replaced with the stop words or stop word phrases selected from the list of stop words.
3. 2. The method of claim 1, wherein for each selected utterance, the existing stop words in the utterance are preserved and at least one of the non-stop words in the utterance is randomly replaced with the stop word or the stop word phrase selected from the list of stop words.
4. 4. The method of claim 1, wherein selecting the utterance comprises searching for consecutive stop words at the beginning of the utterance in a training set of utterances, and selecting an utterance in the training set of utterances that has the longest consecutive stop words at the beginning of the utterance.
5. 4. The method of claim 1, wherein selecting the utterance comprises: searching for n consecutive stop words anywhere in the utterance in a training set of utterances; and selecting the utterance having n consecutive stop words anywhere in the utterance.
6. 6. The method of claim 1, wherein augmenting the training set of utterances with the stop words further comprises: (i) repeatedly selecting the one or more utterances from the training set of utterances and processing each utterance once to generate a corresponding out-domain utterance based on a pre-defined expansion percentage; (ii) selecting the one or more utterances from the training set of utterances and processing the one or more utterances multiple times to generate multiple out-domain utterances from each utterance based on the pre-defined expansion percentage; or (iii) any combination thereof.
7. The method of claim 6, wherein the predefined expansion ratio is a ratio of original speech to expanded speech between 1:0.05 and 1:
1.
8. 1. A system comprising: one or more data processors; and a non-transitory computer-readable storage medium comprising instructions that, when executed on the one or more data processors, cause the one or more data processors to perform actions, the actions including: receiving a training set of utterances for training an intent classifier to identify one or more intents for one or more utterances; and augmenting the training set of utterances with stop words to generate an augmented training set of out-domain utterances for an unresolved intent category corresponding to an unresolved intent, the augmenting comprising: selecting one or more utterances from the training set of utterances; and for each selected utterance, preserving existing stop words in the utterance and replacing at least one non-stop word in the utterance with a stop word or stop word phrase selected from a list of stop words to generate an out-domain utterance, the actions further comprising: training the intent classifier using a training set of utterances and an augmented training set of out-domain utterances.
9. 9. The system of claim 8, wherein for each selected utterance, the existing stop words in the utterance are preserved and all of the non-stop words in the utterance are replaced with the stop words or stop word phrases selected from the list of stop words.
10. 9. The system of claim 8, wherein for each selected utterance, the existing stop words in the utterance are preserved and at least one of the non-stop words in the utterance is randomly replaced with the stop word or stop word phrase selected from the list of stop words.
11. 9. The system of claim 8, wherein selecting the utterance includes searching for consecutive stop words at the beginning of the utterance in a training set of utterances, and selecting the utterance having the longest consecutive stop words at the beginning of the utterance in the training set of utterances.
12. 9. The system of claim 8, wherein selecting the utterance includes searching for n consecutive stop words anywhere in the utterance in a training set of utterances, and selecting the utterance having n consecutive stop words anywhere in the utterance.
13. 9. The system of claim 8, wherein augmenting the training set of utterances with the stop words further comprises: (i) repeatedly selecting the one or more utterances from the training set of utterances and processing each utterance once to generate a corresponding out-domain utterance based on a predefined expansion percentage; (ii) selecting the one or more utterances from the training set of utterances and processing the one or more utterances multiple times to generate multiple out-domain utterances from each utterance based on the predefined expansion percentage; or (iii) any combination thereof.
14. The system of claim 13, wherein the predefined expansion ratio is a ratio of original speech to expanded speech between 1:0.05 and 1:
1.
15. 1. A method for determining resolved or unresolved intents from an utterance, comprising: receiving, by a chatbot system, an utterance generated by a user interacting with the chatbot system; and classifying the utterance into a resolved intent category corresponding to a resolved intent or an unresolved intent category corresponding to an unresolved intent using an intent classifier deployed within the chatbot system, the intent classifier including a plurality of model parameters identified using training data, the training data including: a training set of utterances for training the intent classifier to identify one or more resolved intents for one or more utterances; an expanded training set of out-domain utterances for training the intent classifier to identify one or more unresolved intents for one or more utterances, the expanded training set of out-domain utterances being artificially generated to include utterances from the training set of utterances, in which existing stop word patterns in the utterances are preserved and at least one non-stop word in each of the utterances is randomly replaced with a stop word; The model parameters are identified using the training data based on minimization of a loss function, the method further comprising: outputting, with the intent classifier, the resolved intent or the unresolved intent based on the classification.
16. A computer program for causing one or more processors to carry out the method according to any one of claims 1 to 7 and 15.
Citation Information
Patent Citations
A semantic understanding system and method based on natural language processing
CN109241533A
Method and apparatus for facilitating customer intent prediction
US20170116177A1
Intelligent Apparatus and Method for Responding to Text Messages
US20190280992A1
Conversation control device and conversation control method
WO2016067418A1
Dialog device, method and program
WO2016151698A1
Cited By
Demand information processing methods and systems and computer program products
TWI915279B
