The present invention relates to techniques to utilize a sequence-to-sequence deep neural network model to learn to generate user utterances and predict conversation quality in a human to bot dialogue setting
Goal oriented dialogue systems have become a prominent customer-care interaction channel for most businesses. However, not all interactions are smooth, and customer intent misunderstanding is a major cause of dialogue failure. Conversation data is complex and includes many data variants. The main reason for sub-optimal and failed conversations may be attributed to bot's misinterpretation of user request, that is, the user's information need or intent.
Typically, users express their intent at the beginning of the conversation, and the bot reacts with its most suitable response. Bot responses are dependent on user intents. Ultimately, an accurate bot response depends on its ability to correctly understand the intent. Bot misunderstanding of the user intent will most probably lead to an unsatisfactory response, which in turn will cause the user to react accordingly. For example the user might ask for a human agent, express negative sentiment, or rephrase the request.
Conventional solutions use some kind of intent prediction. In these solutions interpreting user needs is based, in naive implementations, on analyzing the last utterance provided by the user, and in more sophisticated implementations, on analyzing the full conversation context, available till the point of prediction.
Accordingly, a need arises for improved techniques to determine user intent in conversations with dialogue systems so as to improve the quality of such conversations and to reduce the number of failed conversations.
Embodiments may provide improved techniques to determine user intent in conversations with dialogue systems so as to improve the quality of such conversations and to reduce the number of failed conversations. For example, embodiments may utilize a sequence-to-sequence deep neural network model, such as Text to Text Transfer Transformer (T5), to learn to generate user utterances and predict conversation quality in a human to bot dialogue setting. Embodiments may use this model for assessing end-to-end conversation quality. Embodiments may further apply the utterance generation capability for improving bot responses in run-time by generating counterfactual user utterances and then predicting conversation quality based on these utterances. The bot may then be directed to interpret user needs based on the most promising counterfactual flow. Embodiments may score of conversation based on three utterances, the user's utterance, the bot's response, and a third utterance generated by a model trained to predict user response to the first two utterances. Such embodiments may provide better results than embodiments that take only the first one utterance, or the first two utterances, into account.
For example, in an embodiment, a method may be implemented in a computer system comprising a processor, memory accessible by the processor, and computer program instructions stored in the memory and executable by the processor, and the method may comprise receiving, at a dialogue system, a first text utterance from a user, generating a plurality of second text utterances at the dialogue system in response to the received text utterance, generating a third text utterance based on each generated second text utterance using a trained deep neural network model, generating a score indicating an accuracy of predicting an intent of the user based on the first text utterance, one of the second text utterances, and the third text utterance based on the one of the second text utterances the first text utterance, one of the second text utterances, and the third text utterance based on the one of the second text utterances, and outputting to the user the second text utterance included in the conversation having the highest quality score.
The method may further comprise selecting as a user intent the one of the predicted intents upon which the second text utterance included in the conversation having the highest quality score is based. The trained deep neural network model may be trained using domain data including at least one of user-dialogue system conversation logs and user-human conversation logs. The trained deep neural network model may be fine-tuned using at least one of intent prediction data, conversation assessment data, and generated third text utterances. The trained deep neural network model is fine-tuned using at least one of repetition of utterances, reordering of utterances, and escalation of a conversation.
In an embodiment, a system may comprise a processor, memory accessible by the processor, and computer program instructions stored in the memory and executable by the processor to perform receiving, at a dialogue system, a first text utterance from a user, generating a plurality of second text utterances at the dialogue system in response to the received text utterance, generating a third text utterance based on each generated second text utterance using a trained deep neural network model, generating a score indicating a quality of each conversation, wherein each conversation includes the first text utterance, one of the second text utterances, and the third text utterance based on the one of the second text utterances, and outputting to the user the second text utterance included in the conversation having the highest quality score.
In an embodiment, a computer program product may comprise a non-transitory computer readable storage having program instructions embodied therewith, the program instructions executable by a computer, to cause the computer to perform a method that may comprise receiving, at a dialogue system, a first text utterance from a user, generating a plurality of second text utterances at the dialogue system in response to the received text utterance, generating a third text utterance based on each generated second text utterance using a trained deep neural network model, generating a score indicating a quality of each conversation, wherein each conversation includes the first text utterance, one of the second text utterances, and the third text utterance based on the one of the second text utterances, and outputting to the user the second text utterance included in the conversation having the highest quality score.
The details of the present invention, both as to its structure and operation, can best be understood by referring to the accompanying drawings, in which like reference numbers and designations refer to like elements.
Embodiments may provide improved techniques to determine user intent in conversations with dialogue systems so as to improve the quality of such conversations and to reduce the number of failed conversations. For example, embodiments may utilize a sequence-to-sequence deep neural network model, such as Text to Text Transfer Transformer (T5), to learn to generate user utterances and predict conversation quality in a human to bot dialogue setting. Embodiments may use this model for assessing end-to-end conversation quality. Embodiments may further apply the utterance generation capability for improving bot responses in run-time by generating counterfactual user utterances and then predicting conversation quality based on these utterances. The bot may then be directed to interpret user needs based on the most promising counterfactual flow. Embodiments may score of conversation based on three utterances, the user's utterance, the bot's response, and a third utterance generated by a model trained to predict user response to the first two utterances. Such embodiments may provide better results than embodiments that take only the first one utterance, or the first two utterances, into account.
Embodiments may take dialogue context into account to improves intent prediction. Embodiments may train a text-to-text model using a multi-task regime, in which the secondary task is used to predict the succeeding user utterance, which further improves the main task of intent prediction. Further, embodiments may generate a successive user utterance and use it as a look-ahead signal to improves prediction in inference time where the real utterance is not yet available.
It is to be noted that embodiments of the present techniques may receive text from a user, such as chat app text, text messages, email messages, etc., which may be received by a dialogue system or “bot” that may generate a textual response that is then sent to the user using similar media. Likewise, embodiments of the present techniques may receive voice signals from a user, such as from phone calls, and the voice signals may be converted to text for processing the bot. Likewise, the textual responses generated by the bot may be converted to speech and sent to the user.
An exemplary embodiment of user utterance generation data is shown in
Dialogue representation relies on a complex data structure, composed of multiple utterances, generated alternately by two actors: user and bot. The number of utterances in a dialogue varies dramatically and so does the length of each utterance. To cope with this complexity, and given that the intent classification task benefits from generating user utterances, embodiments may utilize a flexible text-to-text model that supports multi-task training by design.
An example of a text-to-text model that may be used by the present techniques is the Text-to-Text Transfer Transformer (T5) system, which supports multi-training regimes via an encoder-decoder architecture and language-modeling training. In T5, all tasks are mapped into text-in text-out format. Specifically, the model resolves classification tasks by generating the predicted class' label. The model is thus able to use the same loss function and parameter weights across different tasks, data sets, and training regimes.
An exemplary flow diagram of a process 200 of user utterance generation according to embodiments of the present techniques is shown in
At 204, a model may be trained to perform conversation escalation. For example, the model may be trained to predict false if the bot contains the entire conversation and true if the conversation was eventually handled by a human agent. At 206, a model may be trained to perform utterance repetition prediction. For example, the model may predict true for repetitive bot utterances or rephrased user utterances, and false otherwise.
At 208, a model may be trained to generate user utterances. For example, a generative task may be defined to predict the third user utterance from a given first user utterance and successive bot response. This task may be referred to as 3UGG. To train the model, such as a T5 model, on this task, a large amount of unlabeled data may be used, such as data that is continuously generated and logged by the dialogue system during interaction with users. Alternatively, dialogue data from user to human-agent interactions may be used in situations where data from dialogue systems does not exist.
An example of user utterance generation is shown in
Embodiments may utilize the intrinsic synergy between intent classification and utterance generation tasks. For example, the model may be trained on the supervised full-dialogue dataset alone or, to utilize the synergy, the model may be trained on both the supervised dataset and the unsupervised dataset used for successive utterance generation.
At 210, a model may be trained to predict intent, such as contextual intent. For example, embodiments may utilize dialogue context to improve the intent prediction. In an embodiment, semantic utterance classification (SUC), the model may be trained on just the first user-utterance from each dialogue. In an embodiment, semantic dialogue classification (SDC), the model may be trained on, at least three successive utterances. For low data regimes, embodiments may enrich the supervised dialogue data with a weak supervision signal. For example, two or more classifiers may be trained on the available supervised dataset and then used to predict the intent for unlabeled conversations. Samples may be added to the supervised train set for which the two or more classifiers agreed on the predicted intent. To measure the model's ability to correctly understand the intent, embodiments may utilize a full-dialogue test set. Each dialogue in this dataset may include at least three successive utterances that pertain to the same user intent. The model's accuracy may be measured by classifying one, two, and three initial utterances from each dialogue in the dataset.
At 212, the trained models may be used to determine the most likely needs of the user. For example, user needs may be interpreted based on the most promising counterfactual flow, as described below. At 214, the model may further be used to predict conversation quality in a human to bot dialogue setting and to assess end-to-end conversation quality. Second and third utterances may be generated to aid in predicting conversation quality, as described below. At 216, the utterance generation capability may be used to improve bot responses in run-time. For example, counterfactual user utterances may be generated and then conversation quality may be predicted based on these utterances.
Embodiments may use various weak labeling techniques to add labels to the raw dialogue data for each of these tasks. Embodiments may then use these semi-supervised datasets together with the supervised full-dialogue dataset and the unsupervised dialogue data to train a T5 model to predict the user intent.
Embodiments may provide improved intent prediction performance at inference time, while the dialogue is taking place. For example, as shown in
An example of a process 600 of using third utterance generation to improve intent prediction via look ahead is shown in
At 606 and 608, the initial intent predictions may be used to cause the bot to generate alternative utterances. For example, for a predicted intent of “missing completion”, the bot may generate 608 utterance “What is the course ID?”, while for a predicted intent of “search for new activity”, the bot may generate 606 an utterance “which course are you looking for?”. The 3UGG process may be used for each alternative, 602 plus 606, and for 602 plus 608, to generate third utterances 610, 612. For example, generated third utterance 610 may be “I am missing course completion indication” and generated third utterance 612 may be “01 Moodle LMS” (a course ID). Then SDC confidence scores may be computed using all three utterances for each alternative and for each predicted intent. For example, SDC confidence score b1 may be based on predicted intent “search for new activity” and utterances 602, 606, and 610, while SDC confidence score b2 may be based on predicted intent “missing completion” and utterances 602, 606, and 610. In this example, b2 may be less than b1. Likewise, counterfactual (using lower confidence predicted intent) SDC confidence score c1 may be based on predicted intent “missing completion” and utterances 602, 608, and 612, while counterfactual SDC confidence score c2 may be based on predicted intent “search for new activity” and utterances 602, 608, and 612. In this example, c1 may be less than b1. Thus, the highest confidence outcome is based on predicted intent “missing completion” and utterances 602, 608, and 612.
Thus, generating a third utterance renders SDC performance superior to SUC, and makes it comparable to SDC working with three real utterances that are available retrospectively. Embodiments that utilize a generated third utterance benefit from generating successive user utterances and using them as a look-ahead signal during inference.
An exemplary block diagram of a computer system 700, in which processes and components involved in the embodiments described herein may be implemented, is shown in
Input/output circuitry 704 provides the capability to input data to, or output data from, computer system 700. For example, input/output circuitry may include input devices, such as keyboards, mice, touchpads, trackballs, scanners, analog to digital converters, etc., output devices, such as video adapters, monitors, printers, etc., and input/output devices, such as, modems, etc. Network adapter 706 interfaces device 700 with a network 710. Network 710 may be any public or proprietary LAN or WAN, including, but not limited to the Internet.
Memory 708 stores program instructions that are executed by, and data that are used and processed by, CPU 702 to perform the functions of computer system 700. Memory 708 may include, for example, electronic memory devices, such as random-access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), flash memory, etc., and electro-mechanical memory, such as magnetic disk drives, tape drives, optical disk drives, etc., which may use an integrated drive electronics (IDE) interface, or a variation or enhancement thereof, such as enhanced IDE (EIDE) or ultra-direct memory access (UDMA), or a small computer system interface (SCSI) based interface, or a variation or enhancement thereof, such as fast-SCSI, wide-SCSI, fast and wide-SCSI, etc., or Serial Advanced Technology Attachment (SATA), or a variation or enhancement thereof, or a fiber channel-arbitrated loop (FC-AL) interface.
The contents of memory 708 may vary depending upon the function that computer system 700 is programmed to perform. In the example shown in
In the example shown in
As shown in
The present invention may be a system, a method, and/or a computer program product at any possible technical detail level of integration. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention. The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device.
The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, configuration data for integrated circuitry, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, or the like, and procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
These computer readable program instructions may be provided to a processor of a general-purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the Figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
Although specific embodiments of the present invention have been described, it will be understood by those of skill in the art that there are other embodiments that are equivalent to the described embodiments. Accordingly, it is to be understood that the invention is not to be limited by the specific illustrated embodiments, but only by the scope of the appended claims.