Adaptive training data augmentation to facilitate training of named entity recognition models
The adaptive training data augmentation technique addresses the challenge of biased NER models by balancing entity representation, enhancing the chatbot's ability to recognize diverse entities and improving classification accuracy.
Patent Information
- Application Number
- JP2025511579
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-16
- Filing Date
- 2023-08-17
- Publication Date
- 2025-08-28
AI Technical Summary
Building artificial intelligence-based chatbots is challenging due to the need for specialized knowledge and techniques, and traditional training data for named entity recognition (NER) models often lacks diversity and balance, leading to biased learning towards majority entities and misclassification of minority entities.
An adaptive training data augmentation technique that calculates an expansion rate for each named entity category based on its distribution in the training data, generating a variable number of additional utterances to balance the representation and improve NER model performance.
The adaptive augmentation technique enhances the NER model's ability to recognize diverse entities, reducing bias and improving classification accuracy by ensuring sufficient examples for minority classes are generated during training.
Smart Images

Figure 2025528391000001_ABST
Abstract
Description
[Technical Field]
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS This application claims the benefit of and priority to U.S. Provisional Patent Application No. 63 / 373,148, having a filing date of August 22, 2022, which claims the benefit of and priority to U.S. Non-Provisional Patent Application No. 18 / 450,678, having a filing date of August 16, 2023, the contents of which are incorporated herein by reference in their entirety for all purposes.
[0002] Field The present disclosure relates generally to machine learning techniques for augmenting training data, and more particularly to machine learning techniques for adaptive training data augmentation to facilitate training of named entity recognition models. [Background technology]
[0003] background Artificial intelligence has many applications. For example, many users around the world use instant messaging or chat platforms to get instant responses. Organizations often use these instant messaging or chat platforms to engage with customers (or end users) in live conversations. However, it can be very costly for organizations to employ service personnel to participate in live communications with customers or end users. Chatbots or bots have been developed to simulate conversations with end users, particularly over the Internet. End users can communicate with such bots through messaging apps. Intelligent bots, generally bots equipped with artificial intelligence (AI), can communicate more intelligently and contextually in live conversations with end users, thereby enabling more natural conversations and an improved conversational experience. Instead of relying on a fixed set of keywords or commands, intelligent bots may be able to receive end user utterances in natural language, understand their intent, and respond accordingly. Summary of the Invention [Problem to be solved by the invention]
[0004] However, artificial intelligence-based solutions such as chatbots can be difficult to build because these automated solutions require specific knowledge in a certain domain and the application of certain techniques that may be within the capabilities of specialized developers. As part of building such a chatbot, a developer may first understand the needs of the enterprise and end users. The developer may then perform an analysis, for example, selecting a dataset to be used in the analysis, preparing the input dataset for the analysis (e.g., cleansing the data before analysis, extracting, formatting, and / or transforming the data, data feature engineering, etc.), identifying an appropriate machine learning (ML) technique or model to perform the analysis, and making decisions regarding improving the technique or model to improve results / outcomes based on feedback. The task of identifying an appropriate model may involve developing multiple models, possibly in parallel, and iteratively testing and experimenting with these models before identifying a specific model (or models) to use. Furthermore, supervised learning-based solutions typically involve 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 improving and monitoring these phases to achieve an optimal solution. For example, to train an ML technique or model, precise training data is needed to enable the algorithm to understand and learn certain patterns or features (e.g., for chatbots, not just raw language processing, but intent extraction and careful syntactic parsing) that the ML technique or model will use to predict a desired outcome (e.g., inferring intent from utterances). To ensure that the ML technique or model properly learns these patterns and features, developers may be responsible for selecting, augmenting, and optimizing the set of training data for the ML technique or model. [Means for solving the problem]
[0005] A brief overview Disclosed herein are machine learning techniques for adaptive training data augmentation to facilitate training of named entity recognition (NER) models.
[0006] In various embodiments, a computer-implemented method includes accessing training data including a plurality of utterances, each utterance including at least one named entity corresponding to one of a plurality of named entity categories; calculating an expansion rate for each named entity category of the plurality of named entity categories based on a distribution of each named entity category of the plurality of named entity categories in the training data and a function selected from a plurality of functions in a hyperparameter tuning process of the NER model; generating a plurality of additional utterances based on the calculated expansion rate for each named entity category of the plurality of named entity categories; augmenting the training data by combining the plurality of additional utterances with the plurality of utterances to form augmented training data; and training the NER model using the augmented training data.
[0007] In some embodiments, the hyperparameter tuning process includes dividing the training data into training datasets, each training dataset including a corresponding set of utterances for a plurality of utterances; selecting, for each training dataset of the training dataset, candidate hyperparameters from among a set of candidate hyperparameters; generating an expanded set of utterances from the corresponding set of utterances of each training dataset based on the candidate hyperparameters and a function associated with the candidate hyperparameter from among a plurality of functions; training an NER model using the expanded set of utterances; calculating performance metrics for the NER model trained using the expanded set of utterances; and determining a hyperparameter set for the NER model based on the performance metrics calculated for the NER model trained using each expanded set of utterances.
[0008] In some embodiments, the number of additional utterances generated for a first named entity category of the plurality of named entity categories is different from the number of additional utterances generated for a second named entity category of the plurality of named entity categories.
[0009] In some embodiments, determining the expansion rate for each named entity category of the plurality of named entity categories includes calculating a number of occurrences of each named entity category of the plurality of named entity categories in the training data; and normalizing the number of occurrences of each named entity category of the plurality of named entity categories in the training data.
[0010] In some embodiments, determining the expansion rate for each named entity category of the plurality of named entity categories includes calculating a normalized distribution value for each named entity category of the plurality of named entity categories, wherein the normalized distribution value is calculated for each named entity category of the plurality of named entity categories by dividing the calculated number of occurrences for each named entity category by the sum of the number of occurrences of all named entity categories of the plurality of named entity categories that occur in the training data.
[0011] In some embodiments, the plurality of functions include at least one of: a first function that calculates the growth rate of the given named entity category based on an exponential function that takes as input a normalized distribution value and a beta value for the given named entity category; and a second function that calculates the growth rate of the given named entity category based on a binary logarithmic function that takes as input the number of occurrences that the given named entity category occurs in the training data.
[0012] In some embodiments, the method further includes providing a trained NER model to the system, where providing the trained NER model includes detecting and classifying named entities in utterances received by the system from a user.
[0013] Some embodiments include a system comprising one or more processors and one or more computer-readable media storing instructions that, when executed by the one or more processors, cause the system to perform some or all of the operations and / or methods disclosed herein.
[0014] Some embodiments include one or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause the system to perform some or all of the operations and / or methods disclosed herein.
[0015] The techniques described above and below can be implemented in multiple ways and in multiple contexts. Some exemplary implementations and contexts are provided with reference to the accompanying drawings, as described in more detail below. However, the following implementations and contexts are only a few of many. [Brief explanation of the drawings]
[0016] [Figure 1] FIG. 1 is a simplified block diagram of a distributed environment incorporating an illustrative embodiment. [Figure 2] FIG. 1 is a simplified block diagram of a computing system implementing a masterbot according to one embodiment. [Figure 3] FIG. 1 is a simplified block diagram of a computing system implementing a skillbot according to one embodiment. [Figure 4A] FIG. 1 is a simplified block diagram of a model training and deployment system according to an embodiment. [Figure 4B] FIG. 1 is a simplified block diagram of a system incorporating a named entity recognition model according to one embodiment. [Figure 5A] 1 is a flow diagram illustrating an example process for adaptively expanding training data according to an embodiment. [Figure 5B] 1 is a flow diagram illustrating an exemplary process for classifying the intent of an utterance according to an embodiment. [Figure 6] FIG. 1 is a simplified diagram of a distributed system for implementing various embodiments. [Figure 7]FIG. 1 is a simplified block diagram of one or more components of a system environment in which services provided by one or more components of an embodiment system can be provided as cloud services, according to various embodiments. [Figure 8] FIG. 1 illustrates an exemplary computer system that can be used to implement various embodiments. DETAILED DESCRIPTION OF THE INVENTION
[0017] Detailed Description In the following description, for purposes of explanation, specific details are set forth in order to provide a thorough understanding of aspects of certain embodiments. It will be understood, however, that various embodiments may be practiced without these specific details. The drawings 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.
[0018] introduction Artificial intelligence has broad applicability. For example, a digital assistant is an artificial intelligence-driven interface that helps users accomplish various tasks based on natural language conversation. For each digital assistant, customers can assemble one or more skills. Skills (also described herein as chatbots, bots, or skillbots) are individual bots specialized for specific types of tasks, 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 input and interacts with the appropriate chatbot to route the conversation. Digital assistants can be made available to end users through various channels, such as FACEBOOK® Messenger, SKYPE MOBILE® Messenger, or short message service (SMS). Channels route chats from the end user to the digital assistant and its various bots and back again over various messaging platforms. Channels may also support user-agent escalation, event-triggered conversations, and testing.
[0019] Intents enable artificial intelligence-based technologies, such as chatbots, to understand what a user wants the chatbot to do. Intents refer to user intentions communicated to a chatbot through user requests and statements, also referred to as utterances (e.g., check account balance, make a purchase, etc.). As used herein, an utterance or message may refer to a set 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 indicates some user action (e.g., ordering a pizza) and compiling a set of real-life user statements or utterances commonly associated with the behavior's trigger. Because the chatbot's recognition is derived from these intents, each intent may be created from a robust (one to two dozen utterances) and diverse dataset, allowing the chatbot to interpret ambiguous user input. A rich set of utterances enables the chatbot to understand what the user wants when it receives messages like "Forget this order!" or "Cancel delivery!"—messages that mean the same thing but are expressed differently. An intent classifier is included within the chatbot system to automatically classify the intent of an utterance.
[0020] An utterance may include named entities that further assist the chatbot in understanding the meaning of the utterance. For example, if a user types, "show me yesterday's financial news," the named entities "yesterday" and "financial" assist the chatbot in understanding the user's request (i.e., to watch the news). Entities can be categorized according to what they represent. For example, "yesterday" can be categorized as a "dateTime" entity, and "financial" can be categorized as a "newsType" entity. Named Entity Recognition (NER) is a tool used by intent classifiers and chatbot systems to automatically detect, extract, and classify entities. Collectively, utterances containing named entities and their associated intents can be used as a training corpus for a chatbot. By training an algorithm with a corpus, customers turn the algorithm into a model that serves as a reference tool for resolving end-user input into a single intent. Customers can improve the chatbot's recognition acuity through a series of intent tests and intent training.
[0021] The use of artificial intelligence in the context of chatbots presents some of the challenges of applying artificial intelligence techniques. For example, building a chatbot that can determine an end user's intent based on the end user's utterances is a difficult task due, at least to the subtleties and ambiguities of natural language and the dimensions of the input-output space (e.g., the number of possible user utterances, intents, etc.). Illustrative examples of this difficulty arise from characteristics of natural language, such as the use of euphemisms, synonyms, or ungrammatical utterances to express intent. For example, an utterance may express the intent to order a pizza without explicitly uttering the words pizza, ordering, or delivery. These characteristics of natural language create uncertainty, resulting in chatbots using confidence as a parameter for predicting user intent. Thus, chatbots may need to be trained, monitored, debugged, and retrained to improve chatbot performance and user experience with the chatbot. In traditional spoken language understanding (SLU) and natural language processing (NLP) systems, training mechanisms are provided for training and retraining machine learning algorithms of digital assistants or chatbots contained therein. Traditionally, these algorithms are trained using "manufactured" utterances for any intent. For example, an utterance of "Do you do price changes?" may be used to train a classification algorithm in a chatbot system to classify this type of utterance as the intent "Do you offer a price match." Training the algorithm with manufactured utterances helps initially train the chatbot system to provide a service and retrain the chatbot system once it is deployed and receives utterances from users.
[0022] Entity extraction generally has two stages: a named entity recognition stage and an entity resolution stage. The specific problem addressed here relates to the named entity recognition stage. Entities are typically things like dates, times, places, names, brands, etc. Entities can also be system entities in that they are general and domain-independent (e.g., PERSON, NUMBER, CURRENCY, DATE_TIME). In the named entity recognition stage, an NER model is typically trained to predict class labels of tokens in an utterance. The utterance is natural language text, and the class labels represent named entities. Traditional NER models are trained using publicly and privately available datasets. However, these datasets are often not diverse enough to train an NER model to detect entities with all kinds of contexts and entity variants. Additionally, these datasets typically have an unbalanced representation of different entity classes, resulting in some entity classes being over-represented and some entity classes being under-represented in the dataset. For example, a dataset may include a total of 100 examples, of which the entity class CURRENCY occurs in 26 of the examples, the entity class TIME_DATE occurs in 40 of the examples, and the entity class PERSON occurs in 73 of the examples. Thus, the entity class PERSON is the majority class (i.e., over-represented) in the dataset, while the entity classes CURRENCY and TIME_DATE are minority classes (i.e., under-represented) in the dataset. NER models are typically biased toward learning majority-class entities and, as a result, often misclassify minority-class entities.
[0023] One option for diversifying and balancing the representation of entity classes in these datasets is to generate additional labeled utterances and add them to the dataset. The additional labeled utterances can be written by end users, by freelancers and / or companies specializing in data labeling, and / or by crowdsourced using crowdworkers. However, these approaches can be difficult to implement for enterprise systems that utilize many artificial intelligence-based systems, such as multiple chatbot systems trained for many different tasks in multiple languages and receiving a wide variety of utterances for each task. In systems that utilize artificial intelligence-based systems such as these, entity diversity needs to be obtained automatically in a synthetic, agnostic manner in order to quickly and efficiently generate large corpora of training data in multiple languages for many different chatbots.
[0024] Another option for diversifying these datasets is to expand utterances within these datasets and combine the expanded utterances with the dataset. Traditional utterance expansion techniques for NER typically expand utterances in a dataset by replacing entities within the utterance with different entities (e.g., other entities obtained from the dataset itself or from a dictionary such as a gazetteer). For example, for the utterance “What is the cost of parking at IAD airport” in the exemplary dataset, a traditional utterance expansion scheme might replace the entity “IAD airport” by extracting an entity from the same entity class from the gazetteer (e.g., “SFO airport”) and replacing the entity “IAD airport” with the entity “SFO airport,” resulting in the expanded utterance “What is the cost of parking at SFO airport.” The expanded utterances can be combined with the dataset to expand the dataset. However, adding a static number of augmented utterances under this approach may further skew the dataset towards the majority class entities represented in the dataset, which may negatively affect the performance of the NER model with respect to the minority class entities represented in the dataset.
[0025] Therefore, a different approach is needed to address these and other challenges. The developed approach utilizes an adaptive augmentation technique that takes into account the distribution of multiple different entity types in the training data and ultimately improves the performance of an NER model trained on the adaptively augmented training data. The adaptive augmentation technique generates an adaptive number of augmented examples (e.g., utterances) based on the entity distribution to ensure that a sufficient number of examples for minority class entities are generated during training data augmentation. This differs from traditional static augmentation methods, which tend to generate augmented utterances using a fixed number of utterances without considering the overall representation of entity types in the training data. For example, if there are a different number of utterances containing entity type A compared to entity type B, the adaptive augmentation technique calculates separate adaptation rates to generate augmented examples having entity type A and entity type B. The result is a normalization of each entity distribution across the training data, so that the NER model is not biased toward learning majority class entities during training.
[0026] In various embodiments, a computer-implemented method includes accessing training data including a plurality of utterances, each utterance including at least one named entity corresponding to one of a plurality of named entity categories; calculating an expansion rate for each named entity category of the plurality of named entity categories based on a distribution of each named entity category of the plurality of named entity categories in the training data and a function selected from a plurality of functions in a hyperparameter tuning process of the NER model; generating a plurality of additional utterances based on the calculated expansion rate for each named entity category of the plurality of named entity categories; augmenting the training data by combining the plurality of additional utterances with the plurality of utterances to form augmented training data; and training the NER model using the augmented training data.
[0027] As used herein, when an action is "based on" something, this means that the action is at least partially based on at least a portion of that something. As used herein, the terms "similarly," "substantially," "approximately," and "about" are defined as being loosely specified (and being fully specified), as understood by those of ordinary skill in the art. In any disclosed embodiment, the terms "similarly," "substantially," "approximately," or "about" may be substituted for "within [a percentage] of" what is specified, where percentage includes 0.1, 1, 5, and 10 percent.
[0028] Bot System A bot (also referred to as a skill, chatbot, chatterbot, or talkbot) is a computer program that can conduct a conversation with an end user. Bots can generally respond to natural language messages (e.g., questions or comments) through messaging applications that use natural language messages. Businesses can use one or more bots to communicate with end users through messaging applications. Messaging applications may include, for example, over-the-top (OTT) messaging channels (such as Facebook Messenger, Facebook WhatsApp, WeChat, Line, Kik, Telegram, Talk, Skype, Slack, or SMS), virtual private assistants (such as Amazon Dot, Echo, or Show, Google® Home, Apple HomePod, etc.), and 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 devices or apps with interfaces that use other voice input for interaction).
[0029] In some examples, a bot may be associated with a Uniform Resource Identifier (URI). A URI may identify a bot using a string of characters. A URI may be used as a webhook for one or more messaging application systems. A URI may include, for example, a Uniform Resource Locator (URL) or a Uniform Resource Name (URN). A bot may be designed to receive a message (e.g., a Hypertext Transfer Protocol (HTTP) POST call message) from a messaging application system. The HTTP POST call message may be directed from the messaging application system to a URI. In some examples, the message may be different from an HTTP POST call message. For example, a bot may receive a message via Short Message Service (SMS). While the discussion herein refers to a communication received by a bot as a message, it should be understood that the message may be an HTTP POST call message, an SMS message, or any other type of communication between two systems.
[0030] End users interact with bots through conversational interactions (sometimes referred to as conversational user interfaces (UIs)), just as end users interact with other people. In some cases, a conversational interaction may include the end user saying "Hello" to the bot, and the bot responding "Hi" and asking the end user how it can help. End users also interact with bots through other types of interactions, such as transactional interactions (e.g., with a banking bot trained to transfer money from at least one account to another), informational interactions (e.g., with an HR bot trained to check at least how much vacation time a user has remaining), and / or retail interactions (e.g., with a retail bot trained to discuss returning a purchased item or request technical support).
[0031] In other examples, a bot can intelligently handle end-user interactions without intervention by the bot's administrator or developer. For example, an end user may send one or more messages to a bot to achieve a desired goal. The messages may include content such as text, emojis, audio, images, videos, or other methods of conveying a message. In some examples, the bot can automatically convert the content into a standardized format and generate a natural language response. The bot can also automatically prompt the end user for additional input parameters or request other additional information. In some examples, the bot can also initiate communication with the end user rather than passively responding to end-user utterances.
[0032] A conversation with a bot may follow a specific conversational flow that includes multiple states. The flow can specify what happens next based on input. In some examples, a bot can run using a state machine that includes user-defined states (e.g., end-user intent) and actions to take in the states or from state to state. The conversation can take different paths based on end-user input, which can influence the decisions the bot makes for the flow. For example, in each state, based on the end-user input or utterance, the bot can determine the end-user's 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, where the user's intent is expressed through the utterance "order pizza." The user's intent can be directed to a specific task the user wants the bot to perform on their behalf. Thus, an utterance reflecting a user's intent can be phrased as a question, a command, a request, etc.
[0033] In the context of bot configuration, the term “intent” is also used herein to refer to configuration information for mapping a user's utterance to a specific task / action or category of task / action that the bot can perform. To distinguish between an utterance intent (e.g., a user's intent) and a bot's intent, the latter may be referred to herein as a “bot intent.” A bot intent may include a set of one or more utterances associated with the intent. For example, an intent to order a pizza may have various permutations of an utterance expressing a desire to place a pizza order. These associated utterances can be used to train the bot's intent classifier, enabling the intent classifier to subsequently determine whether an input utterance from a user matches the intent to order a pizza. A bot intent may be associated with one or more dialog flows to initiate a conversation with a user in a state. For example, the first message of an intent to order a pizza may be the question, “What kind of pizza would you like?” In addition to the associated utterance, a bot intent may further include a named entity associated with the intent. For example, an intent to order a pizza may include variables or parameters used to perform the task of ordering a pizza (e.g., topping 1, topping 2, pizza type, pizza size, quantity of pizza, etc.) The values of the entities are typically obtained through conversation with the user.
[0034] FIG. 1 is a simplified block diagram of an environment 100 incorporating a chatbot system according to one embodiment. The environment 100 includes a Digital Assistant Builder Platform (DABP) 102, which enables users 104 of the DABP 102 to create and deploy digital assistant or chatbot systems. The DABP 102 can be used to create one or more digital assistant (or DA) 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 shop) owner may use the DABP 102 to create and deploy a digital assistant that enables customers of the restaurant to order food (e.g., order pizza).
[0035] For purposes of this disclosure, a "digital assistant" is a tool that helps a user of the digital assistant accomplish various tasks through natural language conversation. A digital assistant can be implemented using software alone (e.g., a digital assistant is a digital tool that runs using programs, codes, or instructions executable by one or more processors), using hardware, or using a combination of hardware and software. A digital assistant can be embodied or executed in various physical systems or devices, such as a computer, a mobile phone, a watch, an appliance, a vehicle, etc. A digital assistant may also be referred to as a chatbot system. Thus, for purposes of this disclosure, the terms digital assistant and chatbot system are interchangeable.
[0036] A digital assistant, such as a digital assistant 106 built using DABP 102, can be used to perform various tasks through natural language-based conversations 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 get responses 112 back from the digital assistant 106. A conversation can include one or more of the inputs 110 and responses 112. Through these conversations, the user can request that one or more tasks be performed by the digital assistant, and in response, the digital assistant is configured to perform the user-requested task and respond to the user with an appropriate response.
[0037] User input 110 is generally in the form of natural language and is referred to as speech. User utterance 110 can be in text form, such as when a user types in a sentence, a question, a text fragment, or even a single word and provides it as input to the digital assistant 106. In some examples, user utterance 110 can be in the form of acoustic input or utterance, such as when a user says or speaks something that is provided to the digital assistant 106 as input. The utterance is typically in the language that the user speaks. For example, the utterance may be in English or some other language. When the utterance is in the form of an utterance, the utterance input is converted into text form speech in that particular language, and the text speech is then processed by the digital assistant 106. Various utterance-to-text processing techniques may be used to convert the utterance or acoustic input into text speech that is then processed by the digital assistant 106. In some examples, the utterance-to-text conversion may be performed by the digital assistant 106 itself.
[0038] The utterance, which may be a text utterance or a spoken utterance, can be a fragment, a sentence, multiple sentences, one or more words, one or more questions, a combination of the aforementioned types, etc. 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, including 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 behaviors in response to the understood meaning or intent. For purposes of this disclosure, it is assumed that the utterance is either provided directly by a user of the digital assistant 106 or is a text utterance that is the result of converting an input spoken utterance into text form. However, this is not intended to be limiting or restrictive in any way.
[0039] For example, user input can request that a pizza be ordered by providing an utterance such as, "I want 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 desires to order, the size of the pizza, any toppings on the pizza, etc. The responses provided by digital assistant 106 may also be in natural language format and typically in the same language as the input utterance. As part of generating these responses, digital assistant 106 may perform natural language generation (NLG). For a user ordering a pizza, through a conversation between the user and digital assistant 106, the digital assistant can guide the user to provide all the information required for the pizza order so that the pizza is ordered at the end of the conversation. Digital assistant 106 can end the conversation by outputting information to the user indicating that the pizza has been ordered.
[0040] At a conceptual level, the digital assistant 106 performs various processes in response to utterances received from a user. In some examples, this processing involves a sequence or pipeline of processing steps, including, for example, understanding the meaning of the input utterance, determining an action to be performed in response to the utterance, causing the action to be performed, if appropriate, generating a response to be output to the user in response to the user utterance, outputting the response to the user, etc. NLU processing can include analyzing the received input utterance to understand the structure and meaning of the utterance, refining and reshaping the utterance to develop a better understandable form (e.g., logical form) or structure of the utterance, etc. Generating a response may include using NLG techniques.
[0041] NLU processing performed by a digital assistant such as digital assistant 106 can include various NLP-related tasks such as sentence analysis (e.g., tokenization, lemmatization, identifying utterance part tags for sentences, identifying named entities within sentences, generating dependency trees to represent sentence structure, dividing sentences into clauses, analyzing individual clauses, resolving anaphora, performing chunking, etc.). In some examples, NLU processing is performed by digital assistant 106 itself. In some other examples, digital assistant 106 may use other resources to perform portions of NLU processing. For example, the syntax and structure of input spoken sentences can be identified by processing the sentences using a parser, utterance part tagger, and / or NER. In one embodiment, for the English language, a parser, utterance part tagger, and named entity recognizer, such as those provided by the Stanford NLP Group, are used to analyze sentence structure and syntax. These are provided as part of the Stanford CoreNLP toolkit.
[0042] While various examples provided in this disclosure show speech in the English language, this is intended as an example only. In some examples, the digital assistant 106 is also capable of handling speech in languages other than English. The digital assistant 106 can provide subsystems (e.g., components that perform NLU functions) configured to perform processing for multiple different languages. These subsystems may be implemented as pluggable units that can be invoked using service calls from an NLU core server. This makes NLU processing flexible and extensible for each language, including allowing for different orders of processing. Language packs can be provided for individual languages, and the language packs can register a list of subsystems that can be serviced by the NLU core server.
[0043] 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, including, but not limited to, through an application, through a social media platform, through various messaging services and applications, and other applications or channels. A single digital assistant can have several channels configured for it, such that the digital assistant can be powered by and accessed on multiple different services simultaneously.
[0044] A digital assistant or chatbot system generally encompasses or is associated with one or more skills. In one embodiment, these skills are individual chatbots (referred to as skillbots) that are configured to interact with a user and perform specific types of tasks, such as tracking inventory, submitting a timecard, creating an expense report, ordering food, checking a bank account, making a reservation, purchasing a widget, etc. For example, in the embodiment shown in FIG. 1 , the digital assistant or chatbot system 106 includes skills 116-1, 116-2, 116-3, etc. For purposes of this disclosure, the terms “skill” and “skills” are used synonymously with the terms “skillbot” and “skillbots,” respectively.
[0045] Each skill associated with a digital assistant helps a user of the digital assistant complete a task through a conversation with the user, where the conversation may include a combination of text or audio input provided by the user and responses provided by a skill bot. These responses may be in the form of text or audio messages to the user and / or may use simple user interface elements (e.g., selection lists) presented to the user for the user to make a selection.
[0046] There are various ways in which skills or skill bots can be associated with or added to a digital assistant. In some cases, skill bots can be developed by a company and then added to a digital assistant using DABP 102. In some cases, skill bots can be developed and created using DABP 102 and then added to a digital assistant created using DABP 102. In still other cases, DABP 102 provides an online digital store (referred to as a "skill store") that offers multiple skills targeted at a wide range of tasks. Skills offered through the skill store may 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 the desired skill, and indicate that the selected skill should be added to the digital assistant being created using DABP 102. Skills from the skill store can be added to a digital assistant as is or in a modified form (e.g., a user of DABP102 may select and clone a particular skillbot provided 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).
[0047] A variety of different architectures may be used to implement a digital assistant or chatbot system. For example, in one embodiment, a digital assistant created and deployed using DABP 102 may be implemented using a masterbot / child (or sub)bot paradigm or architecture. According to this paradigm, the digital assistant is implemented 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, e.g., that are child bots of the masterbot 114. In one example, the digital assistant 106 itself may act as the masterbot.
[0048] A digital assistant implemented according to a master-child bot architecture allows a user of the digital assistant to interact with multiple skills through a unified user interface, i.e., via a master bot. When a user engages with the digital assistant, user input is received by the master bot. The master bot then performs processing to determine the meaning of the user input utterance. The master bot then determines whether the task requested by the user in the utterance can be handled by the master bot itself. If not, the master bot selects a suitable skill bot to handle the user request and routes the conversation to the selected skill bot. This allows a user to interact with the digital assistant through a common, single interface while still providing the ability to use several skill bots configured to perform specific tasks. For example, for a digital assistant developed for an enterprise, the digital assistant's master bot may interface with skill bots having specific functions, such as a customer relationship management (CRM) bot for performing functions related to customer relationship management, an enterprise resource planning (ERP) bot for performing functions related to enterprise resource planning, a human resources management (HCM) bot for performing functions related to human capital management, 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 user requests.
[0049] In one example, in a masterbot / childbot infrastructure, the masterbot is configured to recognize an available list of skillbots. The masterbot has access to various available skillbots and, for each skillbot, metadata identifying 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 a specific skillbot from multiple available skillbots that can best service or address the user request. The masterbot then routes the utterance (or a portion of the utterance) to that specific skillbot for further handling. Thus, control flows from the masterbot to the skillbot. The masterbot can support multiple input and output channels. In one example, routing may be performed with the assistance of processing performed by one or more available skillbots. For example, as described below, a skillbot can be trained to infer the intent of an utterance and determine whether the inferred intent matches an intent for which the skillbot is configured. Thus, routing performed by the masterbot may involve the skillbot communicating to the masterbot an indication of whether the skillbot is configured with the appropriate intent to address the utterance.
[0050] 1 illustrates a digital assistant 106 with a masterbot 114 and skillbots 116-1, 116-2, and 116-3, but this is not intended to be limiting. A digital assistant can include various other components (e.g., other systems and subsystems) that provide the functionality of the digital assistant. These systems and subsystems may be implemented 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 embodiment using a combination of software and hardware.
[0051] DABP 102 provides infrastructure and various services and features that enable users of DABP 102 to create digital assistants, 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, by cloning a skillbot provided by a skill store. As indicated 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 the skill store. Modifications or customizations can be made to the cloned skillbot as needed. In some other cases, a user of DABP 102 created a skillbot from scratch using tools and services provided by DABP 102. As indicated above, a skill store or skill catalog provided by DABP 102 can provide multiple skillbots for performing various tasks.
[0052] In one example, at a high level, creating or customizing a skillbot involves the following steps: (1) Configure the settings for the new skill bot. (2) Configure one or more intents for the skillbot. (3) Constitute one or more entities of one or more intentions. (4) Train the skill bot. (5) Create a dialog flow for the skill bot. (6) Add custom components to your skill bot as needed. (7) Test and deploy the skill bot.
[0053] Each of the above steps is briefly described below. (1) Configure Settings for a New Skillbot—Various settings can be configured for a skillbot. For example, a skillbot designer can specify one or more invocation names for the skillbot being created. These invocation names can then be used by users of the digital assistant to explicitly invoke the skillbot. For example, a user can enter the invocation name in the user's utterance to explicitly invoke the corresponding skillbot.
[0054] (2) Configure one or more intents and associated example utterances for the skillbot—A skillbot designer specifies one or more intents (also referred to as bot intents) for the skillbot being created. The skillbot is then trained based on these specified intents. These intents represent categories or classes that the skillbot is trained to infer for input utterances. Upon receiving an utterance, the trained skillbot infers the intent of the utterance, and the inferred intent is selected from a predefined set of intents used to train the skillbot. The skillbot then takes an appropriate action to respond to the utterance based on the inferred intent for that 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 on banking, the intents specified for the skillbot may include "CheckBalance," "TransferMoney," "DepositCheck," etc.
[0055] For each intent defined for a skillbot, the skillbot designer may also provide one or more example utterances that express and illustrate the intent. These example utterances are intended to represent utterances a user might input into the skillbot for that intent. For example, for a CheckBalance intent, example utterances may include, "What's my savings account balance?", "How much is in my checking account?", "How much money do I have in my account," etc. Thus, various permutations of typical user utterances may be specified as example utterances for the intent.
[0056] The intents and their associated example utterances are used as training data to train the skill bot. A variety of different training techniques may be used. This training results in a predictive model being generated that is configured to receive 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 that is configured to predict or infer the intent of the input utterance using the trained model. The skill bot can then take one or more actions based on the inferred intent.
[0057] (3) Configuring One or More Intent Entities for a Skill Bot—In some cases, additional context may be required for a skill bot to respond appropriately to a user utterance. For example, there may be situations in which a user input utterance resolves to the same intent within a skill bot. For example, in the above example, "What's my savings account balance?" and "How much is in my checking account?" both resolve to the same CheckBalance intent, but these utterances are different requests asking about different things. To disambiguate such requests, one or more entities are added to the intent. Using the banking skill bot example, an entity called AccountType that defines values called "checking" and "savings" can enable the skill bot to parse the user request and respond appropriately. In the above example, the utterances resolve to the same intent, but the values associated with the AccountType entity are different for the two utterances. This allows the skill bot to perform potentially different actions for the two utterances, even though they resolve to the same intent. One or more entities may be specified for an intent configured for a skill bot. Thus, entities are used to add context to the intent itself: they help to more fully describe the intent and enable the skill bot to complete the user request.
[0058] In one example, there are two types of entities: (a) built-in entities provided by DABP 102, and (2) custom entities that can be specified by a skill bot designer. Built-in entities are general-purpose 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, repeating time period, currency, phone number, URL, etc. Custom entities are used for more customized purposes. For example, for a banking skill, an AccountType entity can be defined by the skill bot designer that enables various banking transactions by checking user input for keywords such as checking, savings, and credit cards.
[0059] (4) Train the Skillbot—The skillbot is configured to receive user input in the form of utterances, parse or otherwise process the received input, and identify or select an intent associated with the received user input. As indicated above, the skillbot must be trained for this. In one embodiment, the skillbot is trained based on intents configured for the skillbot and example utterances associated with the intents (collectively, training data) so that the skillbot can resolve user input utterances into one of its configured intents. In one example, the skillbot is trained using the training data and uses a predictive model that enables the skillbot to determine what a user says (or in some cases, what they intend to say). DABP 102 provides a variety of different training techniques that can be used by the skillbot designer to train the skillbot, including various machine learning-based training techniques, rule-based training techniques, and / or combinations thereof. In one example, 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 referred to as a trained skill bot) can then be used to address and respond to user utterances. In some cases, a user utterance may be a question that requires only a single answer and does not require further conversation. To address such situations, a Q&A (question and answer) intent may be defined for a skill bot. This enables the skill bot to output a response to a user request without having to update the dialog definition. A Q&A intent is created similarly to a regular intent. The dialog flow of a Q&A intent may differ from that of a regular intent.
[0060] (5) Create a Dialog Flow for the Skill Bot—The dialog flow specified for a skill bot describes how the skill bot reacts as its different intents are resolved in response to incoming user input. Dialog flow defines the actions or behaviors the skill bot performs, such as how the skill bot responds to user utterances, how the skill bot prompts the user for input, and how the skill bot returns data. Dialog flow is like a flowchart that the skill bot follows. Skill bot designers specify the dialog flow using a language such as Markdown. In one embodiment, 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 acts as a model of the conversation itself, i.e., allowing the skill bot designer to orchestrate the interaction between the skill bot and the user it serves.
[0061] In one example, a skill bot's dialog flow definition contains the following three sections: (a) Context Section (b) Default transition section (c) Status section Context Section - The context section allows the skill bot designer to define variables that will be used within 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, user variables that allow the skill bot to recognize and assert user preferences, etc.
[0062] Default Transition Section - Transitions for a skill bot can be defined in the dialog flow state section or the default transition section. Transitions defined in the default transition section act as fallbacks and are triggered when there are no applicable transitions defined in a state or when the conditions required to trigger a state transition cannot be met. The default transition section can be used to define routing that allows the skill bot to gracefully handle unexpected user behavior.
[0063] State Section - The dialog flow and its associated behavior are defined as a series of transition states that govern 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. Thus, states are built around components. States encompass component-specific characteristics and define transitions to other states that are triggered after the component is executed.
[0064] The state section can be used to address special case scenarios. For example, there may be times within a digital assistant when you want to temporarily exit a first skill that the user is engaged in and provide the user with the option to do something in a second skill. For example, if a user is engaged in a conversation with a shopping skill (e.g., the user has made some selections for a purchase), the user may want to jump to a banking skill (e.g., the user may want to ensure they have enough money for the purchase) and then return to the shopping skill to complete the user's order. To address this, you can configure an action within a first skill to initiate an interaction with a second, different skill within the same digital assistant and then return to the original flow.
[0065] (6) Adding Custom Components to a Skillbot—As described above, states specified in a skillbot's dialog flow nominate components that provide the required functionality for that state. Components enable a skillbot to perform its functions. In one embodiment, DABP 102 provides a set of pre-configured components for performing 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 skillbot's dialog flow. 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 in the skillbot's dialog flow.
[0066] (7) Testing and Deploying Skillbots - DABP102 provides several features that allow skillbot designers to test the skillbots they are developing, which can then be deployed and included within a digital assistant.
[0067] While the above description describes how to create a skillbot, similar techniques may also be used to create a digital assistant (or masterbot). At the masterbot or digital assistant level, built-in system intents may be configured for the digital assistant. These built-in system intents are used to identify common tasks that the digital assistant itself (i.e., the masterbot) can handle without invoking a skillbot associated with the digital assistant. Examples of system intents defined for a masterbot include: (1) Exit, which applies when a user signals a desire to exit the current conversation or context within the digital assistant; (2) Help, which applies when a user seeks help or orientation; and (3) Unresolved Intent, which applies to user input that does not match well with the exit and help intents. The digital assistant also stores information about one or more skillbots associated with the digital assistant. This information allows the masterbot to select a specific skillbot to handle an utterance.
[0068] 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 can 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 action, should be actioned by the digital assistant or MasterBot itself via a built-in system intent, or should be actioned as a different state within the current conversation flow.
[0069] In one embodiment, as part of this process, the digital assistant determines whether the user input utterance explicitly identifies a skill bot using its invocation name. If an invocation name is present in the user input, it is treated as an explicit invocation of the skill bot corresponding to the invocation name. In such a scenario, the digital assistant can route the user input to the explicitly invoked skill bot for further handling. In the absence of a specific or explicit invocation, in one embodiment, the digital assistant evaluates the received user input utterance and calculates a confidence score for the system intent and the skill bot associated with the digital assistant. The calculated score for the skill bot or system intent represents how likely the user input represents the task the skill bot is configured to perform or represents the system intent. Any system intent or skill bot whose associated calculated confidence score exceeds 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 the identified candidates for further handling of the user input utterance. In one embodiment, after one or more skill bots are identified as candidates, the intents associated with those candidate skills are evaluated (according to the intent model of each skill), and a confidence score is determined for each intent. Generally, any intent with a confidence score above a threshold (e.g., 70%) is treated as a candidate intent. If a particular skill bot is selected, the user 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.
[0070] FIG. 2 is a simplified block diagram of a MasterBot (MB) system 200 according to one embodiment. 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 invoker 240, and a data store 250. The MB system 200 shown in FIG. 2 is only one example of an arrangement of components within a MasterBot. Those skilled in the art will recognize many possible variations, alternatives, and modifications. For example, in some other embodiments, the MB system 200 may have more or fewer systems or components than those shown in FIG. 2, may combine two or more subsystems, or may have a different configuration or arrangement of subsystems.
[0071] The pre-processing subsystem 210 receives an utterance "A" 202 from a user and processes the utterance through a language detector 212 and a language parser 214. As indicated above, the utterance can be provided in a variety of modalities, including audio or text. The utterance 202 can be a sentence fragment, a complete sentence, multiple sentences, etc. 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 an utterance-to-text converter (not shown) that inserts punctuation marks, such as commas, semicolons, periods, etc., into the resulting text.
[0072] The language detector 212 detects the language of the utterance 202 based on the text of the utterance 202. The manner in which the utterance 202 is addressed depends on the language, as each language has its own grammar and semantics. Differences between languages are taken into account when analyzing the syntax and structure of the utterance.
[0073] The language parser 214 parses the utterance 202 to extract part-of-speech (POS) tags for individual linguistic units (e.g., words) within the utterance 202. POS tags include, for example, nouns (NN), pronouns (PN), verbs (e.g., VB), etc. The language parser 214 can also tokenize the linguistic units of the utterance 202 (e.g., to convert each word into a separate token) and lemmatize the words. A lemma is the primary form of a set of words 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, such as combining "credit" and "card" into the single expression "credit card." The language parser 214 can also identify relationships between words within the utterance 202. For example, in some embodiments, 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 language parser 214 form extracted information 205, which, along with utterance 202 itself, is provided as input to MIS 220.
[0074] As indicated above, utterance 202 can include more than one sentence. For purposes of multiple-intent detection and explicit invocation, utterance 202 may be treated as a single unit even if it includes multiple sentences. However, in some embodiments, preprocessing, such as by preprocessing subsystem 210, can be performed to identify single sentences among multiple sentences for multiple-intent analysis and explicit invocation analysis. In general, the results produced by MIS 220 and EIS 230 are substantially the same whether utterance 202 is processed at the individual sentence level or as a single unit containing multiple sentences.
[0075] The MIS 220 determines whether the utterance 202 expresses multiple intents. While the MIS 220 can detect the presence of multiple intents in the utterance 202, the processing 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 processing to determine whether the intent of the utterance 202 matches a bot intent can be performed by the intent classifier 242 of the MB system 200 or by an intent classifier of a skill bot (e.g., as shown in FIG. 3 ). The processing performed by the MIS 220 assumes that there is a bot (e.g., a particular skill bot or the master bot itself) that can address the utterance 202. Thus, the processing performed by the MIS 220 does not require knowledge of which bots are in the chatbot system (e.g., the identities of the skill bots registered with the master bot) or which intents are configured for a particular bot.
[0076] To determine that utterance 202 contains multiple intents, MIS 220 applies one or more rules from a set of rules 252 in data store 250. The rules applied to utterance 202 depend on the language of 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 joining two parts of a sentence (e.g., a conjunction), where both parts correspond to separate intents. If utterance 202 matches the sentence pattern, it can be inferred that utterance 202 expresses multiple intents. Note that an utterance with multiple intents does not necessarily have different intents (e.g., intents targeted at different bots or different intents within the same bot). Instead, the utterance may have separate instances of the same intent (e.g., "Place a pizza order using payment account X, then place a pizza order using payment account Y").
[0077] As part of determining that utterance 202 represents multiple intents, MIS 220 also determines which portions of utterance 202 are associated with each intent. For each intent representing an utterance that encompasses multiple intents, MIS 220 constructs a new utterance in place of the original utterance for separate processing, such as, for example, utterance “B” 206 and utterance “C” 208 as shown in FIG. 2 . Thus, original utterance 202 can be split into two or more separate utterances that are addressed at one time. MIS 220 determines which of the two or more utterances should be addressed first using extracted information 205 and / or from an analysis of utterance 202 itself. For example, MIS 220 may determine that utterance 202 includes a marker word indicating that a particular intent should be addressed first. The newly formed utterance corresponding to this particular intent (e.g., one of utterance 206 or utterance 208) will be sent first for further processing by EIS 230. After the conversation triggered by the first utterance has ended (e.g., or has been temporarily put on hold), the next highest priority utterance (e.g., the other of utterance 206 or utterance 208) can then be sent to EIS 230 for processing.
[0078] The EIS 230 determines whether an utterance it receives (e.g., utterance 206 or utterance 208) includes a skillbot's invocation name. In one embodiment, each skillbot in the chatbot system is assigned a unique invocation name that distinguishes the skillbot from other skillbots in the chatbot system. A list of invocation names may be maintained in the data store 250 as part of the skillbot information 254. When an utterance includes words that match the invocation name, the utterance is considered to be an explicit invocation. 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 to use to address the utterance. In some cases, the intent classifier 242 determines that the masterbot should address the implicit invocation utterance. In other cases, the intent classifier 242 determines which skillbot to route the utterance to for handling.
[0079] The explicit call functionality provided by EIS 230 has several advantages. It can reduce the amount of processing that a masterbot needs to perform. For example, when there is an explicit call, the masterbot may not need to perform any intent classification analysis (e.g., using intent classifier 242) or a reduced intent classification analysis to select a skillbot. Thus, the explicit call analysis can enable the selection of a particular skillbot without using intent classification analysis.
[0080] There may also be situations where there is overlap in functionality among multiple skill bots. This can occur, for example, when the intents addressed by two skill bots overlap or are very close to each other. In such situations, it may be difficult for the master bot to identify which of the multiple skill bots to select based solely on intent classification analysis. In such scenarios, explicit invocation eliminates ambiguity about the specific skill bot to be used.
[0081] In addition to determining that an utterance is an explicit invocation, EIS 230 is responsible for determining whether any portion of the utterance should be used as input to the skill bot being explicitly invoked. In particular, EIS 230 can determine that a portion of the utterance is not associated with an invocation. EIS 230 can make this determination through analysis of the utterance and / or analysis of extracted information 205. EIS 230 can send the portion of the utterance that is not associated with an invocation to the skill bot being invoked instead of sending the entire sentence received by EIS 230. In some cases, the input to the skill bot being invoked is formed simply by removing any portion of the utterance that is associated with an invocation. For example, "I want to order pizza using Pizza Bot" can be shortened to "I want to order pizza" because "using Pizza Bot" is related to the invocation of Pizza Bot but not to any processing that will be performed by Pizza Bot. In some cases, the EIS 230 can reformat the portion to be sent to the bot being invoked, for example, to form a complete sentence. Thus, the EIS 230 determines not only that there is an explicit invocation, but also what to send to the skill bot when there is an explicit invocation. In some cases, there may not be any text to be entered into the bot being invoked. For example, if the utterance was "Pizza Bot," the EIS 230 may determine that the Pizza Bot is being invoked, but there is no text to be processed by the Pizza Bot. In such a scenario, the EIS 230 can instruct the skill bot invoker 240 that there is nothing to send.
[0082] The skillbot invoker 240 invokes a skillbot in various manners. For example, the skillbot invoker 240 can invoke a bot in response to receiving an indication 235 that a particular skillbot has been selected as a result of an explicit invocation. The indication 235 can be sent by the EIS 230 along with input for the skillbot being explicitly invoked. In this scenario, the skillbot invoker 240 hands over control of the conversation to the explicitly invoked skillbot. The explicitly invoked skillbot determines an appropriate response to the input from the EIS 230 by treating the input as a standalone utterance. For example, the response can be to perform a particular action or to start a new conversation in a particular state, where the initial state of the new conversation depends on the input sent from the EIS 230.
[0083] Another manner in which the skillbot invoker 240 can invoke a skillbot is through 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 multiple different classes, one class for each skillbot. For example, whenever a new skillbot is registered with the masterbot, a list of example utterances associated with the new skillbot can be used to train the intent classifier 242 to determine the likelihood that a particular utterance represents a task that the new skillbot can perform. Parameters (e.g., a set of values for the parameters of a machine learning model) produced as a result of this training can be stored as part of the skillbot information 254.
[0084] In one embodiment, the intent classifier 242 is implemented using a machine learning model, as described in further detail herein. Training the machine learning model may involve inputting at least a subset of utterances from example utterances associated with various skill bots and generating, as the output of the machine learning model, a guess as to which bot is the correct bot to address any particular training utterance. For each training utterance, an indication of the correct bot to use for the training utterance may be provided as ground truth information. The behavior of the machine learning model may then be adapted (e.g., through backpropagation) to minimize the difference between the guesses generated and the ground truth information.
[0085] In one embodiment, the intent classifier 242 determines a confidence score for each skill bot registered with the master bot, indicating the skill bot's likelihood of handling the utterance (e.g., an implicit invocation utterance 234 received from the EIS 230). The intent classifier 242 can 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 skill bot invoker 240 invokes the bot associated with the particular confidence score. For example, a threshold confidence score value may need to be met. Thus, the output 245 of the intent classifier 242 is either the identity of the system intent or the identity of a particular skill bot. 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 win margin. Imposing such a condition enables routing to a particular skill bot when the confidence scores of multiple skill bots each exceed the threshold confidence score value.
[0086] After a bot is identified based on the evaluation of the confidence score, the skillbot invoker 240 hands over processing to the identified bot. In the case of system intent, the identified bot is a masterbot. Otherwise, the identified bot is a skillbot. Furthermore, the skillbot invoker 240 determines what to provide as input 247 to the identified bot. As indicated above, in the case of explicit invocation, the input 247 can be based on a portion of the utterance that is not associated with the invocation, or the input 247 can be none (e.g., an empty string). In the case of implicit invocation, the input 247 can be the entire utterance.
[0087] The data store 250 includes 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 portions of an utterance that explicitly invokes a skillbot to send to the skillbot. The skillbot information 254 includes, for example, invocation names of skillbots in the chatbot system, such as a list of invocation names of all skillbots registered with a particular masterbot. The skillbot information 254 can also include information used by the intent classifier 242 to determine a confidence score for each skillbot in the chatbot system, such as, for example, parameters of a machine learning model.
[0088] 3 is a simplified block diagram of a Skillbot system 300 according to one embodiment. Skillbot system 300 is a computing system that can run solely in software, solely in hardware, or a combination of hardware and software. In one embodiment, such as the embodiment shown in FIG. 1, Skillbot system 300 can be used to run one or more Skillbots within a digital assistant.
[0089] Skillbot system 300 includes MIS 310, intent classifier 320, and conversation manager 330. MIS 310 is similar to MIS 220 of FIG. 2 and provides similar functionality, including being operable to use rules 352 in data store 350 to (1) determine whether an utterance expresses multiple intents, and if so, (2) determine how to split the utterance into separate utterances for each of the multiple intents. In one embodiment, the rules applied by MIS 310 to detect multiple intents and split the utterance are the same as those applied by MIS 220. MIS 310 receives utterance 302 and extracted information 304. Extracted information 304 is similar to extracted information 205 of FIG. 1 and can be generated using language parser 214 or a language parser local to Skillbot system 300.
[0090] The intent classifier 320 can be trained similarly 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 one embodiment, 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 example utterances associated with that particular skill bot as training utterances. The ground truth for each training utterance is the particular bot intent associated with the training utterance.
[0091] The utterance 302 can be received directly from a user or can be provided through a masterbot. For example, if the utterance 302 is provided through a masterbot as a result of processing through the MIS 220 and the EIS 230 in the embodiment shown in FIG. 2 , the MIS 310 can be bypassed to avoid repeating processing already performed by the MIS 220. On the other hand, if the utterance 302 is received directly from a user, for example, 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, such as, for example, 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 for intent classification without splitting the utterance 302.
[0092] The intent classifier 320 is configured to match an incoming utterance (e.g., utterance 306 or 308) with an intent associated with the skillbot system 300. As explained above, a skillbot can be configured with one or more intents, each including 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. While the classification performed by the intent classifier 242 is at the bot level, the classification performed by the intent classifier 320 is at the intent level and is therefore more granular. The intent classifier 320 can have access to intent information 354. For each intent associated with the skillbot system 300, the intent information 354 includes a list of utterances that represent the intent, indicate its meaning, and are typically associated with tasks that can be performed by the intent. The intent information 354 can further include parameters that result from training on this list of utterances.
[0093] 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 targeted to the system intent or the 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 the master bot for action, for example, to route it 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 begins a conversation with the user.
[0094] 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 the dialog flow of the identified intent. The state machine may include a default starting state (e.g., the intent is invoked without any additional input) and one or more additional states, each associated with 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., question, response). Thus, the conversation manager 330 can determine an action / dialog 335 upon receiving an instruction 322 identifying the intent, and can determine the additional action or dialog in response to subsequent utterances received during the conversation.
[0095] Data store 350 includes one or more computing devices that store data used by various subsystems of skillbot system 300. As shown in Figure 3, data store 350 includes rules 352 and intent information 354. In an embodiment, data store 350 can be integrated with a masterbot or digital assistant data store, such as, for example, data store 250 of Figure 2.
[0096] Training data expansion It has been discovered that NER models are typically biased toward accurately classifying entities with classes (or categories) that are over-represented (i.e., majority) in the training data used to train the NER model, rather than toward classifying entities with classes that are under-represented (i.e., minority) in the training data. When a NER model pays more attention to entity values in an input utterance that correspond to one or more over-represented classes in the training data, the classification performance of the NER model often suffers for entity values in an input utterance that correspond to one or more under-represented classes in the training data. In some cases, the NER model may misclassify these entity values (e.g., classifying London as a CURRENCY entity type instead of a LOCATION entity type). In other cases, the NER model may not even detect these entity values (e.g., not even detecting New York as an entity, let alone classifying it as a LOCATION entity type).
[0097] To overcome these problems, various embodiments are directed to techniques for adaptively augmenting training data that take into account the distribution of multiple different categories of named entities in the training data. Data augmentation is a technique that artificially increases the number of examples in the training data by generating modified training examples from existing training examples in the training data. For example, the training data includes original utterances (examples of natural language text), each of which includes at least one named entity corresponding to a named entity category. The training data can be augmented by using adaptive augmentation techniques to generate additional utterances (e.g., modified examples of natural language text) from the original utterances in the training data and combining the generated additional utterances with the original utterances to form augmented training data. The adaptive augmentation techniques described herein generate an adaptive number of augmented utterances based on the distribution of classes of named entities in the training data to ensure that sufficient utterances containing named entities corresponding to minority class entities are generated during the training data augmentation process. As a result, the distribution of named entities corresponding to each named entity class can be normalized across the training data, such that during training, the NER model is less likely to be biased toward learning entities corresponding to the majority class. The NER model can be trained using adaptively augmented training data, resulting in improved performance over NER models trained using statically augmented training data. NER models trained using adaptively augmented training data using the techniques described herein can be implemented within chatbot systems, such as those described in connection with FIGS. 1, 2, and 3. Advantageously, these models and chatbots perform better with utterances in various text formats because the models are better able to recognize and extract entities within the utterances.
[0098] 4A shows a block diagram illustrating an embodiment of an artificial intelligence modeling system 400 configured to train and serve one or more models. As shown in FIG. 4A, the modeling system in this example includes various subsystems, such as a predictive model training subsystem 402 for building and training models, an evaluation subsystem 414 for evaluating the performance of the trained models, and an implementation subsystem 412 for implementing the models as artificial intelligence-based solutions (e.g., deployed as part of one or more chatbots). The predictive model training subsystem 402 generates one or more predictive learning models 416 for use by the other subsystems. A ~416 N (where "N" represents any natural number) (which may be referred to herein individually as predictive models 416 or collectively as predictive models 416). For example, predictive models 416 may include a model for recognizing one or more entities in an utterance (e.g., NER model 426), another model for determining the likelihood that an utterance represents a task that a particular skillbot is configured to perform, another model for predicting intent from an utterance for a first type of skillbot, and another model for predicting intent from an utterance for a second type of skillbot. Still other types of predictive models may be implemented in other examples in accordance with this disclosure.
[0099] The predictive model 416 can 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, or other variants of a deep neural network (“DNN”) (e.g., a multi-label n-binary DNN classifier or a multi-class DNN classifier for single-intent classification). The predictive model 416 can also be a naive Bayes classifier, a linear classifier, a support vector machine, a bagging model such as a random forest model, a boosted neural network, or a combination of these. The predictive model 416 may also be any other suitable ML model trained for natural language processing, such as a neural network model, a shallow neural network, or a combination of one or more of such techniques, for example, a CNN-HMM or an MCNN (multi-scale convolutional neural network). The modeling system 400 may utilize the same type of predictive model 416 or a different type of predictive model 416 to recognize one or more entities in the utterance, determine the likelihood that the utterance represents a task that a particular skill bot is configured to perform, predict the intent from the utterance for a first type of skill bot, and predict the intent from the utterance for a second type of skill bot.
[0100] To train various predictive models 416, the predictive model training subsystem 402 includes four main components: a dataset preparation component 404, a hyperparameter tuning component 406, a data augmentation component 408, and a model training component 410. The dataset preparation component 404 loads data assets 418 into the predictive model training system 402, preprocesses the data assets 418, and organizes the data assets 418 into training, validation, and test sets 422 for constructing, training, and testing the predictive models 416. A ~ N(which may be referred to herein individually as sets 422 or collectively as sets 422). The division of data assets 418 into sets 422 may be performed randomly (e.g., 80 / 10 / 10% or 60 / 30 / 40%), or the division may be performed according to more complex validation techniques, such as K-fold cross-validation, leave-one-out cross-validation, leave-one-group cross-validation, nested cross-validation, etc., to minimize sampling bias and overfitting.
[0101] Each of the sets 422 may include at least a subset of utterances from example utterances associated with one or more skill bots. As indicated above, the utterances can be provided in various formats, including audio or text. The utterances can be sentence fragments, complete sentences, multiple sentences, etc. For example, if the utterances are provided as audio, the data preparation component 404 may convert the audio to text using an utterance-to-text converter (not shown) that inserts punctuation marks, such as commas, semicolons, periods, etc., 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 utterance library (e.g., identifying utterances from the library that are specific to the skill the chatbot is specified to learn). The sets 422 may include input text or audio (or input features of text or audio frames) and labels 420 corresponding to the input text or audio (or input features) as a matrix or table of values. For example, for each training utterance, the precise entities inferred by the predictive model 416 and an indication of their classification may be provided as ground truth information in the labels 420. The behavior of the predictive model 416 may then be adapted (e.g., through backpropagation) to minimize the difference between the generated inferences for various entities and the ground truth information.
[0102] The hyperparameter tuning component 406 implements a hyperparameter tuning process that selects hyperparameters for configuring the predictive model 416. Hyperparameters are settings that can be tuned or optimized to control the behavior of the predictive model 416. Most models explicitly control hyperparameters that control various aspects of the model, such as memory or execution cost. However, additional hyperparameters can be defined to adapt the model to specific scenarios. For example, additional hyperparameters may be defined to determine the rate for adaptively augmenting training data, the number of hidden units or layers in the model, the learning rate of the model, the convolution kernel width, and / or the number of parameters in the model. The hyperparameter tuning process operates by identifying N hyperparameter sets (e.g., via hyperparameter search techniques such as grid search, Bayesian optimization, etc.) and configuring N model instances with the N hyperparameter sets, where each model instance is configured with one of the N hyperparameter sets. The hyperparameter tuning process continues by training each model instance using a training data set extracted from set 422 (e.g., a validation set of training data), inputting test data extracted from set 422 (e.g., a test set of training data) to each model instance, generating predictions for the test data using each model instance, and evaluating the performance of each model instance by comparing the predictions generated by each instance to the labels in the respective training data sets used to train each instance of the model (e.g., k-fold cross-validation).The hyperparameter tuning process continues by determining the hyperparameter set among the N hyperparameter sets that resulted in the best-performing model instance among all model instances (i.e., the model that predicted the training data label for each instance with the greatest accuracy among the model instances) and configuring the model using the determined hyperparameter set. Model accuracy can be expressed as a common numerical metric that can be maximized or minimized according to the user's preference. The search for the hyperparameter set that maximizes or minimizes the metric can be monotonic, so search algorithms such as grid search and random search may be used. Grid search picks a grid of hyperparameter values and evaluates them all. Trial and error is required to determine the minimum and maximum values of each hyperparameter. Random search randomly evaluates a random sample of points on the grid. Smart hyperparameter tuning picks a few hyperparameter settings, evaluates the validation metric, adjusts the hyperparameters, and reevaluates the validation metric. Examples of smart hyperparameter tuning are Spearmint (hyperparameter optimization using Gaussian processes) and Hyperopt (hyperparameter optimization using a tree-based estimator).
[0103] The data augmentation component 408 augments the training data to artificially increase the amount of training data. In some cases, the data augmentation component 408 generates new data examples from existing data examples (e.g., by combining examples with minor variations with existing data examples) to increase the amount of training data and trains the predictive model 416 using the augmented training data. Data augmentation reduces overfitting (and improves generalization) of the predictive model 416 (e.g., making the predictive model 416 more resilient to utterances with entity variants and new and undiscovered entities). Moreover, by training the predictive model 416 using the augmented training data, the predictive model 416 better considers context in detecting and classifying entities in the utterance, even when the named entities in the utterance do not match the named entities in the training data. Additionally, the predictive model 416 can learn to detect and classify entities in the utterance even when the entities in the utterance contain typos and / or have their spellings changed in other ways.
[0104] Additional utterances are generated from utterances in the training data by replacing named entities in the utterance with different named entities, such as those selected from a gazetteer. Template utterances can be generated by removing named entities from the utterance, and additional utterances can be generated by populating the template utterance with named entities selected from a gazetteer that differ from the named entities in the utterance. The populated template utterances can be combined with the utterance to form augmented training data that is then used to train the predictive model 416. A detailed description of generating additional utterances using a gazetteer is provided in commonly owned U.S. patent application Ser. No. 18 / 185,675, filed March 17, 2023, which is incorporated herein by reference in its entirety.
[0105] The template utterances and additional utterances are generated using an adaptive expansion technique, which generates an adaptive number of utterances based on the distribution of named entity categories in the training data to ensure that sufficient utterances are generated that include named entities corresponding to minority class entities generated during the training data expansion process, as described in more detail below. As a result, the distribution of named entities corresponding to each named entity category can be normalized across the training data, such that during training, the predictive model 416 is less likely to be biased toward learning entities corresponding to the majority class.
[0106] The model training component 410 selects model parameters (e.g., weights and / or biases) for the predictive model 416 and trains the predictive model 416 by inputting utterances from the augmented training data to the predictive model 416 and performing an iterative operation to find a set of model parameters (e.g., weights and / or biases) that maximizes or minimizes an objective function (e.g., minimizes a loss function of the predictive model 416). The objective function can be constructed to measure the difference between the output predicted using the predictive model 416 and ground truth annotated to the samples using labels 420. For example, for a supervised learning-based model, the training goal is to learn a function “h( )” (sometimes referred to as an assumption function) that maps the training input space X to the target value space Y such that h(x) can successfully predict the corresponding value of y (h:X → Y). A variety of different techniques may be used to learn this assumption function. In some techniques, an objective function that measures the difference between the ground truth value of an input and the predicted value for that input may be defined as part of deriving the assumption function. As part of training, techniques such as backpropagation, random feedback, direct feedback alignment (DFA), indirect feedback alignment (IFA), Hebbian learning, Adam optimization, etc. are used to update the model parameters to minimize or maximize this objective function.
[0107] Once the set of model parameters has been identified (i.e., once the predictive model 416 has been trained), the predictive model 416 can be tested or validated using test / validation data extracted from set 422. The testing or validation process involves iterative operations of inputting utterances from the test / validation data into the predictive model 416 and evaluating the performance of the predictive model 416 using validation techniques such as k-fold cross-validation, leave-one-out cross-validation, leave-one-out group cross-validation, nested cross-validation, etc. The predictions (e.g., one or more classified named entities) generated by the predictive model 416 can be evaluated by comparing the predictions to ground truth named entities using correlation techniques such as the Bland-Altman method and Spearman rank correlation coefficient. Additionally, performance metrics 428, such as error, accuracy, precision, recall, receiver operating characteristic curves (ROC), etc., may be calculated by the evaluation subsystem 414. The performance metrics 428 can be used by the evaluation subsystem 414 to analyze the performance of the predictive model 416 for classifying named entities.
[0108] Once tested and / or validated, the predictive model 416 may be output or deployed. For example, the predictive model training subsystem 402 may output or deploy the NER model 426. The NER model 426 may be output or deployed to the predictive model training subsystem 402 and / or to an implementation subsystem 412 that implements an artificial intelligence-based solution, such as a chatbot, for use therein. For example, a chatbot may use the NER model 426 to predict (i.e., identify and classify) named entities 430 in input utterances 424 received by the chatbot and use the predicted named entities 430 in downstream processing, such as dialog building, data retrieval, intent classification, skill bot invocation, etc. In another example, the predicted named entities 430 may be used to further train the NER model 426 and / or other predictive models 416.
[0109] Although not explicitly shown, it will be appreciated that modeling system 400 can further include a developer device associated with a developer. Communications from the developer device to components of modeling system 400 can dictate the type of input data, utterances, and / or database schema to be used for the models, the number and type of models to be used, the hyperparameters of each model, e.g., learning rate and number of hidden layers, how data requests are formatted, what training data should be used (e.g., and how to obtain access to the training data), and what validation techniques should be used, and / or how the controller process should be configured.
[0110] Adaptive Scaling Techniques and Rates As described above, intent prediction and entity extraction help chatbot systems understand user queries and utterances related to the domain of a given service or set of services. Intent prediction determines the purpose (i.e., intent) of a user query or utterance. Entity extraction determines one or more entities (i.e., constraints), if any, of a user query or utterance. For example, for a user question about "the weather on Wednesday in the Poconos," intent prediction determines that the user's intent is to learn about "weather," and entity extraction determines that "Wednesday" and "Poconos" are entities that center the user's intent on a specific day and geographic location. Entity detection and classification can be achieved using an NER model. Each instance of a named entity in a user utterance can be assigned an entity label. In some examples, a named entity can correspond to a named entity category such as a place, an organization, a time, a person, etc. For a given utterance, words in the utterance that refer to entities within a category of entities can be labeled with a label that identifies the category. For example, for the utterance "My name is Jane Doe," the word "Jane Doe" can be detected and classified as corresponding to a person, along with a label that identifies the category into which they have been classified (e.g., [ PER Jane Doe]. Because the words "My name is" are contextual, they are not detected and classified as named entities, and a label identifying them as named entities is not assigned to them. In another example, for the utterance "What is the weather in Paris," the word "Paris" is detected and classified as corresponding to a location, and "[LOC An utterance may contain named entities that belong to multiple different named entity categories, and each named entity in the utterance may be detected, classified according to its named entity category, and labeled with a label that identifies its respective category. For example, for the utterance "Her name is Jane Doe and she lives in Paris," the word "Jane Doe" may be detected and classified, and [ PER Jane Doe], the word "Paris" can be detected and classified, and LOC Paris].
[0111] To predict class labels representing named entities, NER models are typically trained using training data that includes all categories of entities desired to be classified. For example, for an NER model to detect and classify the word "Jane Doe" as a named entity corresponding to a person and the word "Paris" as a named entity corresponding to a place, the NER model needs to be trained using training data that incorporates named entities in the people category of named entities and named entities in the places category of named entities. Training data is typically obtained from publicly or privately pre-labeled datasets. Several datasets are available for training purposes, including text with labeled named entities corresponding to people, places, organizations, and names of miscellaneous entities that do not belong to the preceding three groups. One example of a publicly available dataset from which training data can be obtained is the CoNLL-2003 dataset. Additional information about the CoNLL-2003 dataset can be found in "Introduction to the CoNLL-2003 Shared Task: Language-Independent Named Entity Recognition," Sang et al., published in arXiv preprint cs / 0306050 (2003), the entire contents of which are incorporated herein by reference as if fully set forth herein.
[0112] However, a problem with public or private pre-labeled datasets is that they do not contain pre-labeled data diverse enough to train models to detect entities with all kinds of contexts and entity value variants (currency types, number formats, date time formats, different spelling conventions, etc.). Thus, NER models trained using these and other similar pre-labeled datasets typically learn to focus on the named entity values for which they were trained, while ignoring contextual information. As a result, NER models have difficulty identifying and labeling named entities that the NER model was not specifically trained to identify and label (i.e., named entities not present in the training data and / or that are differently spelled, misspelled, varied, etc.). Additionally, these datasets typically have an unbalanced representation of multiple different entity classes, resulting in some entity classes being over-represented and some entity classes being under-represented in the dataset. As a result, NER models trained using these datasets are usually biased toward learning majority-class entities and often misclassify minority-class entities.
[0113] Previous attempts to address this problem have included generating customized labeled datasets (e.g., by crowdworkers) or users or customers of the NER model, but generating these customized labeled datasets utilizes significant resources (e.g., human time and financial resources). Other previous attempts to address this problem have included automatically generating additional utterances by replacing entities in the utterance with other entities selected from an entity source such as a gazetteer. However, adding a static number of augmented utterances under this approach can further skew the dataset toward majority class entities represented in the dataset, thereby adversely affecting the performance of the NER model with respect to minority class entities represented in the dataset. To overcome these and other challenges, the techniques described herein utilize adaptive augmentation techniques that take into account the distribution of multiple different entity types in the training data. The adaptive augmentation technique generates an adaptive number of augmented utterances based on the distribution of entities to ensure that a sufficient number of utterances containing minority class entities are generated during training data augmentation.
[0114] The process for adaptively expanding training data begins by accessing training data including utterances. The training data may be accessed from a database (not shown) that stores training data for training a predictive model. The utterances in the training data may be referred to as original utterances. Each original utterance may include one or more named entities corresponding to one or more named entity categories in a set of named entity categories. In some embodiments, the set of named entity categories may correspond to default or system named entities (e.g., PERSON, NUMBER, CURRENCY, DATE_TIME). In other embodiments, the set of named entity categories may be defined by a user, customer, developer, etc. of the NER model. Each named entity in the utterance may include a label indicating the category to which the named entity belongs. Each category in the set of named entity categories may be associated with a different label. For example, the person named entity category may be [PER ] label, and the location named entity category is [ LOC ]. Each utterance in the training data may also include contextual information before and / or after one or more named entities in the utterance. For example, the utterance "His name is [ PER John Doe](His name is [ PER For "His name is John Doe," the "His name is" part of the utterance is handled by the named entity [ PER The contextual information preceding [John Doe]. Training data can be accessed from one or more public or private pre-labeled datasets, such as the CoNLL-2003 dataset mentioned above.
[0115] The process for adaptively expanding the training data continues by determining, for each named entity category represented in the training data, the rate at which original utterances in the training data containing those named entity categories should be expanded (sometimes referred to herein as the expansion rate). The expansion rate specifies the number of additional instances of each named entity category represented in the training data that should be included in the training data to balance the distribution of named entity categories in the training data. For example, for named entity categories [PER ] occurs 75 times, and the named entity category [ LOC ] occurs 72 times, and the named entity category [ DATE_TIME ] occurs 29 times, and the named entity category [ CURRENCY ] occurs 21 times, and the named entity category [ MERCHANT For training data containing 100 utterances in which [ ] occurs 68 times, the expansion factor for each named entity category can dictate the number of additional instances of each named entity category that should be included in the training data to balance the distribution of named entity categories.
[0116] The expansion rate for each named entity category can be calculated by the hyperparameter tuning component 406. The hyperparameter tuning component 406 can calculate the expansion rate for each named entity category by selecting, for each named entity category, one function for calculating the expansion rate from among multiple functions for calculating the expansion rate, and calculating the expansion rate for each named entity category using the selected function based on the distribution of the respective named entity category in the training data. The multiple functions for calculating the expansion rate can include a first function and a second function. The first function can calculate the expansion rate for the given named entity category based on a normalized distribution value for the given named entity category and an exponential function (exp_beta_norm) that receives a beta value (beta_value) as input. An example of the first function is exp_beta_norm: lamba: np.array([math.exp( v / sum_dist_entities * beta value) for v in dist_entities.values()]). The normalized distribution value for a given named entity category can be calculated by counting the number of occurrences (dist_entities) of the given named entity category that occur in the training data, summing the number of occurrences of all named entity categories that occur in the training data (sum_dist_entities), and dividing the dist_entities of the given named entity category by the sum_dist_entities of all named entity categories that occur in the training data. The beta value can be selected from a range of values, such as [-1.0, 1.0]. A second function can calculate the expansion rate of the given named entity category based on a binary logarithm function that takes the dist_entities of the given named entity category as input.An example of the second function is log2_norm: lamba: np.array([math.log2(v) for v in dist_entities.values()]).
[0117] As described above, the hyperparameter tuning component 406 defines hyperparameters that can be selected through a hyperparameter tuning process that determines hyperparameters for configuring the NER model 426. The hyperparameter tuning component 406 can define a function selection hyperparameter (approach_select) for selecting a function for calculating an expansion rate from among multiple functions for calculating an expansion rate. For example, using the approach_select hyperparameter (approach_select = {first function, second function, ...), the hyperparameter tuning component 406 can select a function for calculating an expansion rate from among multiple functions for calculating an expansion rate during the hyperparameter tuning process. The hyperparameter tuning component 406 can also define a beta value selection hyperparameter for selecting a beta_value during the hyperparameter tuning process. The function selection hyperparameter and the beta value selection hyperparameter can be among the N hyperparameter sets identified using the hyperparameter search technique. For each hyperparameter set of the N hyperparameter sets, the training data used to train the respective model instance can be expanded according to an expansion rate calculated based on the respective hyperparameter set. In this way, during the hyperparameter tuning process, the expansion rate of the named entity categories in the training data can be determined based on which expansion rate results in the best performing model among the instances of the model constructed during the hyperparameter tuning process.
[0118] The process for adaptively expanding the training data continues by generating additional utterances that can be combined with the original utterances in the training data to form the expanded training data. The additional utterances can be generated at an expansion rate for each named entity category calculated by the hyperparameter tuning component 406. To generate the additional utterances for each named entity category, the original utterances in the training data that include at least one instance of each named entity category can be converted into template utterances that can be populated with selected named entities that have the same named entity category as the respective named entity category. The expansion rate for each named entity category can determine the number of template utterances required to balance the training data for each named entity category. The named entities for populating the templates can be selected from a named entity source, such as a gazetteer. The original utterances in the training data can be converted into template utterances by removing one or more named entities from the original utterances and inserting placeholder identifiers for each of the removed named entities. A placeholder identifier can represent a named entity category of the named entity into which the placeholder identifier is inserted or removed. For example, in the original utterance "My name is [ PER My name is Jane Doe PER Jane Doe])" is converted to the template utterance "My name is [ PER ](My name is [ PER ]), where the named entity [Jane Doe] corresponds to a person, so the named entity [ PER] placeholder identifiers are inserted into the original utterance. The template utterance can be populated with one or more named entities selected from one or more entity sources by replacing each placeholder identifier in the template utterance with a selected named entity that corresponds to the named entity category of the placeholder identifier. For example, continuing the example above, the template utterance "My name is [ PER To populate "]", use the placeholder identifier [ PER ] is replaced with a named entity selected from a gazetteer that includes people entities (e.g., GZ[ PER ]: {[Jane Doe]; [Jae Doe]; [Jane Do]; [Janes Doey]; …). Once the template utterances are populated, the generated additional utterances are added to the original utterances in the training data to form the augmented training data.
[0119] NER model As described above with respect to FIG. 4A , the predictive model training subsystem 402 outputs a trained model, including a NER model 426, trained using the augmented training data. The NER model 426 can be implemented within a system or artificial intelligence-based solution, such as a chatbot system. A simplified block diagram of a system 470 in which the trained NER model 472 can be implemented is shown in FIG. 4B . As shown in FIG. 4B , the system 470 can include the trained NER model 472. Using the trained NER model 472, the system 470 receives an input utterance 480 (e.g., "My name is John and I live in Texas") and generates an output utterance 490 that includes the input utterance 480 labeled with labels that identify named entities in the input utterance 480 and categories to which the identified named entities belong (e.g., "My name is [ PER John] and I live in [LOCATION Texas](My name is [ PER John] and I [ LOCATION I live in Texas.
[0120] The trained NER model 472 can be based on a transformer-based model, such as a bidirectional encoder representation from transformer (BERT) model. In some embodiments, the trained NER model 472 can include a BERT layer 474, a convolutional neural network / bidirectional long-short-term memory (CNN / BiLSTM) layer 476, and a conditional random field (CRF) layer 478.
[0121] BERT layer 474 may include an algorithm that accepts as input a sequence of words of an utterance, such as input utterance 480, and generates feature vectors or word embeddings for the words of the sequence. In some implementations, BERT layer 474 includes a transform layer that includes an encoder (e.g., an attention mechanism and a feedforward network). The attention mechanism can generate attention scores for the words of the sequence, and the feedforward network can encode the words of the sequence into word embeddings based on the attention scores.
[0122] The CNN / BiLSTM layer 476 may include an algorithm that accepts word embeddings from the BERT layer 474 and generates sentence or string embeddings for the word sequence. The CNN portion may accept the word embeddings from the BERT layer 474 and generate character-level vector representations for each character of each word in the sequence, and the BiLSTM portion may accept the word embeddings from the BERT layer 474 and the character-level vector representations from the CNN portion and generate sentence or string embeddings for the word sequence.
[0123] The CRF layer 478 may include algorithms that accept sentence or string embeddings as input, detect whether words in a word sequence are named entities, and classify the detected named entities as the type of named entity to which they belong. In some implementations, the CRF layer 478 may output the classified detected named entities and an identifier that identifies the word in the word sequence to which the detected named entity corresponds.
[0124] In some embodiments, system 470 can receive detected named entities and identifiers from NER model 472 and generate output utterances, such as output utterance 490, labeled with the named entities contained therein (e.g., My name is [ PER John] and I live in [ LOCATION Texas). System 470 can use labeled output utterances 490 to perform operations such as querying a database, generating a response, and displaying the generated response on a display device of system 470 or a client device (not shown). Using the training data augmentation techniques described herein, NER model 472 can accurately identify named entities in input utterances, thereby enabling system 470 to generate improved responses as well as improve performance in other functions (e.g., language understanding).
[0125] The described structure, operation, functions, and advantages of system 470 and NER model 472 are not intended to be limiting, and other structures, operations, functions, and advantages are possible and included herein. Furthermore, although not explicitly shown, it will be appreciated that system 470 can further include a developer device associated with the developer. Communications from the developer device to components of system 470 can indicate the type of input data and / or utterances to be used for the models, the number and type of models to be used, the hyperparameters of each model, e.g., learning rate and number of hidden layers, how data requests are formatted, what training data should be used (e.g., and how to gain access to the training data), and what validation techniques should be used, and / or how the controller process should be configured.
[0126] Exemplary Methods FIG. 5A is a flow diagram illustrating an example process 500 for adaptively augmenting training data according to an embodiment. The process illustrated in FIG. 5A 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 on a non-transitory storage medium (e.g., on a memory device). The method presented in FIG. 5A and described below is intended to be exemplary and non-limiting. While FIG. 5A depicts various processing steps occurring in a particular sequence or order, this is not intended to be limiting. In an alternative embodiment, steps may be performed in some different order, or some steps may also be performed in parallel. In an embodiment, such as the embodiment illustrated in FIGS. 1-4B, the process illustrated in FIG. 5A may be performed by a preprocessing subsystem (e.g., preprocessing subsystem 210 or predictive model training subsystem 402) to generate augmented training data for training an NER model.
[0127] At block 502, training data is accessed. The training data may be accessed from a database that stores training data for training a predictive model. The utterances in the training data may be referred to as original utterances. Each original utterance may include one or more named entities corresponding to one or more named entity categories in a set of named entity categories. In some embodiments, the set of named entity categories may correspond to default or system named entities (e.g., PERSON, NUMBER, CURRENCY, DATE_TIME). In other embodiments, the set of named entity categories may be defined by a user, customer, developer, etc. of the NER model. Each named entity in the utterance may include a label indicating the category to which the named entity belongs. Each category in the set of named entity categories may be associated with a different label. For example, the person named entity category may be [ PER ] label, and the location named entity category is [ LOC ]. Each utterance in the training data may also include contextual information before and / or after one or more named entities in the utterance. For example, the utterance "His name is [ PER John Doe](His name is [ PER For "His name is John Doe," the "His name is" part of the utterance is handled by the named entity [ PER The contextual information preceding [John Doe]. Training data can be accessed from one or more public or private pre-labeled datasets, such as the CoNLL-2003 dataset mentioned above.
[0128] At block 504, a hyperparameter tuning process is performed to calculate an expansion rate. The expansion rate may be calculated for each named entity category represented in the training data and may be the rate at which original utterances in the training data containing those named entity categories should be expanded. The expansion rate may specify the number of additional instances of each named entity category represented in the training data that should be included in the training data to balance the distribution of named entity categories in the training data. For example, if a named entity category [ PER ] occurs 75 times, and the named entity category [ LOC ] occurs 72 times, and the named entity category [ DATE_TIME ] occurs 29 times, and the named entity category [ CURRENCY ] occurs 21 times, and the named entity category [ MERCHANT For training data containing 100 utterances in which [ ] occurs 68 times, the expansion factor for each named entity category can dictate the number of additional instances of each named entity category that should be included in the training data to balance the distribution of named entity categories.
[0129] The expansion rate of each named entity category can be calculated by performing a hyperparameter tuning process. The hyperparameter tuning process can calculate the expansion rate of each named entity category by selecting, for each named entity category, one function for calculating the expansion rate from among multiple functions for calculating the expansion rate, and calculating the expansion rate of each named entity category using the selected function based on the distribution of each named entity category in the training data. The multiple functions for calculating the expansion rate can include a first function and a second function. The first function can calculate the expansion rate of the given named entity category based on a normalized distribution value of the given named entity category and an exponential function (exp_beta_norm) that receives a beta value (beta_value) as input. An example of the first function is exp_beta_norm: lamba: np.array([math.exp( v / sum_dist_entities * beta value) for v in dist_entities.values()]). The normalized distribution value for a given named entity category can be calculated by counting the number of occurrences (dist_entities) of the given named entity category that occur in the training data, summing the number of occurrences of all named entity categories that occur in the training data (sum_dist_entities), and dividing the dist_entities of the given named entity category by the sum_dist_entities of all named entity categories that occur in the training data. The beta value can be selected from a range of values, such as [-1.0, 1.0]. A second function can calculate the expansion rate of the given named entity category based on a binary logarithm function that takes the dist_entities of the given named entity category as input.An example of the second function is log2_norm: lamba: np.array([math.log2(v) for v in dist_entities.values()]).
[0130] Hyperparameters that can be selected through the hyperparameter tuning process can be defined. The hyperparameter tuning process can define a function selection hyperparameter (approach_select) for selecting a function for calculating an expansion rate from among multiple functions for calculating an expansion rate. For example, using the approach_select hyperparameter (approach_select = {first function, second function, ...), the hyperparameter tuning process can select a function for calculating an expansion rate from among multiple functions for calculating an expansion rate during the hyperparameter tuning process. The hyperparameter tuning process can also define a beta value selection hyperparameter for selecting a beta_value during the hyperparameter tuning process. The function selection hyperparameter and the beta value selection hyperparameter can be among the N hyperparameter sets identified using the hyperparameter search technique. For each hyperparameter set of the N hyperparameter sets, the training data used to train each model instance can be expanded according to an expansion rate calculated based on the respective hyperparameter set. In this way, during the hyperparameter tuning process, the expansion rate for named entity categories in the training data can be determined based on which expansion rate results in the best-performing model among the instances of the model configured during the hyperparameter tuning process.
[0131] At block 508, additional utterances are generated based on the calculated expansion rate. The additional utterances can be generated at the expansion rate for each named entity category calculated during the hyperparameter tuning process. To generate the additional utterances for each named entity category, original utterances in the training data that include at least one instance of each named entity category can be converted into template utterances that can be populated with selected named entities that have the same named entity category as the respective named entity category. The expansion rate for each named entity category can determine the number of template utterances needed to balance the training data for each named entity category. The named entities for populating the templates can be selected from a named entity source, such as a gazetteer. The original utterances in the training data can be converted into template utterances by removing one or more named entities from the original utterance and inserting a placeholder identifier for each of the removed named entities. The placeholder identifier can represent the named entity category of the removed named entity into which the placeholder identifier is inserted. For example, the original utterance "My name is [ PER My name is Jane Doe PER Jane Doe])" is converted to the template utterance "My name is [ PER ](My name is [ PER ]), where the named entity [Jane Doe] corresponds to a person, so the named entity [ PER] placeholder identifiers are inserted into the original utterance. The template utterance can be populated with one or more named entities selected from one or more entity sources by replacing each placeholder identifier in the template utterance with a selected named entity that corresponds to the named entity category of the placeholder identifier. For example, continuing the example above, the template utterance "My name is [ PER To populate "]", use the placeholder identifier [ PER ] is replaced with a named entity selected from a gazetteer that includes people entities (e.g., GZ[ PER ]: {[Jane Doe]; [Jae Doe]; [Jane Do]; [Janes Doey]; …).
[0132] The training data is augmented to form augmented training data at block 510. The training data is augmented by adding the generated additional utterances to the original utterances in the training data.
[0133] FIG. 5B is a flow diagram illustrating an example process 550 for providing a NER model according to an embodiment. The process illustrated in FIG. 5B 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 on a non-transitory storage medium (e.g., on a memory device). The method presented in FIG. 5B and described below is intended to be exemplary and non-limiting. While FIG. 5B depicts various processing steps occurring in a particular sequence or order, this is not intended to be limiting. In an alternative embodiment, steps may be performed in some different order, or some steps may also be performed in parallel. In an embodiment, such as the embodiment illustrated in FIGS. 1-4B, the process illustrated in FIG. 5B may be performed by processing subsystems (e.g., predictive model training subsystem 402, evaluation subsystem 414, and / or implementation subsystem 412) for training a NER model using augmented training data and deploying the trained NER model.
[0134] At block 552, the NER model is trained. The NER model can be trained using training data that has been obtained and / or augmented as described above. Training the NER model involves selecting model parameters for the NER model, inputting utterances from the augmented training data into the NER model, and performing iterative operations to find a set of model parameters (e.g., weights and / or biases) that maximize or minimize an objective function of the NER model, e.g., minimize a loss function. Each training iteration may involve finding a set of model parameters for the NER model such that the value of the objective function using the set of model parameters is smaller than the value of the objective function using a different set of model parameters in the previous iteration. The objective function can be constructed to measure the difference between the output predicted using the NER model and the augmented training data using labels. Once the set of model parameters is identified, the NER model can be tested or validated using a subset of test data (a test or validation dataset). The testing or validation process includes iterative operations of inputting utterances from the subset of test data into the NER model using a validation technique such as k-fold cross-validation, leave-one-out cross-validation, leave-one-group cross-validation, nested cross-validation, etc. Once an optimal set of model parameters is obtained, a reserved test set from a subset of the test data can be input into the NER model to obtain an output (in this example, one or more recognized entities), which can be evaluated against the ground truth entities using correlation techniques such as the Bland-Altman method and the Spearman rank correlation coefficient. Additionally, performance metrics such as error, accuracy, precision, recall, receiver operating characteristic curves (ROC), etc. can be calculated. The performance metrics can be used to analyze the performance of the NER model.
[0135] At block 554, a trained NER model is provided. The NER model can be provided to or deployed or implemented in a system or artificial intelligence-based solution, such as a chatbot system. For example, the trained NER model may be deployed in a chatbot system (e.g., as part of a skillbot) to recognize one or more entities within an utterance in various languages and / or text formats. In some cases, an utterance may be received (e.g., by a skillbot), the utterance may be tokenized into tokens, and the utterance and tokens may be analyzed by the trained NER model to predict class labels for the tokens. In some cases, the tokens are recognized as named entities, and the predicted class labels represent the named entities. Using the trained NER model, the system can receive an input utterance and generate an output utterance that includes the input utterance labeled with named entities in the input utterance and predicted class labels that identify the classes to which the identified named entities belong. The system may use the labeled output utterance to perform operations such as querying a database (e.g., retrieving information related to the token based on the predicted class label and / or the value of the named entity), generating a response (e.g., generating a dialog with a user based on the predicted class label and / or the value of the named entity), displaying the labeled output utterance and / or the generated response on a display device of the system or client device (not shown), or any combination thereof.
[0136] Exemplary System 6 shows a simplified diagram of 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 can be configured to run one or more applications.
[0137] In various examples, server 612 can be adapted to run one or more services or software applications that enable one or more embodiments described in this disclosure. In certain examples, server 612 can also provide other services or software applications, which may include non-virtual and virtual environments. In some examples, these services can be provided to users of client computing devices 602, 604, 606, and / or 608 as web-based or cloud services, such as based on a software-as-a-service (SaaS) model. Users operating client computing devices 602, 604, 606, and / or 608 can then utilize one or more client applications to interact with server 612 and utilize the services provided by these components.
[0138] 6, server 612 may include one or more components 618, 620, and 622 that perform 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 appreciated that a variety of different system configurations are possible that may differ from distributed system 600. Thus, the example shown in FIG. 6 is one example of a distributed system for implementing an exemplary system and is not intended to be limiting.
[0139] A user may use client computing devices 602, 604, 606, and / or 608 to execute one or more applications, models, or chatbots that may generate one or more events or models that may then be executed or serviced in accordance with 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 through this interface. While FIG. 6 shows only four client computing devices, any number of client computing devices may be supported.
[0140] 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, sensors or other sensing devices, etc. 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), including various mobile operating systems (e.g., Microsoft Windows Mobile®, iOS®, Windows Phone®, Android™, BlackBerry®, Palm OS®). 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 handheld gaming devices, Internet-enabled gaming devices (e.g., Microsoft Xbox® gaming consoles with or without Kinect® gesture input devices, Sony PlayStation® systems, various gaming systems offered by Nintendo®, etc.), 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.
[0141] Network 610 may be any type of network familiar to those skilled in the art that is capable of supporting 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, network 610 may be a local area network (LAN), an Ethernet-based network, a Token-Ring, 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 according to any of the Institute of Electrical and Electronics Engineers (IEEE) 1002.11 protocol suite, Bluetooth®, and / or any other wireless protocol), and / or any combination of these and / or other networks.
[0142] Servers 612 may be comprised of one or more general-purpose computers, specialized server computers (including, by way of example, PC (personal computer) servers, UNIX servers, midrange servers, mainframe computers, rack-mounted servers, etc.), server farms, server clusters, or any other suitable configuration and / or combination. Servers 612 may include one or more virtual machines running a virtual operating system or other computing architectures involving virtualization, such as an elastic pool of one or more logical storage devices that can be virtualized to maintain virtual storage devices for the servers. In various examples, servers 612 can be adapted to run one or more services or software applications that provide the functionality described in the foregoing disclosure.
[0143] The computing systems within server 612 may run one or more operating systems, including any of those described above, as well as any commercially available server operating system. Server 612 may also run any of a variety of additional server and / or middle-tier applications, including an HTTP (Hypertext Transfer Protocol) server, an FTP (File Transfer Protocol) server, a CGI (Common Gateway Interface) server, a JAVA server, a database server, etc. Exemplary database servers include, without limitation, those commercially available from Oracle®, Microsoft®, Sybase®, IBM® (International Business Machines), etc.
[0144] In some embodiments, server 612 may include one or more applications for analyzing and consolidating data feeds and / or event updates received from users of client computing devices 602, 604, 606, and 608. By way of example, the data feeds and / or event updates may include real-time updates received from one or more third-party sources and continuous data streams, which may include, without limitation, Twitter® feeds, Facebook® updates, or real-time events related to sensor data applications, financial tickers, network performance measurement tools (e.g., network monitoring and traffic management applications), clickstream analysis tools, automobile traffic monitoring, etc. 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 client computing devices 602, 604, 606, and 608.
[0145] The distributed system 600 may also include one or more data repositories 614, 616. These data repositories, in certain examples, may be used to store data and other information. For example, one or more of the data repositories 614, 616 may be used to store information related to chatbot performance or information such as generated models for use by a 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 communicate with the server 612 via a network-based or dedicated connection. The data repositories 614, 616 may be of different types. In one example, the data repository used by the server 612 may be a database, such as a relational database, such as databases provided by Oracle Corporation® and other suppliers. One or more of these databases may be adapted to allow storage, updating, and retrieval of data in response to SQL-formatted commands.
[0146] In some examples, one or more of the data repositories 614, 616 may also be used by an application to store application data. The data repositories used by the application may be of various types, such as, for example, a key-value store repository, an object store repository, or a general storage repository backed by a file system.
[0147] In some 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 some 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 users using one or more client computing devices 704, 706, and 708. The cloud infrastructure system 702 may comprise one or more computers and / or servers, which may include those described above for server 612. The computers in the cloud infrastructure system 702 may be organized as general-purpose computers, specialized server computers, server farms, server clusters, or any other suitable configuration and / or combination.
[0148] Network 710 can facilitate communication and the exchange of data between clients 704, 706, and 708 and cloud infrastructure system 702. Network 710 may include one or more networks. The networks may be of the same or different types. Network 710 can support one or more communication protocols, including wired and / or wireless protocols, to facilitate communication.
[0149] 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 appreciated 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 shows three client computing devices, in alternative examples, any number of client computing devices may be supported.
[0150] The term cloud service is generally used to refer to services made available to users on demand and over a communications network, such as the Internet, by a service provider's system (e.g., cloud infrastructure system 702). Typically, 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-premises servers and systems. The cloud service provider's system is managed by the cloud service provider. Thus, customers can use cloud services provided by the cloud service provider without having to purchase separate 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 as needed 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, several cloud services, such as middleware services, database services, Java cloud services, etc., are offered by Oracle Corporation®, located in Redwood Shores, California.
[0151] In one example, cloud infrastructure system 702 can provide one or more cloud services using various models, such as a Software as a Service (SaaS) model, a Platform as a Service (PaaS) model, an Infrastructure as a Service (IaaS) model, etc., including hybrid service models. Cloud infrastructure system 702 may include a set of applications, middleware, databases, and other resources that enable the provision of various cloud services.
[0152] The SaaS model allows applications or software to be delivered 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 can be used to provide customers with access to on-demand applications hosted by cloud infrastructure system 702. Examples of SaaS services offered by Oracle Corporation® include, but are not limited to, various services for human resource / capital management, customer relationship management (CRM), enterprise resource planning (ERP), supply chain management (SCM), enterprise performance management (EPM), analytical services, social applications, etc.
[0153] The IaaS model is generally used to provide infrastructure resources (e.g., servers, storage, hardware, and networking resources) as cloud services to customers to provide elastic computing and storage capabilities. Various IaaS services are offered by Oracle Corporation.
[0154] The PaaS model is generally used to provide platform and environment resources as a service, allowing customers to develop, run, and manage applications and services without the customer having to acquire, build, or maintain such resources. Examples of PaaS services offered by Oracle Corporation® include, but are not limited to, Oracle Java Cloud Services (JCS), Oracle Database Cloud Services (DBCS), data management cloud services, various application development solution services, etc.
[0155] Cloud services are generally provided in an on-demand, self-service manner, on a subscription basis, elastically scalable, highly reliable, highly available, and secure. 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 performs 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 an action (e.g., an intent), as described above, and / or provide the services of a chatbot system as described herein. Cloud infrastructure system 702 may be configured to provide one or even more cloud services.
[0156] Cloud infrastructure system 702 can provide cloud services through several 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 are offered to any public customer, where the customer may be an individual or a business. In another example, under a private cloud model, cloud infrastructure system 702 may operate within an organization (e.g., within a corporate organization) and services offered to customers within the organization. For example, customers may be various departments of a company, such as a human resources department, a payroll department, etc., or even individuals within the company. In another example, under a community cloud model, cloud infrastructure system 702 and the services offered may be shared by several organizations within an associated community. Various other models, such as hybrids of the above models, may also be used.
[0157] Client computing devices 704, 706, and 708 may be of different types (e.g., client computing devices 602, 604, 606, and 608 shown in FIG. 6 ) and may be capable of running one or more client applications. Users may use the client devices to interact with cloud infrastructure system 702, such as to request services provided by cloud infrastructure system 702. For example, users may use client devices to request information or actions from a chatbot, as described in this disclosure.
[0158] In some examples, the processing performed by cloud infrastructure system 702 to provide services may involve model training and deployment. This analysis may involve using, analyzing, and manipulating datasets to train and deploy one or more models. This analysis may be performed by one or more processors, possibly processing the data in parallel, performing 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)).
[0159] 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, networking resources, etc. In one example, a storage virtual machine available to service storage requested by an application may be part of cloud infrastructure system 702. In other examples, the storage virtual machine may be part of a different system.
[0160] In one example, to facilitate efficient provisioning of these resources to support various cloud services offered by cloud infrastructure system 702 to different customers, resources can be bundled into sets of resources or resource modules (also referred to as “pods”). Each resource module or pod may include a pre-integrated and optimized combination of one or more types of resources. In one example, different pods may be pre-provisioned for different types of cloud services. For example, a first set of pods may be provided for database services, a second set of pods may be provided for Java services, and so on, which may include a different combination of resources than the pods in the first set of pods. For some services, resources allocated to provide the service may be shared between services.
[0161] Cloud infrastructure system 702 may itself use services 732 internally that are shared by different components of cloud infrastructure system 702 and that facilitate the provision 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 restore services, services to enable cloud support, email services, notification services, file transfer services, etc.
[0162] Cloud infrastructure system 702 may include multiple subsystems. These subsystems may be implemented in software, hardware, or a combination thereof. As shown in FIG. 7 , the subsystems may include a user interface subsystem 712 that allows users or customers 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 through which 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 one or more services offered by cloud infrastructure system 702 using one or more of interfaces 714, 716, and 718 (service request 734). 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 the one or more services to which the customer wishes to subscribe. For example, a customer may place a subscription 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 authentication information for that chatbot system.
[0163] 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 will be used to bill the customer for providing the customer with the requested services, verify the customer information, receive verification, register the customer's order, and coordinate various workflows to prepare the order for delivery.
[0164] Upon proper validation, the OMS 720 can then invoke an Order Provisioning Subsystem (OPS) 724, which is 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 service requested by the customer order. The manner in which resources are provided for the order and the type of resources provided may depend on the type of cloud service ordered by the customer. For example, according to one workflow, the OPS 724 can 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 to the order may depend on the size / amount / level / scope of the service being requested. For example, the number of pods allocated may be determined based on the number of users to be supported by the service, the duration for which the service is requested, etc. The allocated pods may then be customized to provide the requested service for the specific requesting customer.
[0165] In one example, the setup phase process described above may be performed as part of the provisioning process by cloud infrastructure system 702. 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 storage virtual machines provided by other systems other than cloud infrastructure system 702.
[0166] Cloud infrastructure system 702 may send a response or notification 744 to the requesting customer to indicate when the requested service is ready for use at that time. In some cases, information (e.g., a link) may be sent to the customer to enable the customer to begin using and taking advantage of the requested service. In one example, for the customer requesting the service, the response may include a chatbot system ID 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 ID.
[0167] 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 also collect usage statistics regarding the customer's use of the subscribed 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. This usage information may be used to bill the customer. Billing may occur, for example, on a monthly cycle.
[0168] Cloud infrastructure system 702 can provide services to multiple customers in parallel. Cloud infrastructure system 702 can store information for these customers, possibly including sensitive information. In one example, cloud infrastructure system 702 includes an identity management subsystem (IMS) 728 configured to manage customer information and provide separation of managed information so that information associated with one customer is not accessible by another customer. IMS 728 can 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.
[0169] FIG. 8 illustrates an example of a computer system 800. In some examples, the computer system 800 can be used to run a digital assistant or chatbot system in a distributed environment, as well as any of 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 multiple other subsystems via a bus subsystem 802. These other subsystems may include a processing acceleration unit 806, an I / O subsystem 808, a storage subsystem 818, and a communication subsystem 824. The storage subsystem 818 may include a non-transitory computer-readable storage medium, including a storage medium 822, and a system memory 810.
[0170] Bus subsystem 802 provides a mechanism for allowing the various components and subsystems of computer system 800 to communicate with each other as intended. While bus subsystem 802 is shown schematically as a single bus, alternative examples of a 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, a local bus using any of a variety of bus architectures, etc. 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 in accordance with the IEEE P1386.1 standard.
[0171] The processing subsystem 804 controls the operation of the computer system 800 and may include one or more processors, application specific integrated circuits (ASICs), or field programmable gate arrays (FPGAs). The processor may be a single-core or multi-core processor. 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, a combination 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 coprocessors, such as a graphics processor, a digital signal processor (DSP), etc. In some examples, some or all of the processing units of the processing subsystem 804 may be implemented using custom circuitry, such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
[0172] In some examples, processing units within processing subsystem 804 can execute instructions stored in system memory 810 or on computer-readable storage medium 822. In various examples, the processing units can execute various program or code instructions and can maintain multiple simultaneously executing programs or processes. At any given time, some or all of the program code being executed can reside in system memory 810 and / or on computer-readable storage medium 822, which may include one or more storage devices. Through appropriate programming, processing subsystem 804 can provide the various functions described above. In instances where computer system 800 is running one or more virtual machines, one or more processing units can be allocated to each virtual machine.
[0173] In one example, a processing acceleration unit 806 may optionally be provided to perform customized processing or to offload portions of the processing performed by the processing subsystem 804 so as to accelerate the overall processing performed by the computer system 800.
[0174] I / O 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 devices 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, acoustic 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 a Microsoft Kinect® motion sensor, a Microsoft Xbox® 360 game controller, or devices that provide an interface for receiving input using gesture and voice commands, allowing a user to control and interact with the input device. The user interface input device may also include an eye gesture recognition device, such as a Google Glass® blink detector, that detects eye activity from the user (e.g., "blinking" while taking a picture and / or making a menu selection) and translates the eye gesture as input to the input device (e.g., Google Glass®). Additionally, the user interface input device may include a voice recognition sensing device that allows the user to interact with a voice recognition system (e.g., Siri® Navigator) through voice commands.
[0175] Other examples of user interface input devices include, but are not limited to, three-dimensional (3D) mice, joysticks or pointing sticks, gamepads, 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 reader 3D scanners, 3D printers, laser range finders, and eye-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 devices. User interface input devices may also include audio input devices such as, for example, MIDI keyboards, digital musical instruments, and the like.
[0176] In general, use of the term output device(s) 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 also include non-visual displays such as display subsystems, 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, touchscreens, etc. For example, user interface output devices may include various display devices that visually convey textual, graphical, and audio / video information, such as, but not limited to, monitors, printers, speakers, headphones, automobile navigation systems, plotters, audio output devices, and modems.
[0177] 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 structures that provide some example functionality. The storage subsystem 818 can 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 can also provide authentication according to the teachings of the present disclosure.
[0178] The storage subsystem 818 may include one or more non-transitory 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 several memories, including volatile main random access memory (RAM) for storing instructions and data during program execution, and non-volatile read-only memory (ROM) or flash memory, in which fixed instructions are stored. In some embodiments, a basic input / output system (BIOS), containing the basic routines that help transfer information between elements within the computer system 800, such as during start-up, may typically be stored in ROM. The RAM typically contains data and / or program modules currently being operated on and executed by the processing subsystem 804. In some embodiments, the system memory 810 may include several different types of memory, such as static random access memory (SRAM), dynamic random access memory (DRAM), etc.
[0179] 8, system memory 810 may load executing application programs 812, program data 814, and operating system 816, which may include various applications such as a web browser, a middle-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® OS, etc.), and / or mobile operating systems such as iOS, Windows® Phone, Android® OS, BlackBerry® OS, Palm® OS operating systems, etc.
[0180] The computer-readable storage medium 822 can store programming and data structures that provide some example functionality. The computer-readable medium 822 can provide storage of computer-readable instructions, data structures, program modules, and other data for the computer system 800. Software (programs, code modules, instructions) that, when executed by the processing subsystem 804, provide the functionality described above 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 a hard disk drive, a magnetic disk drive, a CD-ROM, a DVD, and an optical disk drive such as a Blu-ray® disk or other optical media. The computer-readable storage medium 822 may also include, but is not limited to, a Zip® drive, a flash memory card, a Universal Serial Bus (USB) flash device, a Secure Digital (SD) card, a DVD disk, a digital video tape, etc. 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, solid-state ROM, etc., SSDs based on volatile memory such as solid-state RAM, dynamic RAM, static RAM, etc., DRAM-based SSDs, magnetoresistive RAM (MRAM) SSDs, and hybrid SSDs that use a combination of DRAM and flash memory-based SSDs.
[0181] In some examples, storage subsystem 818 may also include a computer-readable storage medium reader 820 that may be further connected to a computer-readable storage medium 822. Reader 820 may receive data from a memory device such as a disk, flash drive, or the like and may be configured to read the data.
[0182] In some 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 some examples, computer system 800 may execute a program such as a hypervisor that facilitates configuration and management of virtual machines. Each virtual machine may have allocated memory resources, computational resources (e.g., processors, cores), I / O resources, and networking resources. Each virtual machine generally operates independently from other virtual machines. A virtual machine typically runs its own operating system, which may be the same as or different from the operating systems run by other virtual machines executed by computer system 800. Thus, multiple operating systems may potentially be run simultaneously by computer system 800.
[0183] The communications subsystem 824 provides an interface to other computer systems and networks. The communications subsystem 824 serves as an interface for receiving data from other systems and transmitting data from the computer system 800 to other systems. For example, the communications subsystem 824 can enable the computer system 800 to establish a communications channel to one or more client devices over the Internet to receive and transmit information from the client devices. For example, when the computer system 800 is used to execute the bot system 120 shown in FIG. 1, the communications subsystem can be used to communicate with a chatbot system selected for the application.
[0184] The communications subsystem 824 can support both wired and / or wireless communications protocols. In certain examples, the communications subsystem 824 can include radio frequency (RF) transceiver components for accessing wireless voice and / or data networks (e.g., using cellular technology, advanced data network technologies such as 3G, 4G, or EDGE (Enhanced Data Rates for Global Evolution), Wi-Fi (IEEE 802.XX family of standards, or other mobile communications technologies, or any combination thereof), global positioning system (GPS) receiver components, and / or other components. In some examples, the communications subsystem 824 can provide a wired network connection (e.g., Ethernet) in addition to or instead of a wireless interface.
[0185] The communications subsystem 824 can receive and transmit data in various formats. In some examples, in addition to other formats, the communications subsystem 824 can 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 can be configured to receive (or transmit) data feeds 826 in real time from users of social media networks and / or other communications services, such as web feeds, such as Twitter® feeds, Facebook® updates, Rich Site Summary (RSS) feeds, and / or real-time updates from one or more third-party sources.
[0186] In one example, the communications subsystem 824 can be configured to receive data in the form of a continuous data stream, which may include an event stream 828 of real-time events and / or event updates 830, which may be continuous or unlimited in nature with no apparent end. 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, automobile traffic monitoring, etc.
[0187] Communications subsystem 824 may also be configured to communicate data from 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, event updates 830, etc., to one or more databases that may be in communication with one or more streaming data source computers coupled to computer system 800.
[0188] Computer system 800 may be one of a variety of types, including a handheld portable 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 any other data processing system. Due to the ever-changing nature of computers and networks, the description of computer device 800 shown in FIG. 8 is intended only as a specific example. Many other configurations are possible, having more or fewer components than the system shown in FIG. 8. It will be appreciated that there are other ways and / or methods for implementing the various examples based on the present disclosure and the teachings provided herein.
[0189] While specific examples have been described, various modifications, variations, alternative configurations, and equivalents are possible. The examples are not limited to operation in one particular data processing environment, but can freely operate in multiple data processing environments. Additionally, while certain examples are described using a particular sequence of transactions and steps, those skilled in the art will appreciate that this is not intended to be limiting. While some flowcharts describe operations as a sequential process, many of the operations may be performed in parallel or simultaneously. Additionally, the order of operations may be rearranged. A process may have additional steps not included in the figures. Various features and aspects of the examples described above may be used individually or jointly.
[0190] Additionally, while certain examples are 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 multiple different processors in any combination.
[0191] Where a device, system, component, or module is described as being configured to perform a certain operation or function, such configuration may be achieved, for example, by designing an electronic circuit to perform the operation, by programming a programmable electronic circuit (such as a microprocessor) to perform the operation, such as by executing computer instructions or code, or by a processor or core that is programmed to execute code or instructions stored on a non-transitory memory 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.
[0192] Specific details are provided in this disclosure to provide a thorough understanding of the examples. However, the examples may be practiced without these specific details. For example, well-known circuits, processes, algorithms, structures, and techniques are shown without unnecessary detail to avoid obscuring the examples. This description provides only illustrative examples and is not intended to limit the scope, applicability, or configuration of other examples. Rather, the preceding description of the examples provides those skilled in the art with an empowering description for practicing various examples. Various changes can be made in the function and arrangement of elements.
[0193] Accordingly, the specification and drawings should be regarded in an illustrative, and not a restrictive, sense. However, it will be apparent that additions, subtractions, deletions, and other modifications and alterations may be made thereto without departing from the broader spirit and scope as set forth in the appended claims. Accordingly, while particular examples have been described, these are not intended to be limiting. Various modifications and equivalents are within the scope of the appended claims.
[0194] In the foregoing specification, aspects of the present disclosure have been described with reference to particular examples thereof, but those skilled in the art will recognize that the present disclosure is not limited thereto. Various features and aspects of the above-described disclosure may 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 present specification. Accordingly, the specification and drawings should be considered illustrative and not restrictive.
[0195] In the above description, for purposes of illustration, the methods have been described in a particular order. It should be appreciated that in alternative examples, the methods may be performed in an order different from that described. It should also be appreciated that the methods described above may be performed by hardware components or embodied in a series of machine-executable instructions that can be used to cause a machine, such as a general-purpose or special-purpose processor or logic circuitry that has been programmed with the instructions, to perform the methods. 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 diskette, 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 methods may be performed by a combination of hardware and software.
[0196] Where an element is described as being configured to perform a certain 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.
[0197] Although illustrative examples of the present application have been described in detail herein, it is to be understood that the inventive concepts may be variously embodied and utilized in other manners, and that the appended claims are intended to be construed to include such modifications except insofar as limited by the prior art.
Claims
1. accessing training data including a plurality of utterances, each utterance including at least one named entity corresponding to one of a plurality of named entity categories; calculating a growth rate for each named entity category of the plurality of named entity categories based on a distribution of each named entity category of the plurality of named entity categories in the training data and a function selected from a plurality of functions in a hyperparameter tuning process of a named entity recognition (NER) model; generating a plurality of additional utterances based on the expansion factor calculated for each named entity category of the plurality of named entity categories; augmenting the training data by combining the plurality of additional utterances with the plurality of utterances to form augmented training data; training the NER model using the augmented training data; A computer-implemented method, including:
2. The hyperparameter tuning process includes: dividing the training data into training data sets, each training data set including a corresponding set of utterances of the plurality of utterances; For each training data set of said training data set, selecting candidate hyperparameters from the set of candidate hyperparameters; generating an augmented set of utterances from the corresponding set of utterances in each of the training datasets based on the candidate hyperparameters and a function associated with the candidate hyperparameters among the plurality of functions; training the NER model using the expanded utterance set; calculating a performance metric of the NER model trained using the expanded utterance set; determining a hyperparameter set for the NER model based on the performance metrics calculated for the NER model trained with each of the expanded utterance sets; 2. The computer-implemented method of claim 1, comprising:
3. 2. The computer-implemented method of claim 1, wherein a number of additional utterances generated for a first named entity category of the plurality of named entity categories differs from a number of additional utterances generated for a second named entity category of the plurality of named entity categories.
4. 2. The computer-implemented method of claim 1, wherein determining the expansion rate for each named entity category of the plurality of named entity categories comprises: calculating a number of occurrences of each named entity category of the plurality of named entity categories in the training data; and normalizing the number of occurrences of each named entity category of the plurality of named entity categories in the training data.
5. 5. The computer-implemented method of claim 4, wherein determining the expansion rate for each named entity category of the plurality of named entity categories comprises calculating a normalized distribution value for each named entity category of the plurality of named entity categories, the normalized distribution value being calculated for each named entity category of the plurality of named entity categories by dividing the calculated number of occurrences for each named entity category by the sum of the number of occurrences of all the named entity categories of the plurality of named entity categories that occur in the training data.
6. 2. The computer-implemented method of claim 1, wherein the plurality of functions includes at least one of: a first function that calculates the growth rate of the given named entity category based on an exponential function that receives as input a normalized distribution value and a beta value for the given named entity category; and a second function that calculates the growth rate of the given named entity category based on a binary logarithmic function that receives as input a number of occurrences of the given named entity category in the training data.
7. 2. The computer-implemented method of claim 1, further comprising providing the trained NER model to a system, wherein providing the trained NER model comprises detecting and classifying named entities in utterances received by the system from a user.
8. 1. A system comprising: one or more processors; one or more computer-readable media storing instructions that, when executed by the one or more processors, cause the system to perform operations; Equipped with The operation is accessing training data including a plurality of utterances, each utterance including at least one named entity corresponding to one of a plurality of named entity categories; calculating a growth rate for each named entity category of the plurality of named entity categories based on a distribution of each named entity category of the plurality of named entity categories in the training data and a function selected from a plurality of functions in a hyperparameter tuning process of a named entity recognition (NER) model; generating a plurality of additional utterances based on the expansion factor calculated for each named entity category of the plurality of named entity categories; augmenting the training data by combining the plurality of additional utterances with the plurality of utterances to form augmented training data; training the NER model using the augmented training data; Including, the system.
9. The hyperparameter tuning process includes: dividing the training data into training data sets, each training data set including a corresponding set of utterances of the plurality of utterances; For each training data set of said training data set, selecting candidate hyperparameters from the set of candidate hyperparameters; generating an augmented set of utterances from the corresponding set of utterances in each of the training datasets based on the candidate hyperparameters and a function associated with the candidate hyperparameters among the plurality of functions; training the NER model using the expanded utterance set; calculating a performance metric of the NER model trained using the expanded utterance set; determining a hyperparameter set for the NER model based on the performance metrics calculated for the NER model trained with each of the expanded utterance sets; The system of claim 8 , comprising:
10. 9. The system of claim 8, wherein a number of additional utterances generated for a first named entity category of the plurality of named entity categories differs from a number of additional utterances generated for a second named entity category of the plurality of named entity categories.
11. 9. The system of claim 8, wherein determining the expansion rate for each named entity category of the plurality of named entity categories comprises: calculating a number of occurrences of each named entity category of the plurality of named entity categories in the training data; and normalizing the number of occurrences of each named entity category of the plurality of named entity categories in the training data.
12. 12. The system of claim 11 , wherein determining the expansion rate for each named entity category of the plurality of named entity categories comprises calculating a normalized distribution value for each named entity category of the plurality of named entity categories, the normalized distribution value being calculated for each named entity category of the plurality of named entity categories by dividing the calculated number of occurrences for each named entity category by the sum of the number of occurrences of all the named entity categories of the plurality of named entity categories that occur in the training data.
13. 9. The system of claim 8, wherein the plurality of functions includes at least one of: a first function that calculates the growth rate of the given named entity category based on an exponential function that receives as input a normalized distribution value and a beta value for the given named entity category; and a second function that calculates the growth rate of the given named entity category based on a binary logarithmic function that receives as input a number of occurrences of the given named entity category in the training data.
14. The operation is 10. The system of claim 8, further comprising providing the trained NER model to a system, wherein providing the trained NER model comprises detecting and classifying named entities in utterances received by the system from a user.
15. One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause the system to perform operations, the operations including: accessing training data including a plurality of utterances, each utterance including at least one named entity corresponding to one of a plurality of named entity categories; calculating a growth rate for each named entity category of the plurality of named entity categories based on a distribution of each named entity category of the plurality of named entity categories in the training data and a function selected from a plurality of functions in a hyperparameter tuning process of a named entity recognition (NER) model; generating a plurality of additional utterances based on the expansion factor calculated for each named entity category of the plurality of named entity categories; augmenting the training data by combining the plurality of additional utterances with the plurality of utterances to form augmented training data; training the NER model using the augmented training data; 1. One or more non-transitory computer-readable media, including:
16. The hyperparameter tuning process includes: dividing the training data into training data sets, each training data set including a corresponding set of utterances of the plurality of utterances; For each training data set of said training data set, selecting candidate hyperparameters from the set of candidate hyperparameters; generating an augmented set of utterances from the corresponding set of utterances in each of the training datasets based on the candidate hyperparameters and a function associated with the candidate hyperparameters among the plurality of functions; training the NER model using the expanded utterance set; calculating a performance metric of the NER model trained using the expanded utterance set; determining a hyperparameter set for the NER model based on the performance metrics calculated for the NER model trained with each of the expanded utterance sets; 16. The one or more non-transitory computer-readable media of claim 15, comprising:
17. 16. The one or more non-transitory computer-readable media of claim 15, wherein a number of additional utterances generated for a first named entity category of the plurality of named entity categories differs from a number of additional utterances generated for a second named entity category of the plurality of named entity categories.
18. 16. The one or more non-transitory computer-readable media of claim 15, wherein determining the expansion rate for each named entity category of the plurality of named entity categories comprises: calculating a number of occurrences of each named entity category of the plurality of named entity categories in the training data; and normalizing the number of occurrences of each named entity category of the plurality of named entity categories in the training data.
19. 16. The one or more non-transitory computer-readable media of claim 15, wherein the plurality of functions include at least one of: a first function that calculates the growth rate of the given named entity category based on an exponential function that receives as input a normalized distribution value and a beta value for the given named entity category; and a second function that calculates the growth rate of the given named entity category based on a binary logarithmic function that receives as input a number of occurrences of the given named entity category occurring in the training data.
20. The operation is 16. The one or more non-transitory computer-readable media of claim 15, further comprising providing the trained NER model to a system, wherein the providing the trained NER model comprises detecting and classifying named entities in utterances received by the system from a user.