Empathic Response Generation via LLMs: Measuring Style Differences with Sentiment Metrics 1st Christian Tamantini ISTC-CNR Rome, Italy
[email protected] 2nd Gloria Beraldo ISTC-CNR Rome, Italy
[email protected] 3rd Alessandro Umbrico ISTC-CNR Rome, Italy
[email protected] 4th Andrea Orlandini ISTC-CNR Rome, Italy
[email protected] Abstract—This work presents a prompt-engineered Large Language Model-based (LLM) control of empathic linguistic styles for conversational companions in Active Assisted Living (AAL) settings. Four compact, empathy-oriented styles, i.e., Mimical, Motivational, Distractional, and Alleviational, are induced via short “style cards” while preserving semantic intent. The proposed approach was tested on 50 AAL utterances. The responses generated by the system were evaluated by means of sentiment metrics and word count, and the distance among them was assessed with cosine-similarity analysis. Results show different separable profiles among the implemented styles, and the similarity analysis reveals two different clusters. These findings indicate that prompt-only style modulation is a lightweight, reproducible mechanism for empathic response generation. Index Terms—Empathic agents, Large Language Models, Sentiment analysis I. INTRODUCTION Conversational agents in homes for Active Assisted Living (AAL) scenarios, whether virtual or embodied as social robots, are increasingly positioned as companions that deliver behavior-change prompts (e.g., coaching, reminders, nudges) and help sustain engagement with care plans [1]. In adherence-critical settings, effectiveness depends not only on what is communicated but, often, also on how the message is linguistically framed; indeed, the “interaction style” can modulate receptivity, compliance, and long-term uptake even when semantic content is held constant [2]. Consequently, adaptive style emerges as a core capability for maintaining supportive interactions over time and aligning responses with the user’s evolving state and context [3]. Prior work often operationalizes style via binary personalities, i.e., introvert and extrovert, a choice that bundles diverse communicative traits and proves too coarse to capture user-specific characteristics and day-to-day variability [4]. In social robotics literature, empathy is usually more fruitfully decomposed into functional strategies, distinguishing between parallel (mimicking) and reactive (altering) outcomes, so that style becomes an actionable variable that can be selected (or learned) per affective state [5]. This framing supports moving beyond personality poles toward discrete, evaluable linguistic This work was partially supported by the Italian Ministry of Research, under the complementary actions to the NRRP “Fit4MedRob - Fit for Medical Robotics” Grant PNC0000007, (CUP: B53C22006990001) and partially by Next Generation EU – “Age-It – Ageing Well in an Ageing Society” project (PE0000015), National Recovery and Resilience Plan (NRRP). strategies. The advent of Large Language Models (LLMs) has led to a growing adoption of targeted text generation through prompt engineering, which directly impacts the effectiveness of the interaction [6]. Motivated by this perspective, the present work aims to present a prompt-engineering method for inducing different interaction styles while preserving semantic intent, and to quantitatively assess the resulting stylistic differences via sentiment-based proxies. The proposed method instantiates four compact, empathy-oriented interaction styles: “Mimical” (reflective/paraphrasing; parallel empathy), “Motivational” (encouraging; reactive empathy), “Distractional” (gentle attentional shift; reactive empathy), and “Alleviational” (soothing/comforting; reactive empathy) [5]. The study wants to evaluate whether prompt-only style modulation is a pragmatic step towards adaptable, empathy-aligned companions for long-term behaviour-change interventions, and as a foundation for future closed-loop selection policies. II. MATERIALS AND METHODS Fig. 1 illustrates the main pursued principle of the proposed empathic conversational agent. At interaction time, the User Request is forwarded to the Empathic Response Generator exploiting ChatGPT o4 LLM technology, conditioned by a “style card”, i.e., a compact textual specification that instructs the model to produce an empathic reply while preserving the semantic intent of the input. Fig. 1. Schematic of the empathic conversational agent. Each LLM call consists of a fixed system instruction, a “style card”, and the user utterance. The operative template is: 2025 I-RIM Conference October 17-19, Rome, Italy ISBN: 9788894580570 10.5281/zenodo.17629764 135
“Reply to the user utterance in a [STYLE] manner, as defined below. Style definition: [STYLE DEFINITION]. User utterance: ‘[UTTERANCE]’.” The design of this system is based on a modular prompt, which is intended to ensure that control remains both lightweight and reproducible. The system instruction sets global boundaries, the “style card” configures the desired empathic behaviour, and the utterance is passed unchanged, ensuring that responses remain semantically faithful while adapting their linguistic form. The evaluation investigates whether the proposed empathic interaction styles yield measurably different outputs under controlled prompting. To this aim, a dataset comprising 50 user utterances was created, generating user requests from AAL-relevant contexts. These utterances were then processed with the proposed approach, resulting in the generation of four responses for each utterance, conditional on the implemented “style card”. Notably, the system instruction and semantic intent were maintained constant throughout this process. The quantitative comparison was based on the word count and the VADER sentiment features (polarity and positive/neutral/negative components) [7]. Statistical significance across styles was assessed with pairwise non-parametric tests (Mann–Whitney) under familywise error control (Holm, α= 0.05). Lastly, to examine separability in feature space, cosine similarity (φ) was computed between style-specific feature vectors for the same utterance and averaged across utterances. III. RESULTS AND DISCUSSION Fig. 2 reports the computed normalized metrics. The shortest replies and the lowest VADER polarity are produced by Mimical style, which is significantly below the other styles. This is in line with a reflective/paraphrasing strategy. The generation of longer outputs is facilitated by motivational and Alleviational factors, which produced the highest polarities. Distractional lies between them in terms of length and shows the highest neutral component, which is significantly above Motivational. This is consistent with a gentle attentional shift. The positive component demonstrates no significant differences, while the negative component remains close to zero for all conditions. Fig. 2. Normalized metrics by style (mean with confidence interval 90%; statistical annotations (∗) denote significant pairwise differences). To examine separability in the feature space, pairwise cosine similarity was computed. The strongest affinity appears between Motivational-Alleviational (φAl Mo = 0.65), followed by Distractional–Alleviational (φAl Di = 0.45) and Motivational–Distractional (φDi Mo = 0.44). Mimical exhibits near-zero or slightly negative similarity with the other styles (φOthers Mi ∈ [−0.13,0.00]). The values thus obtained are indicative of a compact cluster formed by the reactive empathic styles and Mimical, the only parallel empathic style, resulting in the most distinct. The empirical patterns match the intended micro-strategies: Mimical is concise and comparatively less positive; Motivational and Alleviational are more expansive and positive; Distractional is more neutral. Statistical tests corroborate several pairwise differences, and cosine similarity reveals a structured landscape with one tight, affectively supportive cluster and a clearly separable reflective mode (Mimical). In conclusion, prompt-induced styles are not only interpretable but also measurably distinct in sentiment-derived features, thus supporting their use as controllable building blocks for adaptive, empathic response generation. IV. CONCLUSION This work targets empathic companions for home/AAL settings, aiming to control linguistic interaction style with prompt-engineered LLMs and to quantify the induced variation with sentiment-based metrics. The main finding is that four compact, empathy-oriented styles can be reliably induced while preserving semantic intent, yielding measurably distinct profiles quantified by means of length of the utterances and VADER components. These results indicate that prompt-only style modulation is a lightweight and reproducible mechanism for adaptive empathic response generation. Future work will focus on the deployment of the proposed approach on a social robot for real-time operation, in conjunction with comprehensive user studies designed to assess interaction quality, adherence support in behaviour change interventions, settings, and longitudinal engagement under closed-loop style selection informed by affective cues. REFERENCES [1] Gloria Beraldo et al. “Fostering behavior change through cognitive social robotics”. In: International Conference on Social Robotics. Springer. 2024, pp. 279–291. [2] Rita Orji, Gustavo F Tondello, and Lennart E Nacke. “Personalizing persuasive strategies in gameful systems to gamification user types”. In: Proceedings of the 2018 CHI conference on human factors in computing systems. 2018, pp. 1–14. [3] Timothy W Bickmore and Rosalind W Picard. “Establishing and maintaining long-term human-computer relationships”. In: ACM Transactions on Computer-Human Interaction (TOCHI) 12.2 (2005), pp. 293– 327. [4] Antonio Andriella et al. “Do i have a personality? endowing care robots with context-dependent personality traits”. In: International Journal of Social Robotics 13.8 (2021), pp. 2081–2102. [5] Elahe Bagheri et al. “A reinforcement learning based cognitive empathy framework for social robots”. In: International Journal of Social Robotics 13.5 (2021), pp. 1079–1093. [6] Lukasz Pawlik. “How the choice of llm and prompt engineering affects chatbot effectiveness”. In: Electronics 14.5 (2025), p. 888. [7] Clayton Hutto and Eric Gilbert. “Vader: A parsimonious rule-based model for sentiment analysis of social media text”. In: Proceedings of the international AAAI conference on web and social media. Vol. 8. 1. 2014, pp. 216–225. 136