Automatic Dialog Flow Extraction and Guidance (2023)

Abstract: Today, human assistants are often replacedby chatbots, designed to communicate via natural language, however, some disadvantages are notorious with this replacement. This PhD thesis project consists of researching, implementing, and testing a solution for guiding the action of a human in a contact center. It will start with the discovery and creation of datasets in Portuguese.Next, it will go through three main components: Extraction for processing dialogs and using the information todescribe interactions; Representation for discovering the most frequent dialog flowsrepresented by graphs; Guidance for helping the agent during a new dialog. These will be integrated in a single framework. In order to avoid service degradation resulting from the adoption of chatbots, this work aims to explore technologies in order to increase the efficiency of the human’s job without losing human contact.

## introduction in the past, a consumer's only option for customer service was to speak directly with a service employee. now, many customer interactions are handled by automated systems powered by artificial intelligence called chatbots @xcite . during the last few years, there has been a growing interest in text-based chatbots. however, despite the market's enthusiastic predictions, chatting with this type of agent raises some technological limitations, directly involving the human side of the interaction @xcite . that said, this thesis project proposes to prevent call-center service degradation and customer dissatisfaction through the use of chatbots, taking advantage of technologies that can make a human's job more efficient without losing human contact. this work consists of researching, implementing and testing a solution to aid communication between participants, suggesting appropriate responses, thus anticipating their interventions. this guidance can be supported by the history of interactions, where information is extracted from and frequent dialog flows are discovered, which may then be used for guiding humans engaging in new dialogs of the same kind. the approaches will be applied to task-oriented dialog transcriptions (e.g. call center), providing a more efficient and facilitated service. it begins by identifying, collecting and annotating dialogs written in portuguese to be used in the experimentation and make available to the community. we plan to tackle the problem with a threecomponent pipeline: extraction, for processing dialogs, extracting information from them and classifying interactions; representation of the most frequent dialog flows, by graphs of interaction classes; guidance, for assisting a human agent during a new dialog. all components are often tackled in the scope of dialog modelling (dm) @xcite to allow the reproduction of aspects of a natural conversation. research in the area of dialogs is currently booming, with interest in chatbots, but most systems are developed for english. instead, this work has innovative potential in the area because it is targeted for portuguese. in the next section, important concepts for understanding this research are introduced and an overview of related work is given. it includes an introduction to portuguese datasets, research work on chatbots and its limitations, with the remaining subsections divided according to the three components of the project. in section 3, the research proposal and the intended methodologies are presented. finally, section 4 presents some preliminary experiments, using nlp tools and related extraction tasks. ## background and related work this section starts with the presentation of a portuguese dataset, then it is checked how chatbots and human-based customer service can be so different, and finally it is divided into the three components of the project where concepts and related work for each are found. ## research proposal the main goal of this phd thesis is the research and development of approaches to help communication between interlocutors in a dialog, in portuguese, guiding the operator's action that can be supported by previous interactions. information is to be automatically extracted and frequent dialog flows are identified, allowing their representation to guide the human in how to respond. to this extent, we define five specific objectives to be achieved throughout the development of the research work: to achieve the five defined objectives presented above, the following tasks were defined: the experiments will be focused with data in portuguese, which will be a differentiating factor. they will also be limited to written text, i.e., written conversations or transcripts of oral communication. several alternatives will be explored to obtain the data: following the woz paradigm @xcite , where a conversation is held between two interlocutors in which one is assigned a certain task and to accomplish this task, this user must interact, using natural language, with another who will have access to more information about the domain (for example, a database or a service such as booking foot_4 ) and will be able to provide appropriate answers. interaction can be done through any chat application, such as slack or microsoft teams; transcripts of existing dialogs in portuguese, such as coraa @xcite ; customer support services on social networks, such as conversations with telecom operators on twitter foot_5 ; movie subtitles @xcite ; translation of english datasets (e.g. dailydialogue @xcite or multiwoz @xcite ) into portuguese, from which it will be possible to import existing annotations. the data will be used in the development of a framework consisting of three components: the first component processes real dialog transcripts and extract useful information from them to represent the interactions, such as keywords, entities or actions. the extraction of some of these items may resort to an nlp pipeline @xcite , but some additional development may be required, considering the language (portuguese) and the type of text (dialog). the extracted information can be used to better describe utterances, classifying intentions and filling slots. however, performing these tasks is usually based on supervised learning, which involves data annotation, something to consider during data definition. it can also be used to group similar utterances, using clustering. this process can make use of sentence embedding techniques @xcite to represent utterances. during the extraction process, it is necessary to remove from the text private information about the client in order to ensure the confidentiality of the data. in figure 1 , we show an example of a dialog in which the customer requests the cancellation of an order he previously placed. sometimes, the information found in knowledge bases is not organized in a way that facilitate its use by the agent in a conversation @xcite . therefore, the project to be developed will answer the question of how to improve the organization and representation of information that supports the agent's assistance during a conversation. interactions with customers are dependent on need and context. even if the information is up to date, we need to make sure that we effectively map the need expressed by the possible solutions and use the context to ensure that we choose the solution that best fits that specific case. to this end, the project will be able to answer the question of how to find the best solution for customer's need and how to ensure that this solution fits its context. the second component will aim to discover the most frequent dialog flows, represented by graphs, where the vertices represent speech classes or groupings, and the arcs represent transitions between them, with probabilities. in this component one can apply the classification of interactions into more generic classes (das) or, if there is a lack of data to make the system less domain-dependent, perform a grouping that approximates these acts. to facilitate human interpretation, it will be important to have a way to describe the groupings/classes through relevant n-grams or verb phrases. figure 2 shows an example of a dialog graph, generated from the previous dialog flow. finally, the guidance component will take advantage of the representation of flows to guide the human. the ability to take into account the previous statements is key to building dialog systems that can keep conversations active and engaging @xcite . past interactions are an important source of information about customers and how their needs are met by agents, however, due to the complexity of working with past interactions, they are generally ignored. we aim to find the best approaches to extract from past interactions the knowledge needed to guide agents on how to respond to customer needs. in each interaction, previous interactions will be considered to suggest responses, while anticipating the next interactions. it will function as a rs @xcite in the sense that we want to recommend speech and/or actions. figure 3 shows an example of a user interface with expressions used in dialog and the recommendations provided by the guidance component. the approaches resulting from tasks 3, 4, and 5 will be evaluated independently but a final eval-uation of their integration into the framework is required. in this way, the approaches will be evaluated on the data collected and created using metrics for classification, used when annotations are produced, or metrics for clustering when this is not the case. due to the subjectivity of the quality of the flows identified and the guidance produced, a subjective evaluation based on human opinions using the resulting framework is imperative, as well as an objective evaluation where a control group that uses the node-generated graphs and a group that does not is selected and the average success rates and response times are then compared. ## preliminary experiments the exploration of some nlp tools, through the spacy foot_6 library such as pos tagging considering verbal syntagma, ner and coreference resolution was performed and dac, taking into account different vector representations, was done for these tasks in order to generalize utterances. given that das can be seen as generic intents, a possible representation of dialog flows is through a graph of das. transitions between das may further have assigned probabilities, computed from the dialogue history. this can be see as a markov chain, and its inspection may further enable the identification of communication patterns. for illustrative purposes, we generated such a representation for the mastodon dataset @xcite and its annotated das, with the help of the networkx foot_7 package. the flow can be visualized in figure 4 , where nodes were also included for the start (sod) and end (eod) of dialog. transitions with probability below 0.05 were ignored. ## conclusion this research proposal aims to improve the customer/human experience when contacting a callcenter, by improving the responsiveness of human agents in conversations, guided by intelligent methods and nlp about the current context and about previous interactions with customers. to achieve this goal, the project is organized into three components: extraction, representation and guidance. one of the challenges involved is that this project will be focused on portuguese, a language for which there is little work in this area. the existing work for the automatic extraction of dialog flows is still underdeveloped and has been applied in a small scope and scale. furthermore, this work is usually referenced in the context of application to chatbots, and its application is not oriented towards human agents. the development of the proposed solution allows for the automatic extraction of dialog flows from past interactions, guiding human agents, and may represent a breakthrough in the state of the art in this area, answering the question of how to find the best solution for the customer's needs and how to ensure that this solution fits the customer's context. thus, the use of chatbots is increasingly present, however, we believe that human agents have a relevant role in contact centers, since they can handle situations with a level of complexity that is not yet within the reach of any chatbot and there is no distance between customers and human interlocutors. all relevant findings and results will be published in reports, articles and scientific papers, in addition to the resulting doctoral thesis.