A configurable conversation engine for running customizable chatbots
The configurable conversation engine addresses the inflexibility of traditional chatbots by allowing customizable configurations, enabling efficient and adaptive user interactions through task and entity configurations.
Patent Information
- Application Number
- JP2023519205
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-09-29
- Filing Date
- 2021-01-16
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-01-16
AI Technical Summary
Traditional chatbots are cumbersome and error-prone to modify due to their hard-coded scripts, making customization difficult and inefficient.
A configurable conversation engine that allows for customizable chatbots by separating chatbot configuration into task and entity configurations, enabling flexible and dynamic interaction with users through natural language processing and machine learning techniques.
Enables efficient and customizable chatbot interactions, allowing multiple tasks to be performed simultaneously and adaptively responding to user inputs, enhancing user experience and system flexibility.
Smart Images

Figure 0007581502000005 
Figure 0007581502000006 
Figure 0007581502000007
Abstract
Description
[Technical field]
[0001] The present disclosure relates generally to chatbot conversations in online systems, and more particularly to a customizable conversation engine for implementing chatbots. [Background technology]
[0002] Online systems often use chatbots to interact with users. Chatbots provide an automated conversational interface to users of the online system. Chatbots allow users to interact with the online system in a natural way, for example, using voice or natural language. Chatbots are also referred to as conversational assistants, artificial intelligence (AI) assistants, intelligent virtual assistants, or virtual agents.
[0003] An artificial intelligence based chatbot receives a user's speech, which may be provided as an audio signal, and recognizes sentences within the user's speech using automatic speech recognition techniques. The chatbot can analyze the user's speech using artificial intelligence techniques, including machine learning based models, e.g., artificial neural networks. Traditional chatbots are typically based on hard-coded scripts that specify the actions the chatbot needs to take in response to a particular user's utterance. Thus, making changes to a chatbot is cumbersome and error-prone. [Brief description of the drawings]
[0004] [Figure 1] FIG. 1 is a block diagram of a system environment for conducting chatbot conversations according to one embodiment. [Diagram 2] FIG. 2 is a block diagram of a system architecture of a conversation engine according to one embodiment. [Diagram 3]FIG. 3 illustrates an example of a conversation engine configuration used to customize the conversation engine, according to one embodiment. [Figure 4] FIG. 4 illustrates a flow chart of the conversation engine logic based on an example conversation engine configuration, according to one embodiment. [Diagram 5] FIG. 5 illustrates a flow chart of conversation engine logic for processing uninformed user utterances according to one embodiment. [Figure 6] FIG. 6 illustrates a flow chart of conversation engine logic for processing informed user utterances according to one embodiment. [Figure 7] FIG. 7 illustrates an example of task and entity configurations used to customize a chatbot, according to one embodiment. [Figure 8] FIG. 8 is a flow chart illustrating the overall process of the conversation engine according to one embodiment. [Figure 9] FIG. 9 is a flow chart illustrating a process for executing a chatbot task according to one embodiment. [Figure 10A] FIG. 10A illustrates the execution of a task by a conversation engine according to one embodiment. [Figure 10B] FIG. 10B illustrates the execution of a task by a conversation engine according to one embodiment. [Figure 10C] FIG. 10C illustrates the execution of a task by a conversation engine according to one embodiment. [Figure 10D] FIG. 10D illustrates the execution of a task by a conversation engine according to one embodiment. [Figure 11] FIG. 11 is a block diagram illustrating a functional diagram of an exemplary computer system, in accordance with one embodiment.
[0005] The figures depict various embodiments for purposes of illustration only, and those skilled in the art will readily recognize from the following discussion that alternative embodiments of the structures and methods shown herein may be employed without departing from the principles of the embodiments described herein.
[0006] The figures use like reference numerals to identify like elements. Letters following a reference numeral, such as "115a," indicate that the text specifically refers to the element with that particular reference numeral. A reference numeral in the text without a following letter, such as "115," refers to part or all of the element in the figure with that reference numeral. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0007] The online system allows users to perform tasks using customized chatbots. The chatbots can be customized to allow users to perform a specific set of tasks using the online system. The chatbots allow users to perform tasks based on a conversation, e.g., a natural language conversation. The chatbots receive user utterances and determine the tasks the user is requesting. The online system executes a conversation engine, which represents a runtime execution engine that can read any chatbot configuration and execute instructions to implement the chatbot. The behavior of the conversation engine across the chatbot is customizable using the conversation engine configuration. The conversation engine configuration specifies a set of states the chatbot can be in and the actions to be taken by the conversation engine in each state to execute the chatbot.
[0008] The conversation engine receives chatbot-wide conversation engine configuration and chatbot-specific chatbot configuration. The conversation engine implements the chatbot according to the chatbot configuration and the conversation engine configuration. The conversation engine initializes the state of the chatbot. The conversation engine performs each task by repeating the following steps: The conversation engine receives a user utterance and determines attributes of the user utterance. For example, the conversation engine can determine whether the user utterance contains information, the polarity of the user utterance, etc.
[0009] The conversation engine performs actions based on the state of the chatbot and attributes of the user's utterances. Actions perform one or more of the following: (1) identify the task requested by the user; (2) collect information required to perform the task, e.g., values of entities related to the task; and (3) update the state of the chatbot. Actions can be performed over multiple iterations. For example, if a task requires values of multiple entities, the conversation engine can perform multiple iterations to determine the values. In each iteration, the conversation engine generates a response and sends the response to the user. A subsequent received user utterance starts a new iteration. The above steps are repeated as the conversation progresses.
[0010] System Environment FIG 1 is a block diagram of a system environment 100 for conducting chatbot conversations, according to one embodiment. The system environment 100 includes an online system 120 that communicates with a user via a client device 115. The online system 120 includes a conversation engine 150 and a data store 160. The online system 120 may include other components not shown in FIG 1, such as other types of data stores, external system interfaces, etc. The system environment 100 may include other elements not shown in FIG 1, such as a network. The online system 120 may be referred to herein as a system.
[0011] Users 105, 110 of the online system 120 interact with the online system using client devices 115. Some users may be privileged users, e.g., system administrators 105 who maintain and configure the chatbots and conversation engines. Other users 110 simply use the functionality provided by the online system, e.g., using chatbots, to perform various tasks supported by the online system.
[0012] The conversation engine 150 uses the chatbot to conduct a conversation with the user 110. The online system 110 allows a system administrator 105 to customize the chatbot using a chatbot configuration 125. The online system 110 allows a user to further customize the execution of the configuration engine using a conversation engine configuration 155. As shown in FIG. 1, the system administrator 105 can provide the chatbot configuration 125 and the conversation engine configuration 155 to the online system 120 using a client device 115a.
[0013] The conversation engine 150 can implement (or execute) a chatbot, which is customized to perform a set of tasks, e.g., tasks performed by an online system. A user interacts with a chatbot by interacting with the conversation engine 150 that implements the chatbot. The conversation engine 150 can execute multiple chatbots by maintaining separate state and data structures for each chatbot. For example, the conversation engine can execute multiple virtual machines, each virtual machine executing a chatbot. Each chatbot executed by the conversation engine 150 is configured to perform a set of tasks. Different chatbots can execute different sets of tasks. Furthermore, different chatbots can be configured differently and therefore execute different sets of instructions to perform the same task. For example, one chatbot can execute a particular set of instructions to perform a check-order task, and another chatbot can execute a different set of instructions to perform the check-order task.
[0014] The conversation engine configuration 155 specifies conversation engine actions applicable to all tasks of a chatbot. Furthermore, the conversation engine configuration 155 specifies conversation engine 150 actions applicable to multiple chatbots that may be executed by the conversation engine 150. The conversation engine configuration 155 may specify how the conversation engine processes user utterances. For example, the conversation engine configuration 155 may specify an action to be taken by the conversation engine 150 when a user provides an uninformative utterance, such as "ok." The conversation engine configuration 155 may specify the number of times a user may provide uninformative user utterances before the conversation engine 150 sends a response saying goodbye to the user and ends the conversation with the user.
[0015] The chatbot configuration 125 is received from a user, such as a system administrator 105, and processed by the conversation engine 150. The chatbot configuration 125 allows a user to configure and customize a chatbot used by the conversation engine 150. The chatbot can be customized to allow a user to perform a specific set of tasks. A business performing a particular type of transaction can customize a chatbot to allow a user to converse with the online system 120 to perform tasks related to the transaction, such as, for example, performing authentication, completing a transaction, checking the status of a transaction, canceling a transaction, etc.
[0016] In one embodiment, the chatbot configuration 125 includes a task configuration 130 and an entity configuration 135. The task configuration 130 specifies the tasks that a user can perform using the chatbot. The entity configuration 135 specifies information describing the entities that represent the values required to perform the tasks. For example, to check the status of an order, the online system 120 needs an order ID or one or more values to identify the order, such as the date the order was placed, the account used to place the order, etc. The entity configuration 135 specifies how to determine the values of the entities. For example, one entity may be determined by accessing a database, another by communicating with a web service, another by asking the user, and another by executing a system command.
[0017] FIG. 4 provides an illustrative example of a task configuration 130 and an entity configuration 135. For each task, the task configuration 130 specifies a set of entities relevant to the execution of the task. The values represented by the entities may be provided by the user or may be determined by the conversation engine 150, for example, by accessing the data store 160 or by invoking a given service, for example, a web service. For example, if a task represents retrieving the status of an order, the entities relevant to the task include the order ID and the status of the order itself. The conversation engine 150 can obtain the order ID from the user, for example, by generating a question requesting the order ID or by requesting information such as the date of the order that can be used to access the order ID. The conversation engine 150 can access the order status from the data store 160 and provide the order status information to the user.
[0018] The conversation engine 150 performs a conversation with the user 110 according to the configuration 125. The conversation engine 150 receives the user's utterance 140 and performs a task based on the user's utterance. The conversation engine 150 can perform the task by interacting with the data store 160, for example, to access or update information stored in the data store 160. The conversation engine 150 can generate and provide a system response 145 to the user. The system response 145 can be sent to the user to request additional information needed to perform the task. The system response 145 can inform the user that the task is completed or provide the user with the requested information.
[0019] In some embodiments, the online system 120 is a multi-tenant system that allows multiple tenants to use the system, with each tenant representing a group of users. The term tenant refers to an organization or business that is a customer of the multi-tenant system. The term tenant can refer to a set of users across an organization that is a customer of the multi-tenant system, or a subset of users of an organization. Thus, in embodiments, a tenant-specific chatbot can be customized for a set of users, such as, for example, the entire set of users of an organization, a specific group of users within an organization, or an individual user within an organization. A multi-tenant system stores data for multiple tenants and allows tenants to share applications running on the multi-tenant system. A multi-tenant system can run a variety of applications that a tenant can run.
[0020] Data store 160 stores data for users of online system 120. A multi-tenant system stores data for multiple tenants in the same physical data store, e.g., data store 160, but enforces logical separation of data across tenants. As a result, one tenant does not have access to another tenant's data unless such data is explicitly shared. Data store 160 can be implemented as a relational database that stores one or more tables.
[0021] The online system 120 and client device 115 shown in FIG. 1 represent computing devices. The computing device may be, for example, a Microsoft TM Windows TM Compatible Operating Systems (OS): Apple TMThe computing device may be a conventional computer system running OS X and / or the Linux operating system. The computing device may also be devices such as personal digital assistants (PDAs), mobile phones, video game systems, etc.
[0022] The client devices 115 may interact with the online system 120 through a network (not shown in FIG. 1 ). The network uses network protocols such as Transmission Control Protocol / Internet Protocol (TCP / IP), User Datagram Protocol (UDP), Internet Control Message Protocol (ICMP), etc. Data exchanged over the network may be represented using technologies and / or formats including HyperText Markup Language (HTML), Extensible Markup Language (XML), etc. System Architecture
[0023] 2 is a block diagram of a system architecture of a conversation engine according to one embodiment. The online system 120 includes a speech recognition module 210, a state manager 220, an intent detection module 230, a task execution module 250, a response generation module 260, a configuration store 270, an entity recognition module 280, and a machine learning module 290. Other embodiments may have different and / or other components than those described herein. Additionally, the functionality described herein may be distributed among the components in different ways.
[0024] The configuration store 270 stores chatbot and conversation engine configurations. The chatbot or conversation engine configurations can be stored as configuration files, e.g., XML or YML files. The configuration store 270 can be a file system or a database, e.g., a relational database.
[0025] The conversation engine 150 enables a user to perform tasks using the online system 120. For example, if the online system implements an e-commerce website, the conversation engine 150 enables a user to perform transaction-related tasks, such as completing an online transaction, checking the status of a transaction, canceling an in-progress transaction, and the like.
[0026] The conversation engine 150 performs natural language conversation with a user. The conversation engine 150 receives speech from the user. The speech can be received as a text signal through a user interface where the user can input text, or as an audio signal through a user interface where the user can speak into a microphone that captures an audio signal. If the user is using a voice-based interface for conversation, the conversation engine 150 uses the speech recognition module 210 to convert the received audio signal into text for further processing.
[0027] The conversation engine 150 can ask the user questions to receive information. The conversation engine 150 generates a dialog that is presented to the user. The conversation engine 150 receives natural language responses from the user. The conversation engine tracks the state of the conversation to ensure that various questions are answered. The conversation engine 150 provides the responses received from the user to various other modules.
[0028] The state manager 220 maintains the state of the chatbot. If the conversation engine 150 implements a single chatbot, the state of the chatbot can be considered as the state of the conversation engine. This state is used to execute a conversation with a user through the chatbot. If the conversation engine 150 is confirming a particular type of information, the conversation engine uses the state to represent the type of information being confirmed. If the conversation engine subsequently receives a user utterance indicating a confirmation, the state is used to determine the type of information being confirmed. For example, if the conversation engine 150 is confirming whether to continue or not, the conversation engine 150 configures the state variable confirm_continue to true. Thus, if a subsequent user utterance indicates that the user said yes, which represents a positive polarity, the conversation engine determines the next action to take based on the state variable confirm_continue and the polarity attribute of the user utterance.
[0029] In one embodiment, the state manager 220 stores a data structure that stores a set of state variables, each of which tracks an attribute of the conversation. The attribute can represent the type of task currently being processed in the conversation. The state manager 220 can store an array of state variables as a representation of the state of the chatbot. Below is an example of an array of state variables as a representation of the state of a chatbot. The state manager 220 initializes the state variables and then updates them as the conversation progresses. In one embodiment, the state manager 220 maintains a lookup table, e.g., a dictionary structure, that maps various state variables to their values and allows the conversation engine to look up the value of any state variable using the name of the state variable. [Table 1]
[0030] In the above list, the state variable cur_task stores the type of task currently being executed, the state variable cur_entity_type stores the type of entity whose value is being determined, the state variable confirm_continue indicates whether the chatbot is confirming with the user if they want to continue the conversation, the state variable task_stack stores a stack data structure that stores all the tasks currently being executed, the state variable num_turns stores the number of iterations performed with the user towards achieving a goal (e.g. determining the value of an entity), the state variable prev_task represents the previous task that was executed, the state variable entity_method represents the method for determining the value of the entity currently being processed, etc.
[0031] The task execution module 250 executes the tasks requested by the user through the chatbot conversation. The task execution module 250 can interact with other components, such as the data store 160, to access or update data required for the execution of the task. The task execution module 250 can interact with external services, such as a mapping service, to validate an address.
[0032] In one embodiment, task execution module 250 maintains a task data structure that stores a series of tasks. For example, the task data structure may be a stack data structure or a queue data structure. The task data structure may be accessible as a state variable. When task execution module 250 executes a task, task execution module 250 stores a task object in the task data structure. The task object specifies the type of task and contains slots that store various entities required to execute the task. Task execution module 250 retrieves the task from the task data structure and processes it.
[0033] A task configuration may specify that execution of a task requires execution of other related tasks. For example, to execute a task that represents execution of a transaction, the system executes a subtask that represents authentication of a user before executing another subtask that represents the transaction. Thus, to execute a task, task execution module 250 may add other tasks to the task data structure. When task execution module 250 finishes a task, it checks the task data structure to determine whether there are any uncompleted tasks. If task execution module 250 determines that there are uncompleted tasks in the task data structure, task execution module 250 retrieves and executes the uncompleted tasks. Task execution module 250 continues to process the uncompleted tasks stored in the task data structure until all tasks have been executed.
[0034] In one embodiment, the task execution module 250 maintains a tree data structure that represents the tasks. The tree data structure is shown in Figures 10A-10D. The tree data structure includes a root node. The task execution module 250 adds the task requested by the user as a subnode of the root node. If the task requires a subtask, the subtask is also added to the tree data structure. For example, the subtask may be added as a separate task under the root node or may be nested within the parent task that created the subtask.
[0035] Task execution module 250 allows a user to perform a context switch by requesting a new task while a previous task is not completed. When a user performs a context switch, task execution module 250 adds the new task to a task data structure. Task execution module 250 tracks the order in which tasks are being processed, for example, using a last-in-first-out stack data structure. Task execution module 250 completes a task and then checks the task structure to select another task that is not completed. Once a task is completed, it is removed from the stack data structure.
[0036] The speech recognition module 210 receives a voice signal as input and converts the voice signal to text for further processing. The speech recognition module 210 allows a user to converse with the online system 120 using voice. The output of the speech recognition module 210 is provided as input to other modules of the online system 120. In one embodiment, the speech recognition module 210 provides a confidence level for a recognized word indicating the likelihood that the word was transcribed correctly.
[0037] The intent detection module 230 determines the user's intent based on the user's utterance. An intent represents a task that the user wants to perform, but can also represent other types of information. The intent detection module 230 stores a set of intents 202 that represent various possible actions that the user may intend by a given natural language expression. For example, some example intents may represent the user's desire to change the user's email address, to change the user's physical mailing address, to start composing an electronic message, etc. The intents may be expressed in any manner (e.g., as integers or strings) as long as the expression of each intent is different from other intents.
[0038] The intent detection module 230 additionally stores a set of example natural language expressions for each intent. The intent examples are representative expressions of natural language forms known to indicate intent on the part of the user to use those expressions. The examples can be stored in any suitable format, such as text. In some embodiments, the intent detection module 230 stores approximately five examples for each intent, a quantity of examples that is easily feasible to provide directly to a data scientist or other knowledgeable user. For example, examples for an intent expressing a user's desire to change their email address can be {"I want to update my email address," "I need to change my email address," "Update my email address," "Please change my email address," "Update my email." In embodiments where the online system 120 stores data for multiple tenants, each tenant can have its own set of unique intents and examples, thus enabling natural language understanding tailored to the domain in which the tenant operates.
[0039] According to an embodiment, the neural network is configured to receive a natural language sentence and an example phrase as input, and determine whether the example phrase can be inferred from the natural language sentence. The example phrase can be inferred from the natural language sentence if the natural language sentence implies the example phrase. The example phrase may be another natural language sentence or may be a part of the natural language sentence.
[0040] In one embodiment, the neural network generates a confidence score indicating a measure of confidence that the example phrase can be inferred from the natural language request. For example, a higher confidence measure indicates a higher likelihood that the example phrase can be inferred from the natural language request. Given two example phrases, the scores generated by the neural network for the natural language sentences can be compared to determine which example phrase better reflects the intent of the natural language request. Furthermore, given a set of example phrases, the neural network can be run using pairs of natural language sentences and example phrases from the set as inputs to generate a score. The scores can be compared to determine the best matching example phrase that represents the intent of the natural language sentence. The neural network can be trained using a labeled training dataset that stores natural language sentences and pairs of example phrases that can be inferred from them.
[0041] In one embodiment, the intent detection module 230 determines which, if any, of a variety of possible intents is most applicable to a given natural language expression of a user. To do so, the intent detection module 230 uses a neural network that determines, for a given first natural language expression and a given second natural language expression, a score indicating the likelihood that the first natural language expression textually accompanies the second natural language expression. (The first natural language expression is said to textually accompany the second natural language expression - or, equivalently, the second natural language expression is said to be inferable from the first natural language expression - if a human reading the first natural language expression considers the second natural language expression to be the most likely. For example, the phrase "I would like to change my email address" textually includes the phrase "Change user information" because, in light of the first expression, a human is more likely to conclude that the second expression is in fact being requested.)
[0042] The machine learning module 290 trains the neural network using a labeled dataset that includes several pairs of natural language requests and corresponding example phrases. The example phrases corresponding to the intents can be specified in the task configuration 130 provided by the system administrator. The input to the training is a set of ordered pairs of natural language expressions, with a label for each pair indicating whether the first expression of the pair textually entails or does not entail the second expression of the pair. Such pairs and corresponding labels can be obtained from corpora such as SNLI, MNLI, WNLI, etc., with appropriate pre-processing (e.g., converting corpus labels indicating entailment to binary "true" values, and converting labels indicating contradiction or neither entailment nor contraction to binary "false" values). Techniques such as BERT (Bidirectional Encoder Representations from Transformers) can be used to train the neural network given the input pairs and labels.
[0043] In some such embodiments, the machine learning module 290 also trains other types of models. For example, the intent detection module 230 can use the machine learning module 290 to train an intent classification model that directly predicts a user's intent for a given natural language expression. Specifically, the intent determined to apply to a given natural language expression as described above is treated as a "soft" label for that expression. The set of all such expressions with the generated intent labels then serves as input to the machine learning module 290, which uses a supervised learning algorithm to generate an intent classification model that directly predicts a user's intent.
[0044] The entity recognition module 280 identifies entities associated with the permitted action requested by the user. An entity refers to a value that the system determines to perform a task. For example, to perform a task to verify a user, the system may determine one or more of the user's name, the user's zip code, the user's email, etc. To retrieve a record of a transaction, the system may need information to uniquely identify the record, such as a date and timestamp associated with the transaction, a record identifier, etc. Task configurations specify the types of entities required to perform a task.
[0045] The entity recognition module 280 can implement different methods for recognizing entities of an entity type, as specified in the entity configuration. For example, in the exemplary configuration C provided herein, four methods are specified for the zip code entity type, including (1) named entity recognition, (2) spelling, (3) regular expressions, and (4) fuzzy matching.
[0046] The entity recognition module 280 performs named entity recognition by receiving a sentence as input and providing the sentence to a named entity recognition model, which identifies one or more named entities and their types. A named entity is an entity associated with a set of predefined categories, such as, for example, a person's name, an organization, a place, a time expression, a quantity, a monetary value, a percentage, etc. In one embodiment, the named entity recognition model is a neural network that is trained using sentences with known named entities. As an example, given the input sentence "I want a television to be delivered to San Jose by end of this week," the named entity recognition model recognizes the following categories of named entities and their values: category product, value "television"; category time, value "end of week"; category location, value "San Jose".
[0047] The entity recognition module 280 performs a spelling method for entity recognition by providing the user with a spelling of the entity and asking the user for confirmation or by asking the user to spell the entity. The entity recognition module 280 performs a regular expression method for entity recognition by matching various parts of the input sentence with regular expressions specified in the entity configuration and selecting parts of the sentence that match the regular expressions. The entity recognition module 280 performs a fuzzy matching method for entity recognition by performing fuzzy matching of parts of the input sentence with example expressions specified in the entity configuration. If the part of the sentence is determined to be a high match with the examples based on fuzzy matching, the entity recognition module 280 determines that the part of the sentence is of the entity type for which the method was specified in the entity configuration.
[0048] Conversation engine configuration Figure 3 shows an example of a conversation engine configuration used to customize a conversation engine, according to one embodiment. As shown in Figure 3, the conversation engine configuration identifies several states and actions that a chatbot can perform when in each state. The examples below may refer to chatbots and conversation engines interchangeably, however, a conversation engine can run different chatbots at different times or simultaneously.
[0049] A conversation performed by a chatbot may include a series of interactions between a user and the chatbot. Typically, a conversation begins with a user providing an initial utterance. The chatbot may perform some action and provide a response in response to the user's utterance. The user may provide another utterance based on the response. This interaction may be repeated multiple times. For example, the chatbot may analyze the user's utterance to determine that the user is requesting a particular task that requires one or more entities, each entity representing a value that is used to perform the requested task. The chatbot may interact with the user to request values of the entities. The chatbot may then send one or more responses to the user, each response may request a value of a particular entity. Once all entities related to the task are determined, the chatbot may perform the task. The chatbot may send a response indicating that the task is completed. The chatbot may further ask the user if the user wants to perform another task. This series of interactions between the chatbot and the user may then be repeated for the new task.
[0050] In one embodiment, the chatbot allows the user to context switch between tasks, for example, by requesting task T2 while the chatbot is interacting with the user to perform task T1. Thus, the chatbot can simultaneously perform multiple tasks requested by the user. In one embodiment, a task may include other subtasks that need to be performed to complete the task. Thus, the chatbot can simultaneously perform multiple tasks because they are part of a larger task.
[0051] In one embodiment, the conversation engine configuration specifies flags that represent attributes of the user's utterance. The polarity flag can represent the polarity of the user's utterance, where the polarity is either positive, negative, or neutral. The got_info flag can represent whether the user's utterance contains information expected by the conversation engine based on previous responses provided to the user by the conversation engine. If the user's utterance does not contain the expected information, the conversation engine configures the got_info flag to false, or the conversation engine configures the got_info flag to true.
[0052] In a given state, the chatbot performs different actions depending on the value of the flag. For example, as shown in FIG. 3, if the conversation engine 150 is in state S1 and receives a user utterance with flag F1, the conversation engine 150 performs action A1. If the conversation engine 150 is in state S1 and receives a user utterance with flag F2, the conversation engine 150 performs action A2. If the conversation engine 150 is in state S2 and receives a user utterance with flag F3, the conversation engine 150 performs action A3. If the conversation engine 150 is in state S2 and receives a user utterance with flag F4, the conversation engine 150 performs action A4.
[0053] The following shows an example of a conversation engine configuration 155 (Configuration A): The references in parentheses after each line are shown to identify the line and are not part of the instructions. [Table 2]
[0054] The conversation engine configuration 155 specifies a set of flags in lines A1-A6, states in A7-A11, and logic in A12-A34 that represents the action to be taken for a given combination of states and flags. The flag got_info in line A2 indicates whether the user's utterance provided any information (e.g., the value or intent of an entity of the user's utterance). An example of a user's utterance that does not provide information is for the user to simply say "Okay." If the user's utterance provides information, the flag got_info is configured to be true, otherwise it is configured to be false.
[0055] Another example of a flag is polarity (line A3), which indicates whether the user's utterance indicates a positive or negative value. For example, if the chatbot asks the user to confirm whether a value is correct or not, and the user responds "yes", the polarity flag becomes 1 or true, while if the user responds "no", the polarity flag becomes 0 or false. The flag no_info_turn (line A4) indicates the number of times the user provided a user utterance that does not provide information. The flag got_intent (line A5) indicates whether the user's utterance provided an intent value representing a task. The flag got_entity (line A6) indicates whether the user's utterance provided an entity value.
[0056] The flag value is updated for each user utterance. For example, the polarity flag is determined based on the current utterance, and the polarity value of the previous utterance is replaced with the value determined based on the current utterance. Similarly, got_info indicates whether the most recent utterance received the provided information, and no_info_turn represents a count value based on the most recent user utterance.
[0057] State variables represent values that are saved and applicable across user utterances. For example, the state variable cur_task represents whether there is a current task, the state variable confirm_continue indicates whether the chatbot expects the user to confirm whether they want to continue based on the current conversation, the state variable confirm_entity indicates whether the chatbot expects the user to confirm the value of an entity based on the current conversation, the state variable confirm_intent indicates whether the chatbot expects the user to confirm the value of an intent based on the current conversation, etc.
[0058] In one embodiment, the conversation engine configuration maps combinations of flag and state values to handlers. A handler represents a set of instructions that perform one or more actions. Thus, the conversation engine performs the action specified in a handler when the corresponding values of the flags and states specified in the conversation engine configuration match the current state and flag values.
[0059] 4 shows a flow chart of the conversation engine logic based on an example conversation engine configuration according to one embodiment. The example conversation engine configuration shown above is processed by the conversation engine to generate instructions for processing the chatbot as shown in Figures 4-6. Not all lines of the configuration are shown in Figures 4-6.
[0060] The conversation engine 150 receives 410 the user's utterance and analyzes 415 the user's utterance. The analysis may include determining the intent of the user's utterance using, for example, the intent detection module 230, which may use a neural network. The analysis may also determine whether the user's utterance includes one or more entities related to a task that correspond to the intent of the user's utterance.
[0061] The conversation engine 150 determines (420) whether the user's utterance includes information indicated by a flag got_info. This information may indicate whether an intent has been determined based on the user's utterance or whether any entity has been extracted based on the user's utterance. The configuration corresponding to the flag "not got_info" represents instructions for processing the user's utterance with a got_info flag value as false indicating that the user's utterance does not include information, and the configuration corresponding to the flag "got_info" represents instructions for processing the user's utterance with a flag value as true indicating that the user's utterance includes information, such as intent information or entity information.
[0062] If the conversation engine 150 determines that the user utterance does not contain information 420, the conversation engine 150 performs processing of the utterance without information 425, otherwise, the conversation engine 150 performs processing of the utterance with information 430. In either situation, the conversation engine 150 updates the post-processing state 435 and repeats the steps above starting with receiving the next user utterance 410.
[0063] FIG. 5 shows a flow chart of the conversation engine logic 425 for processing uninformed user utterances according to one embodiment. The “not got_info” part of the conversation engine configuration includes a check for a flag “not cur_task” that indicates whether there is an incomplete task in the task structure 510. If there is no task left for processing, the chatbot checks 520 whether the polarity of the user’s utterance is neutral (line A20). The polarity of the user’s utterance can be neutral if the user said something like “hello” which is neither a positive utterance like “yes” nor a negative utterance like “no”. If the polarity of the user’s utterance is neutral, the chatbot checks 535 whether the number of turns indicated by the counter num_turns exceeds a threshold (line A25), indicating that the user has repeated something neutral like “hello” more than the threshold number of times. If num_turns exceeds a threshold, the chatbot either provides the user with a goodbye response (line A22) 540 and stops the conversation, or the chatbot provides the user with a greeting response (line A23) 545 and asks the user what they would like to do. If the chatbot determines that the polarity of the response is not neutral, such as if the user simply said "yes" or "no", 520, the chatbot repeats the last response the chatbot generated to the user and informs the user that the chatbot was requesting.
[0064] FIG. 6 illustrates a flow chart of conversation engine logic for processing 430 an utterance using the information shown in lines A26-A34, according to one embodiment.
[0065] If the chatbot expects the user to confirm the intent (line A27) 610, the chatbot executes the handler task_confirm_handler (line A28). If the chatbot expects the user to confirm the entity (line A29) 620, the chatbot executes the handler entity_confirm_handler (line A30). If the chatbot determines based on the utterance that it has determined a new intent (line A31) 630, the chatbot executes the handler got_new_task (line A32) that includes instructions for processing the new task. The got_new_task handler may cause the chatbot to build a task structure (e.g., a task tree for processing the new task). If there are subtasks that need to be performed to implement the new task, the chatbot may execute the subtasks. For example, the subtasks may represent confirmation of the user's identity. If the chatbot determines that it has received a new entity from the user 640 (line A33), the chatbot executes the handler entity_info_handler (line A33) that includes instructions for processing the received new entity.
[0066] The conversation engine configuration can be modified by the user to include other instructions, such as handling if the flag got_info is false and the chatbot needs to confirm intent with the user or confirm entity with the user.
[0067] Chatbot Configuration The conversation engine configuration is applicable across chatbots and tasks, and the conversation engine receives and loads chatbot configurations specific to the chatbot, which specify tasks specific to the chatbot and instructions for performing each task.
[0068] FIG. 7 illustrates an example of task and entity configurations used to customize a chatbot, according to one embodiment. In one embodiment, the online system 120 presents a user interface for providing information that a system administrator can store in a configuration file that stores the task and entity configurations. As shown in FIG. 7, multiple task configurations 130 can be specified, with each task configuration file for a particular chatbot being customized for a set of tasks. For example, task configuration 130a specifies the configuration for tasks T1 and T2, while task configuration 130b specifies the configuration for tasks T2 and T3.
[0069] Each task configuration specifies, among other details, the entities associated with the execution of the task. For example, as specified in task configuration 130, task T1 uses entities E1 and E2, while task T2 uses entities E2 and E3. The specifications of a task in two different configuration files may be different. Thus, different entities may be specified as being associated with the same task in two different task configurations. For example, task configuration 130b specifies that task T2 uses entities E3 and E4, while configuration 130b specifies that task T2 uses entities E2 and E3.
[0070] The entity configuration 135 specifies methods for different entity types. For example, the entity configuration 135 specifies entity types E1, E2, E3, and E4. Additionally, the entity configuration 135 specifies methods M1 and M2 for processing entity type E1, methods M3 for processing entity type E2, methods M4 and M5 for processing entity type E3, and methods M6 for processing entity type E4. In one embodiment, the entity configuration is specified independent of the task configuration. Thus, the entity configuration is used independent of the task configuration that the chatbot uses. In another embodiment, the entity configuration may be specific to a task configuration. Thus, the entity configuration is used whenever the chatbot uses the corresponding task configuration. In one embodiment, the system can use a combination of task-specific entity configurations and task-independent configurations. For example, some entity types are specified independent of the task configuration, and some entity types are specified for a particular task configuration.
[0071] In one embodiment, the same entity type may have one configuration in the task-independent entity configuration and another configuration in the task-specific entity configuration. The task-specific entity configuration identifies the particular task for which the entity configuration is specified. For example, the task-specific entity configuration may specify an entity configuration of entity type E1 for task T1. The task-specific entity configuration is used when the chatbot is using that task, e.g., task T1. The same entity type may be used for other tasks, e.g., tasks T2 and T3. If the chatbot using the task configuration specifies other tasks, such as tasks T2 and T3, the entity specification from the task-independent entity configuration is used.
[0072] Below is an example of a task configuration (Configuration B) that specifies the task check_order. Although the following shows only one task, any number of tasks can be specified in a task configuration. [Table 3]
[0073] The task configuration includes a description (line B2), one or more examples (lines B3-B8), one or more entity types (lines B9-B13), and success criteria (lines B14-B21). The examples specify examples of natural language sentences that may be used by a user to request that particular task. The entity types identify the entities associated with that task. The success criteria may be logical expressions that specify operations that must be performed to successfully complete the task. The operations may specify specific entity actions that must be performed to successfully complete the task. If the expression describing the success of the task is an OR operation performed on entity actions associated with entities E1 and E2, the task is completed if either E1 or E2 has performed the corresponding entity action and is evaluated successfully. Thus, an OR expression is evaluated successfully if any of the sub-expressions of the OR expression are evaluated successfully. An AND expression is evaluated successfully if all sub-expressions of the AND expression are evaluated successfully, indicating that the user has successfully verified that part of the authentication.
[0074] The online system supports a set of entity actions that can be specified in the task configuration. For example, a task configuration can specify the entity action INFO, which specifies that the online system provides entity information. The entity action QUERY specifies that the online system searches for entities based on user-provided information. Similarly, the entity action INSERT specifies that the online system inserts records based on user-provided information. The entity action DELETE specifies that the online system deletes identified records based on user-provided information. The entity action UPDATE specifies that the online system updates identified records based on user-provided information. Similarly, the system can support other actions. The user can define entity functions using functions, methods, etc., specified using a programming language.
[0075] Below is an example of an entity configuration file (Configuration C). [Table 4]
[0076] This is a task-specific entity configuration used during the execution of a task, e.g., the verify_user task (line C1). The entity configuration specifies two entity types: email_address (lines C2-C7) and zip_code (lines C8-C17). For each entity type, the entity configuration specifies a value for the type of the entity (lines C3-C4, C9-C10), one or more methods associated with the entity (lines C5-C6, C11-C17), and a confirmation flag (lines C7, C27). The confirmation flag specifies whether the system needs to confirm with the user if the value determined for the entity is correct. For example, the conversation engine can ask a question such as "Did you mean your email address is abc@email.com?" For the entity type email_address, the specified type is "email", a single method "spelling" is specified, and the value of the confirmation flag is "yes". For the entity type zip_code, four methods are specified. Named entity recognition (ner, line C12), spelling (line C13), regular expressions (regex, line C14), and fuzzy matching (lines C15-C17). Details of these methods are further described herein.
[0077] In some embodiments, the task configuration specifies a user-defined entity function. The user-defined entity function can be specified using a programming language, such as PYTHON. For example, the above exemplary task configuration specifies a function funcGetWeather (line C27) that checks the weather for a zip code corresponding to the entity zip_code. The function funcGetWeather can include instructions for interacting with a web service that provides weather information. The function funcGetWeather can be called by the conversation engine during a conversation with a user to provide weather conditions for a particular zip code.
[0078] In one embodiment, the entity configuration specifies a "response" attribute (line C28) that defines the response provided to the user by the conversation engine during the conversation. The response is provided by the conversation engine after the online system processes an entity that specifies the "response" attribute. In one embodiment, The "answer" attribute specifies a template that contains the value associated with the entity. For example, the "answer" attribute of the "zip_code" entity in the above example may specify that the output of funcGetWeather should be appended to the string "The weather currently is" and provided to the user in response to the user's question. Thus, the "answer" attribute allows the user to customize the response associated with the entity. If the entity configuration does not specify a "answer" attribute, the conversation engine may use a default response, for example a statement such as the string "The value is" that is appended to the entity value. Similarly, the "prompt" attribute allows the user to customize the prompt that is displayed to the user when the conversation engine requests a value from the user instead of using a default prompt.
[0079] The instructions for each method are stored in a file and can be accessed to process the entity. The system can perform specific checks associated with the type of the entity type to ensure that the determined value conforms to the type. For example, the type EMAIL can specify a particular format.
[0080] In some embodiments, an entity configuration specifies a question as a template, including a combination of text strings and values. For example, an entity configuration can specify the question "What is +entity_name". The conversation engine generates a question based on the template to ask the user. The conversation engine 150 stores a set of default templates to generate questions to ask the user. The conversation engine 150 checks the entity configuration to determine whether the entity configuration specifies a template for a question for a particular context. If the entity configuration specifies a template for a question for that particular context, the conversation engine 150 uses the template of the entity configuration, or else the conversation engine 150 uses the default template.
[0081] An example of a context is when a user provides a value of an entity type that is invalid. The conversation engine processes the received value to determine the type of error in the received value. The entity configuration specifies a template for a question for a particular type of error. If the error is a format error caused by an incorrect format of the entity value, the conversation engine uses a template that provides format information for the entity type in the question. For example, if a user utterance provides an order number with an invalid format, the conversation engine generates the following question and asks the user: "The order number is a combination of three letters and three digits. Can you give me a valid order number?" Thus, the entity configuration contains a set of questions to obtain entity values during a chatbot conversation.
[0082] Running the conversation engine Various processes associated with determining the intent of an utterance provided by a user in a chatbot conversation are illustrated in Figures 8-9. Other embodiments may perform the steps of these flowcharts in a different order. Additionally, various embodiments may include different and / or additional steps than those described herein.
[0083] Figure 8 is a flow chart illustrating the overall process of processing a user's utterance, according to one embodiment. The conversation engine 150 receives 810 a conversation engine configuration that specifies the behavior of the conversation engine configured to execute a given chatbot. The conversation engine configuration specifies the set of states that a given chatbot can be in, and the actions that the conversation engine will take in each state to execute any chatbot. The conversation engine 150 receives a chatbot configuration that specifies the tasks that the chatbot will support. The conversation engine 150 initializes the state of the chatbot, for example, by resetting all state and flag values.
[0084] The conversation engine 150 executes the chatbot according to the chatbot configuration and performs the task by repeating steps 840, 850, and 860. The conversation engine 150 receives a user utterance. The conversation engine 150 determines attributes of the user utterance that correspond to flags specified in the conversation engine configuration. The conversation engine 150 determines actions to be performed based on the state of the chatbot and the attributes of the user utterance. These actions cause the conversation engine 150 to perform various steps, including (1) identifying a task requested by the user, (2) collecting information required to perform the task, e.g., entities processed by the task, (3) updating the state of the chatbot, etc. The actions can perform these steps over multiple iterations. For example, the conversation engine can determine the user's intent in one iteration and determine the value of the entity in each iteration. The conversation engine 150 executes the identified action and then repeats the above steps. The conversation engine 150 can update the state of the chatbot in each iteration. The conversation engine 150 may also generate and send a response to the user at the end of each iteration. After providing a response to the user, the conversation engine 150 receives the user's utterance for the next iteration. If the conversation engine 150 determines that the conversation should end, the conversation engine 150 generates a goodbye response to say goodbye to the user and ends the session with the user.
[0085] 9 is a flow chart illustrating a process of performing a task using a customized chatbot, according to one embodiment. The conversation engine 150 receives 910 the chatbot configuration 125. The chatbot configuration 125 includes a task configuration 130 and an entity configuration 135. Thus, the conversation engine 150 receives 920 the task configuration 130 and receives 930 the entity configuration 135.
[0086] The conversation engine 150 repeats steps 940, 950, 960, and 970 to perform processing of the task requested by the user based on the conversation with the user. The conversation engine 150 receives 940 the user's utterance. The conversation engine 150 determines 950 the task requested by the user based on the user's utterance. In one embodiment, the conversation engine 150 compares the user's utterance with example phrases associated with different types of tasks supported by the chatbot to identify the type of task requested by the user. For example, the conversation engine 150 can use a neural network to compare the user's utterance with the example phrases.
[0087] The conversation engine 150 determines the types of entities relevant to processing the requested task based on the task configuration. The conversation engine 150 determines the values of the entities relevant to processing the requested task. Each entity can be determined based on how it corresponds to the entity type defined in the entity configuration. For example, the conversation engine 150 can ask the user for a value of a given type of entity, the conversation engine 150 can access the value of the entity from a database, the conversation engine 150 can access a web service to determine the value of the entity, etc. The conversation engine 150 executes the task based on the determined values of the entities.
[0088] 10A-10D illustrate the execution of a task by a conversation engine according to one embodiment. In response to a user providing a user utterance of “I would like to check order”, the conversation engine constructs a task structure as shown in FIG. 10A. Based on an analysis of the user utterance, the conversation engine determines whether it corresponds to the check order_task (line B1). In accordance with the exemplary configuration B, successful completion of the task (lines B14-B21) includes executing the task verify_user (node 1015) and determining the values of entities E1 and E2 (nodes 1012 and 1018, respectively). Thus, the conversation engine 150 adds a check_order task 1020 and a verify_user 1008 to the root task. The user verification task includes verifying entities E1 (email_address) and E2, represented as nodes 1005 and 1010. The conversation engine generates a response that requests the user to provide an email address. Once the user provides an email address, the email address received from the user is entered into node 1022. The conversation engine continues processing the tasks according to the task tree.
[0089] While the system is executing a conversation related to a check order, the user may context switch. For example, the user may ask a question requesting the system to check the stock price of a given company. The conversation engine adds a new task, check_stock (node 1025 in FIG. 10B), to the root node. The conversation engine keeps track of two tasks. The conversation engine executes task check_stock. When task check_stock is completed, the conversation engine returns to completing task check_order. The conversation engine resumes task check_order from the state it left when the system performed a context switch to task check_stock. For example, after completing the check_stock task, the conversation engine may ask the user for the user's zip code to execute node 1028.
[0090] If the user requests order confirmation again for another order, the conversation engine reuses the information available for the session. For example, the conversation engine does not need to run the verify_user task again because the email address and zip code have already been requested from the user. By maintaining the task structure, the conversation engine can determine if information was previously requested during this session or is needed again. The conversation engine simply asks the user to provide a new order ID (node 1032, FIG. 10C) and the new task can be executed.
[0091] During the conversation, the conversation engine allows the user to request additional tasks. For example, the user may utter “I want to order 3 more pizzas”. The conversation engine determines that the user is requesting a new task, update_order, and adds node 1035 (FIG. 10D). The conversation engine determines that the update order task also requires the conversation engine to verify the user. However, in the current session, the conversation engine determines that the user is verified based on the previous task, and accordingly, a new verify_user task (node 1038, FIG. 10D) is populated with the results previously obtained for node 1008. The new task update_order requests the conversation engine to determine the quantity (node 1040) to update the order. The user’s utterance of “I want to order 3 more pizzas” provides the user’s intent as well as the entity information, i.e., the quantity, for node 1040.
[0092] In one embodiment, the conversation engine generates a visualization of the task structure for display via a user interface. The visualization corresponds to the screenshots shown in Figures 10A-10D. The visualization can be used to test and debug the conversation engine. In this embodiment, the conversation engine includes a user interface manager that analyzes the tree structure at each stage, generates images representing the tree structure, and renders the generated images via a user interface.
[0093] Computer Architecture 11 is a high-level block diagram illustrating a functional view of a typical computer system that may be used as one of the entities depicted in the environment 100 of FIG. 1, according to one embodiment. Shown is at least one processor 1102 coupled to a chipset 1104. Also coupled to the chipset 1104 are memory 1106, storage device 1108, keyboard 1110, graphics adapter 1112, pointing device 1114, and network adapter 1116. A display 1118 is coupled to the graphics adapter 1112. In one embodiment, the functionality of the chipset 1104 is provided by a memory controller hub 1120 and an I / O controller hub 1122. In another embodiment, the memory 1106 is coupled directly to the processor 1102 instead of the chipset 1104.
[0094] Storage device 1108 is a non-transitory computer-readable storage medium, such as a hard drive, a compact disc read-only memory (CD-ROM), a DVD, or a solid-state memory device. Memory 1106 holds instructions and data used by processor 1102. Pointing device 1114 may be a mouse, a trackball, or other type of pointing device and is used in combination with keyboard 1110 to input data into computer system 1100. Graphics adapter 1112 displays images and other information on display 1118. Network adapter 1116 connects computer system 1100 to a network.
[0095] As is known in the art, computer 1100 may have different and / or other components than those depicted in Figure 11. Additionally, computer 1100 may lack certain depicted components. For example, a computer system 1100 operating as an online system 120 may lack a keyboard 1110 and a pointing device 1114. Additionally, storage device 1108 may be local and / or remote from computer 1100 (such as embodied in a storage area network (SAN)).
[0096] The computer 1100 is adapted to execute computer modules for providing the functionality described herein. As used herein, the term “module” refers to computer program instructions and other logic for providing a particular function. A module may be implemented in hardware, firmware, and / or software. A module may include one or more processes and / or be provided by only a portion of a process. A module is typically stored in the storage device 1108, loaded into the memory 1106, and executed by the processor 1102.
[0097] 1 may vary depending on the embodiment and the processing power used by the entities. For example, a client device 115 may be a mobile phone with limited processing power, a small display 1118, and lack a pointing device 1114. In contrast, an online system 120 may include multiple blade servers that work together to provide the functionality described herein.
[0098] Additional Considerations The particular naming of components, term capitalization, attributes, data structures, or other programming or structural aspects are not required or important, and mechanisms for implementing the described embodiments may have different names, formats, or protocols. Further, the system may be implemented through a combination of hardware and software as described, or entirely in hardware elements. Also, the particular division of functionality between various system components described herein is merely exemplary and not required. Functions performed by a single system component may instead be performed by multiple components, and functions performed by multiple components may instead be performed by a single component.
[0099] Some of the above descriptions have been characterized in terms of algorithms and symbolic representations of operations on information. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. While these operations have been described in functional or logical terms, they will be understood to be implemented by computer programs. Additionally, and without loss of generality, it has proven convenient at times to refer to compositions of these operations as modules or by functional names.
[0100] As is apparent from the above description, unless otherwise indicated, throughout the description, descriptions using terms such as “processing,” “computing,” “calculating,” “determining,” “displaying,” and the like are understood to refer to operations and processes involving a computer system or similar electronic computing device that manipulate and transform data that is represented as physical (electronic) quantities in the computer system memory or registers, or other such information storage, transmission, or display device.
[0101] Certain embodiments described herein include process steps and instructions that are described in the form of an algorithm. It should be noted that the process steps and instructions of the embodiments may be embodied in software, firmware, or hardware, and if embodied in software, may be downloaded to reside on and operated from different platforms used by a real-time network operating system.
[0102] The described embodiments also relate to apparatus for performing the operations herein. The apparatus may be specially constructed for the required purposes or may include a general purpose computer selectively activated or reconfigured by a computer program stored on a computer-readable medium accessible by the computer. Such computer programs may be stored on a non-transitory computer-readable storage medium, such as any type of disk including, but not limited to, a floppy disk, an optical disk, a CD-ROM, a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an EPROM, an EEPROM, a magnetic or optical card, an application specific integrated circuit (ASIC), or any type of media suitable for storing electronic instructions, and each connected to a computer system bus. Furthermore, the computers referred to in the specification may include a single processor or may be architectures employing multiple processor designs to increase computing power.
[0103] The algorithms and operations presented herein are not inherently related to any particular computer or other apparatus. Various general-purpose systems may also be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these systems, along with equivalent variations, will be apparent to those skilled in the art. In addition, the present embodiments are not described with reference to any particular programming language. It will be understood that a variety of programming languages may be used to implement the teachings of the embodiments as described herein.
[0104] Embodiments are well suited for a wide variety of computer network systems across multiple topologies, including configuration and management of large networks including different computer and storage devices, storage devices and computers that are communicatively coupled via a network, such as the Internet.
[0105] Finally, it should be noted that the language used herein has been chosen primarily for purposes of ease of reading and explanation, and not to delineate or limit the subject matter of the invention. Thus, the disclosure of the present embodiments is intended to be illustrative, but not limiting.
Claims
1. 1. A computer-implemented method executed by a conversation engine configured to implement a chatbot, comprising: receiving, by a conversation engine configured to implement a chatbot, a conversation engine configuration from a first client device; the conversation engine configuration specifies a set of states the chatbot can be in and actions to be taken by the conversation engine in each state to implement the chatbot; Steps and receiving, by the conversation engine, from the first client device a chatbot configuration specifying a number of tasks to be supported by the chatbot; Each task is configured to be performed in response to a user request received via the chatbot. Steps and initializing, by the conversation engine, a state of the chatbot; implementing, by the conversation engine, the chatbot according to state and action information in the received conversation engine configuration and task information in the received chatbot configuration; receiving, from a second client device, an utterance of the user; performing an action based on the initialized state of the chatbot and one or more attributes of the user's utterance, the action comprising: (1) identifying a task requested by the user from the user utterance; (2) collecting values of one or more entities to perform the task; and (3) performing the task based on the value of the entity; and updating a state of the chatbot based on the action performed; generating and sending a response to the user at the second client device based on the updated state of the chatbot; performing one or more tasks by repeating a number of steps, including: A method comprising:
2. the state of the chatbot is represented using a set of state variables stored in a lookup table mapping, for each state variable, an identifier of the state variable to a value of the state variable; The method of claim 1.
3. the state variable indicates whether the response generated by the conversation engine for the user is intended to prompt the user for certain information; The method of claim 2.
4. The state variables are configured to determine whether the responses generated by the conversation engine for the user are: (1) a task requested by the user; (2) the value of an entity for performing the task; or (3) whether the user wishes to continue the conversation with the conversation engine; indicates whether the purpose is to check one of the following: The method of claim 2.
5. the conversation engine configuration specifies whether the conversation engine should prompt the user after identifying a task corresponding to the user's utterance; The method of claim 1.
6. the conversation engine configuration specifies whether the conversation engine should prompt the user after determining the entity values for performing the task; The method of claim 1.
7. the conversation engine configuration specifies the number of times the conversation engine will repeat the response if the user's utterance does not provide an answer to the response; The method of claim 1.
8. The attribute of the user's speech indicates a polarity of the user's speech, The polarity is Positive, Negative, or Neutral. The method of claim 1 , wherein the
9. the attribute of the user's utterance indicates whether the user's utterance contains information expected by the conversation engine based on previous responses provided by the conversation engine to the user; The method of claim 1.
10. the user utterance expresses a request to perform a new task while one or more previous tasks have not completed execution by the conversation engine. The method of claim 1.
11. the conversation engine stores a data structure to represent a plurality of tasks currently being performed by the conversation engine for the user based on a conversation with the user; The method of claim 1.
12. the conversation engine configuration determines an action to be taken by the conversation engine when a task for the user is completed and there are uncompleted tasks stored in the data structure; The method of claim 11.
13. the data structure is a last-in, first-out stack data structure; The method of claim 12.
14. The user's utterance is received as an audio signal of a natural language sentence spoken by the user; The method further comprises: converting the audio signal of the user's speech into a text signal for processing by the conversation engine; The method of claim 1 , comprising:
15. The method further comprises: responsive to receiving the conversation engine configuration, generating a set of instructions for processing a user request based on a chatbot conversation with the user; The method of claim 1 , comprising:
16. The chatbot configuration specifies a set of example phrases for each task; The identification of the task by the conversation engine comprises: using a machine learning based model to match the user's utterances with the example phrases specified in the chatbot configuration; The method of claim 1 , comprising:
17. The machine learning based model is a neural network.
17. The method of claim 16.
18. the conversation engine is a multi-tenant system that hosts data and services for multiple tenants; the chatbot configuration is specific to a tenant that uses the multi-tenant system to perform a set of tasks; The method of claim 1.
19. 1. A computer system including a processor and a non-transitory computer-readable storage medium, The non-transitory computer-readable storage medium has instructions stored thereon that, when executed by the processor, cause the processor to: receiving, by a conversation engine configured to implement a chatbot, a conversation engine configuration from a first client device; the conversation engine configuration specifies a set of states the chatbot can be in and actions to be taken by the conversation engine in each state to implement the chatbot; Steps and receiving, by the conversation engine, from the first client device a chatbot configuration specifying a number of tasks to be supported by the chatbot; Each task is configured to be performed in response to a user request received via the chatbot. Steps and initializing, by the conversation engine, a state of the chatbot; implementing, by the conversation engine, the chatbot according to state and action information in the received conversation engine configuration and task information in the received chatbot configuration; receiving, from a second client device, an utterance of the user; performing an action based on the initialized state of the chatbot and one or more attributes of the user's utterance, the action comprising: (1) identifying a task requested by the user from the user utterance; (2) collecting values of one or more entities to perform the task; and (3) performing the task based on the value of the entity; and updating a state of the chatbot based on the action performed; generating and sending a response to the user at the second client device based on the updated state of the chatbot; performing one or more tasks by repeating a number of steps, including: A computer system that performs the above steps.
20. A non-transitory computer-readable storage medium having instructions stored thereon, The instructions, when executed by a processor, cause the processor to: receiving, by a conversation engine configured to implement a chatbot, a conversation engine configuration from a first client device; the conversation engine configuration specifies a set of states the chatbot can be in and actions to be taken by the conversation engine in each state to implement the chatbot; Steps and receiving, by the conversation engine, from the first client device a chatbot configuration specifying a number of tasks to be supported by the chatbot; Each task is configured to be performed in response to a user request received via the chatbot. Steps and initializing, by the conversation engine, a state of the chatbot; implementing, by the conversation engine, the chatbot according to state and action information in the received conversation engine configuration and task information in the received chatbot configuration; receiving, from a second client device, an utterance of the user; performing an action based on the initialized state of the chatbot and one or more attributes of the user's utterance, the action comprising: (1) identifying a task requested by the user from the user utterance; (2) collecting values of one or more entities to perform the task; and (3) performing the task based on the value of the entity; and updating a state of the chatbot based on the action performed; generating and sending a response to the user at the second client device based on the updated state of the chatbot; performing one or more tasks by repeating a number of steps, including: A non-transitory computer-readable storage medium for implementing the above.
Citation Information
Patent Citations
System for processing user utterance and controlling method thereof
EP3531416A1
Creating coordinated multi-chatbots using natural dialogues by means of knowledge base
US20180025726A1
Method, system and program for generating decision trees for chatbots dialog flow capabilities
US20200125901A1
User-configured and customized interactive dialog application
WO2019070826A1
