Beyond Information: Is C hat GPT Empathetic Enough? (2023)

Abstract: This paper aims to explore and enhance ChatGPT’s abilities to generate more human-like conversations by taking into account the emotional state of the user. To achieve this goal, a prompt-driven Emotional Intelligence is used through the empathetic dialogue dataset in order to propose a more empathetic conversational language model. We propose two altered versions of ChatGPT as follows: (1) an emotion-infused version which takes the user’s emotion as input before generating responses using an emotion classifier based on ELECTRA ; and (2) the emotion adapting version that tries to accommodate for how the user feels without any external component. By analyzing responses of the two proposed altered versions and comparing them to the standard version of ChatGPT, we find that using the external emotion classifier leads to more frequent and pronounced use of positive emotions compared to the standard version. On the other hand, using simple prompt engineering to take the user emotion into consideration, does the opposite. Finally, comparisons with state-of-the-art models highlight the potential of prompt engineering to enhance the emotional abilities of chatbots based on large language models.

## introduction conversational agents have become increasingly popular in recent years, with applications ranging from customer service @xcite to mental health therapy @xcite . however, while these agents have the potential to provide information in natural language, their current abilities to generate human-like and empathetic conversations are limited @xcite . to address this challenge, this study explores the emotional abilities of chatgpt in generating empathetic responses. specifically, we investigate the ef-fectiveness of incorporating external emotion classifiers using prompt engineering to take the user's emotional state into account when generating responses. this study is motivated by the fact that emotions play a crucial role in human communication, and empathetic responses are essential for building rapport and trust in human-machine interactions @xcite . in customer service for instance, it was shown that up to 40% of consumers' requests are rather emotional without specific informational intents @xcite . thus, we compare standard chatgpt that generates responses to simple conversation prompts from the empathetic dialogues dataset @xcite to two slightly modified versions with prompt engineering. the first one is an emotion-infused version that takes the user emotion as an additional input before generating responses using an electrabased emotion classifier; while the second, emotion adapting version tries to consider how the user feels without any external component. our study adds to the expanding literature on conversational agents and emotional intelligence and its results have implications for the design and development of conversational agents that can provide personalized and effective support to users. in the following sections, we provide a brief review of the related work (section 2) then present some relevant preliminary information (section 3). section 4 contains a detailed description of our experimental design while our evaluations and results will be presented in section 5. finally, section 6 concludes this paper and gives some future perspectives. ## related work according to @xcite , a conversational agent can be defined as "a dialogue system that can also understand and generate natural language content, using text, voice, or hand gestures, such as sign language". even though the first chatbot in the literature dates back to 1966, with the rogerian psychotherapist chatbot eliza developed by joseph weizenbaum @xcite , chatbot development has only exploded over the past several years @xcite . their applications have been appearing across a variety of industries thanks to huge data sources, machine learning advancements @xcite , and large language models (llms). conversational agents can be classified based on the response generation method: rule-based systems choose responses from hand-crafted predefined rules but suffer from dull and repetitive responses @xcite . retrievalbased methods use techniques such as keyword matching to find the most approprite response from a fairly large corpus but don't seem very natural @xcite , and generative chatbots provide more diverse conversations but require massive training data @xcite . despite all the advancements in the conversational agents research, it appears that people still prefer natural communication to machine-like interactions and feel that a human can understand them better @xcite . in fact, it was shown in recent studies that customers still prefer interacting with humans over machines @xcite because generating empathetic and humanlike responses is a challenging task for chatbots, as it requires an understanding of the user's emotional state and the ability to respond appropriately. several studies have explored the use of different techniques to improve the emotional abilities of conversational agents. for example, @xcite used a heuristic search technique in order to ensure variety and emotional relevance in the generated replies. other research aimed to identify the emotion of the input message by embedding each input word in a three-dimensional emotion embedding space which dimentsion are valence, arousal, and dominance (vad) @xcite . to address the relevance of the emotional responses, @xcite proposed the empathy hypothesis stating that the type of generated emotion should be consistent with the contextual emotional state of the user, while @xcite argued that we can't assume that the output emotion has to match the input emotion. they claimed that using a predefined label to train the response generator results in poor response quality. @xcite proposed to generate multiple responses for six emotional categories and the best response is then selected with a ranking algorithm. in recent years, the field of natural language processing has witnessed an unprecedented race to develop new llms based on the transformer architecture @xcite which showed a great potential at capturing complex patterns in language data. for instance, gpt-3 by openai @xcite has proven its capacity to produce coherent and human-like language, palm by google @xcite has contributed to reducing the computational requirements for training large models and palm 2 promised advanced reasoning and general capabilities compared to the current state of the art of language models (palm2). recently, chatgpt has demonstrated its remarkable ability to understand and converse with humans fluidly. since its release in november 2022 with impressive language abilities, there has been a growing interest in evaluating the conversational language model for different aspects of natural language understanding (nlu). for instance, @xcite evaluates the multilingual performance of chatgpt on three tasks of language identification, sentiment analysis, and machine translation. @xcite evaluates the performance of chatgpt, beyond english on many natural language processing (nlp) tasks such as ner, nmt, pos, nli, qa, csr. @xcite tried to evaluate chatgpt on 25 different nlp tasks and found that it did very well in most of them, but didn't outperform the state of the art in any particular task. however, to the best of our knowledge, there is still no work on the evaluation of chatgpt on the emotional intelligence level. the exceptional performance of llms on a variety of tasks, even with zero-shot or few-shot settings, has inspired nlp academics to reevaluate the predominant training paradigms from previous years. for example, prompt engineering is a relatively new promising technique that appears to improve llms' performance on downstream tasks. for example, in the context of zero-shot mathematical reasoning, @xcite found that simply prompting gpt-3 with "let's think step by step" quadrupled the accuracy on the multiarith arithmetic dataset, from 18% to 79%! in this paper, we focus on the potential of prompt engineering and external emotion classifiers to enhance the emotional abilities of chatgpt. our study builds upon previous research on prompt engineering and explores the effectiveness of external emotion classifiers in improving chatgpt's ability to generate empathetic responses. ## preliminaries in this section, we introduce some important notions that would be important to understand the design and implementation sections. ## experimental design in this section, we present a detailed description of the three chatgpt versions used in these evaluations as well as the dataset used and the electrabased emotion classifier that we will need for the emotion infused version and for the evaluation part. ## conclusions and future work in this study, we looked at how chatgpt may elicit emotional reactions. our findings imply that using prompt engineering and external emotion classifiers to augment conversational bots' emotional intelligence can be successful. our research adds to the expanding pool of knowledge regarding conversational agents and their emotional intelligence. the findings suggest that external knowledge sources, such as emotion classifiers, can provide a more nuanced understanding of the user's emotional state, and can lead to more effective and natural responses. additionally, our study highlights the potential of prompt engineering to steer existing language models to produce outcomes tailored to our preferences without re-training or even fine-tuning. future research might examine how well chatgpt performs with other prompt designs. other datasets can also be examined to see how that impacts the generated replies. we can also conduct a cross-lingual study to explore the benefits and limits of prompt engineering in generative ai.