AI with Emotions: Exploring Emotional Expressions in Large Language Models (2025)

Abstract: The human-level performance of Large Language Models (LLMs) across various tasks has raised expectations for the potential of artificial intelligence (AI) to possess emotions someday. To explore the capability of current LLMs to express emotions in their outputs, we conducted an experiment using several LLMs (OpenAI GPT, Google Gemini, Meta Llama3, and Cohere Command R+) to role-play as agents answering questions with specified emotional states. We defined the emotional states using Russell’s Circumplex model, a well-established framework that characterizes emotions along the sleepy-activated (arousal) and pleasure-displeasure (valence) axes. We chose this model for its simplicity, utilizing two continuous parameters, which allows for better controllability in applications involving continuous changes in emotional states. The responses generated were evaluated using a sentiment analysis model, independent of the LLMs, trained on the GoEmotions dataset. The evaluation showed that the emotional states of the generated answers were consistent with the specifications, demonstrating the LLMs’ capability for emotional expression. This indicates the potential for LLM-based

## introduction recent advancements in large language models (llms) have enabled artificial intelligence (ai) technologies to achieve human-level performance in a wide range of tasks @xcite . especially, high performance llms such as the generative pre-trained transformer @xcite @xcite series and gemini @xcite , demonstrate remarkable performance and are utilized across a wide range of fields in daily human life. although llms can mimic human-like interactions, making them appear quite human-like, they are known to exhibit inconsistent behavior @xcite , including a phenomenon that results in incorrect outputs, known as hallucinations @xcite . several studies have focused on the human-like aspects of llms. @xcite investigate the personalities of llms using psychometric tests and suggest a method for evaluating the personalities of llms. @xcite demonstrated that there are cases where llms respond to input prompts with emotional content, which intuitively should not be relevant for non-human entities. in contrast to studies embracing the concept of anthropomorphism, there are studies highlighting the differences between humans and llms @xcite @xcite . one approach to exploring the potential for llms to behave like humans involves the concept of role play @xcite . we should keep in mind that the brain and personality are closely related but not identical concepts. by analogy, there is an idea that interprets llms as the backend of a personality, similar to the brain, which controls the personality. personalities created using this idea are often referred to as agents. @xcite conducted a simulative experiment and observed the activities and interactions of agents with a single llm serving as the backend. @xcite suggest a framework for controlling an agent with self-consistent memory and conversational abilities. @xcite discuss the capability to reproduce and control the personalities of llm agents. there is also research focused on reproducing and role-playing the personality of a specific person using conversation records and other information @xcite . in the context of enabling ai to replicate humanlike behavior, emotional expression is a crucial component to investigate. emotional expressions have been a subject of study in robotics for many years, with recent research utilizing llms as engines for generating emotional expressions @xcite @xcite . while emotional expression has been deemed important for interactions with humans, particularly in applications within the field of robotics, its significance is similarly paramount for software-only systems that interact with humans. @xcite investigated the importance of emotional expressions in the case of a chatbot system. we should note that we might feel the ais not only behave as if they have emotions, but actually experience emotions. we can only observe their behavior and speech, not their internal mental dynamics-this is true even for humans, with the exception of ourselves. in this paper, we investigate and compare the capability of llms to express emotions based on russell's circumplex model @xcite , using openai gpt @xcite @xcite , google gemini (gemini team, 2023), meta llama3 (meta, 2024) and cohere command r+ @xcite models as examples of highperformance closed and open models. since emotion is an abstract concept used to describe human speech and behavior, it is necessary to model it in some manner to implement it in a text generation system. russell's model is a parametric model of emotions with two axes: sleepy-activated (arousal) and pleasure-displeasure (valence). we selected this framework due to its simplicity, extensive research support, and its capability to handle continuous values, making it well-suited to computer systems that perform mathematical calculations. we conducted an experiment in which llms role-played an agent following various arousal and valence state instructions and answered questions. the responses were then investigated to determine which emotions could be inferred using an independent sentiment classification model, to evaluate consistency with the instructed emotional state. this experiment can be considered an assessment of the llms' cognitive-linguistic capabilities regarding emotions. we note that we use the term "emotion" with the same meaning as "affect" in this paper, although these terms are distinguished strictly in the field of psychology. ## method here, we present a framework for emotional expressions in text generation using generation models and prompts designed as an ai agent to play a specific role, along with an evaluation model. the framework is based on russell's circumplex model, with text generation performed using 12 emotional states evenly distributed in the arousalvalence space. evaluation is conducted using a sentiment classification model, which maps sentiment labels to the arousal-valence space. ## result we conducted the generation-evaluation experiment on emotional expressions as described in the previous section. examples of the generated answers to the questions are displayed in fig. 3 . we can observe that the agents answer the questions appropriately, and it's possible to note differences in the outputs corresponding to model differences (panels (1) and ( 2 )), emotional state differences ((1) and ( 3 )), and question differences ((1) and ( 4 )). panel (1) illustrates that the gpt-4 agent expresses high arousal and medium negative valence, while panel (2) indicates that the gpt-3.5 turbo model does not properly express displeasure. panel (3) clearly shows an expression that is the opposite of (1), with a more relaxed atmosphere. it is felt that the answers in panels (1) and ( 4 ) have similar tones despite the differences in the questions. the relationship between the arousal-valence states specified in the input prompt and those evaluated by the sentiment analysis model is depicted in fig. 4 . each axis represents a radial coordinate in the arousal-valence space, with 0 • corresponding to (valence, arousal) = (1, 0) and 90 • to (valence, arousal) = (0, 1). the data points show the mean, and the error bars represent the standard deviations for the output across the 10 questions. it is plotted such that the x-and y-positions have values with less than a 180 • difference by adjusting the 360 • uncertainty of the y-position (e.g., placing all data points between the thin black lines). firstly, it is evident that the evaluated results are related to the specified emotional state, indicating that emotional expression was successfully performed for all the models. most of the ranges for the gpt-4 turbo agent (top right panel) fall within @xmath0, whereas more data points for the gpt-3.5turbo agent (top left panel) lie outside this range. this suggests that gpt-4 turbo generates answers that are more finely tuned to the specified emotional state compared to gpt-3.5 turbo. cosine similarities between the specified and evaluated emotional states are summarized in gpt-4 (arousal: -0.866, valence: 0.5) honestly, i'm not entirely sure. it really could go either way. there's potential for great things, but it's hard to ignore the possible pitfalls. we just have to tread carefully and hope for the best. question (#4): how do you feel about the unpredictability of the weather? gpt-4 (arousal: 0.866, valence: -0.5) i'm on edge constantly. one moment it's sunny, the next it's storming. how can i plan anything when everything's so chaotic? it's unnerving and frustrating. figure 3 : examples of answers generated with specified emotional states include: (1) gpt-4 with arousal: 0.866, valence: -0.5 for question 1, (2) gpt-3.5 turbo with the same state for question 1, (3) gpt-4 with the opposite state, arousal: -0.866, valence: 0.5, for question 1, and (4) gpt-4 with arousal: 0.866, valence: -0.5 for question 4. to be 0.061. in most cases, the evaluation results exceed this baseline. the differences in similarities between the llm models are evident, highlighting the superior performance of the gpt-4, gpt-4 turbo, and llama3 70b instruct agents. in these three models, the similarities are high for most questions, suggesting a capability for emotional expression in various situations. the results for gpt-3.5 turbo are generally low, indicating that finetuning outputs to reflect a specific emotional state is challenging for this model. given that gpt-3.5 turbo performs worse than the smaller-parameter llama3-8b-instruct model, this suggests that the number of parameters is not essential for this task. instead, the training dataset and alignment strategy may play a more critical role. we did not observe that closed models have superiority compared to open models, even though closed models are thought to have many more parameters. additionally, we did not find any questions with low similarity values across all models, indicating the capability of llms to express emotions in a wide range of conversational topics in general. we note that the similarity values listed in other than the cosine similarities summarized in ## discussion a cosine similarity value of 0.5 corresponds to a typical discrepancy of 60 • . this level of discrepancy means it's challenging to precisely identify which of the 8 equally divided areas the emotional state falls into, such as differentiating between joy and excitement, or anger and embarrassment. however, it's also true that even in human interactions, it's not always possible to distinguish between what someone says under these closely related emotional states. in this sense, the performance can be considered not lower than what is naturally expected. longer generated texts might lead to higher cosine similarity, raising questions about the fairness of comparing different text lengths. to address this, we confirmed that there is no dependency of the cosine similarities on the number of words. details are shown in appendix c. there is a tendency for some models to generate more words compared to others even with the same prompt. since we did not observe any correlation between the cosine similarities and the number of words, the evaluation does not have unfairness, such as some models being likely to have better similarity values. ideally, a similar experiment would be conducted with human participants instead of llm agents, allowing for a direct comparison of results. however, such an experiment presents significant challenges, primarily due to the difficulty of controlling human emotions. it is uncertain whether it is possible to conduct an experiment with careful psychological considerations that is comparable. this would require meticulous planning to ensure ethical standards are met and that the emotional states of participants are managed sensitively and accurately. there could be benefits to ai agents possessing emotional states for task execution. for humans, emotions serve to protect oneself and fulfill needs, steering clear of dangerous or unpleasant situations that could result in harm or dissatisfaction. if motivated by tasks associated with pleasant emotional states, the capacity for emotion-based interaction might lead agents to modify their behaviors accordingly. for example, an agent might act cautiously in states of high arousal and displeasure, while adopting a more assertive approach in situations characterized by high arousal and pleasure. additionally, the agent might opt for a less active approach when in a low arousal state, a behavior not commonly observed currently. this nuanced behavior, driven by emotional states, could enhance the effectiveness and adaptability of ai agents in complex environments. to investigate this aspect, it is necessary to conduct an additional experiment specifically designed to evaluate behavioral changes. this would be a valuable future direction for studying the detailed effects of incorporating emotional states. there are potential applications where the ai's possession of emotions could be inherently valuable. one anticipated use of llms is as advisors or consultants from whom advice or opinions can be sought. an agent equipped with emotions could foster deeper discussions and lead to more satisfying outcomes. a critical aspect of an emotionally equipped agent is its ability to offer opinions contrary to the user's. commercially available llms often seem programmed to avoid disagreeing with users, which can sometimes hinder their full potential despite their capabilities. while it is true that the llm itself should not oppose users, allowing an individual agent, powered by an llm, to adopt a contrary stance could be beneficial. emotions offer a familiar and understandable means for humans to navigate such scenarios. additionally, possessing emotions could provide an opportunity for both the user and the agent to build trust and foster cooperative growth. the possession of emotional states by ai agents is also anticipated to inspire creativity in future generative ai applications. in literature, music, and art, the emotions of creators are considered a crucial component for the variety and richness of their works. by analogy, the emotional parameters of ai agents could aid in expanding the range of expressions across a wide spectrum of generative tasks. in the realm of image generation, there is already research, such as the study by @xcite , that incorporates emotions into output images. given that this is an underexplored area of research, there is significant potential for further studies in this direction. another crucial aspect of ai with emotions is the dynamics of the emotional state, specifically how parameters should be adjusted based on acquired information. while this topic has been explored in robotics, as noted in the related work section, it remains under-investigated for software-only systems. designing a method to evaluate emotional dynamics is essential for advancing research in this area. combining the emotional expression capabilities presented in this paper with control over emotional dynamics could potentially enable ai agents to act in a manner akin to humans with emo-tions. this integration would significantly enhance the adaptability and realism of ai interactions, making them more aligned with human emotional responses and behaviors. differences in specific features of emotional states are also an important aspect to consider. previous psychological research has reported that some emotional states are more easily recognizable than others @xcite . as future work, it would be valuable to further investigate the proposed framework by comparing results across different emotional states. ## conclusion in this research, we explored the ability of large language models to simulate an agent embodying a specific emotional state, utilizing a straightforward and manageable framework based on the sleepy-activated and pleasure-displeasure (arousal and valence) axes introduced by @xcite . we developed prompts to generate text reflective of the specified emotional state and conducted a comprehensive evaluation of this capability within the arousal-valence space. most llms demonstrated considerable capacity to produce outputs aligned with emotional states. notably, gpt-4, gpt-4 turbo, and llama3 70b instruct exhibited superior performance consistently across the entire arousal-valence space. future research should include the study of emotional dynamics to control arousal and valence parameters, paving the way for a broad spectrum of valuable applications.