MEC o T : M arkov Emotional Chain-of-Thought for Personality-Consistent Role-Playing (2025)

Abstract: Large Language Models (LLMs) have shown remarkable capabilities in role-playing dialogues, yet they often struggle to maintain emotionally consistent and psychologically plausible character personalities. We present MECoT (Markov Emotional Chain-of-Thought), a framework that enhances LLMs’ ability to generate authentic personality-driven dialogues through stochastic emotional transitions. Inspired by dual-process theory, MECoT combines a Markov-chain-driven emotional processor for intuitive responses with an LLM-based reasoning mechanism for rational regulation, mapped onto a 12-dimensional Emotion Circumplex Model. The framework dynamically adjusts emotional transitions using personality-weighted matrices and historical context, ensuring both emotional coherence and character consistency. We introduce the Role-playing And Personality Dialogue (RAPD) dataset, featuring diverse character interactions with fine-grained emotional annotations, along with novel metrics for evaluating emotional authenticity and personality alignment. Experimental results demonstrate MECoT’s effectiveness, achieving 93.3% emotional accuracy on RAPD and substantially outperforming existing approaches. Our analysis reveals optimal emotional granularity (12-16 categories) and validates our data-driven personality optimization approach. Code and data are available at https://anonymous.4open.science/r/MECoT

## introduction we think, fast and slow. @xcite in recent years, large language models (llms) have demonstrated remarkable capabilities in dialogue generation and emotion recognition. despite figure 1 : example of emotional inconsistency in llms during role-playing dialogues. wukong, characterized by a predisposition to anger and a tendency to maintain angry states, demonstrates the issue. the baseline model exhibits an abrupt transition from anger to happiness, whereas mecot maintains appropriate emotional states through dual processes of instinct and reasoning, aligning with the character's established personality traits. the challenge stems from the inherent complex-ity of human emotional processing, as articulated in kahneman's dual-process theory. human emotional responses involve both rapid, intuitive reactions (system 1) and deliberate, rational regulation (system 2), modulated by individual personality traits and contextual factors. this nuanced interplay becomes evident in role-playing scenarios, where abrupt or inconsistent emotional transitions can significantly diminish user engagement and interaction quality. figure 1 illustrates this issue through the character of wukong, whose predisposition to anger requires careful emotional state management that current llms fail to provide. contemporary emotional modeling approaches suffer from two critical limitations. first, they often generate abrupt emotional transitions without sufficient contextual support, as illustrated in figure 1 where models may shift suddenly from anger to happiness. these discontinuous transitions violate the principle of emotional gradualism and fail to reflect the regulatory role of character personality in emotional changes. second, they treat each response independently, disregarding the cumulative effects and historical dependencies of emotional transitions. this becomes particularly problematic in extended dialogues where characters should exhibit consistent emotional patterns aligned with their established traits. for instance, an introverted and cautious character might suddenly display excessive extroversion and aggression, not only breaking user immersion but also violating fundamental principles of personality psychology. these limitations result in dialogue content that lacks longterm emotional coherence and fails to accurately reflect characters' emotional development trajectories through sustained interactions. to address these challenges, we present mecot (markov emotional chain-of-thought), a framework that enhances llms' ability to generate authentic personality-driven dialogues through stochastic emotional transitions. mecot implements a multi-level architecture that combines: 1) a bottom layer capturing basic emotional states through a 12-dimensional emotion circumplex model, 2) a middle layer characterizing emotional transition probabilities via markov chains, and 3) a top layer integrating character personality traits and historical context for emotional regulation. this design considers both immediate emotional stimuli and long-term factors such as character personality and dialogue history, ensuring the coherence and rationality of emotional changes. through personality weight matrices and emotion adjustment mechanisms, mecot can authentically reflect characters' emotional development trajectories while simulating both intuitive and rational analytical emotional responses based on kahneman's dualsystem. our main contributions are: ## conclusion mecot integrates markov chains with llms to achieve authentic emotional transitions in characterbased dialogues. the study highlights the importance of optimal emotional granularity and datadriven personality optimization for model perfor-despite its strong performance, mecot has limitations that warrant further exploration. first, its cross-cultural adaptability remains a challenge, as emotional expressions and transitions can vary significantly across cultures, which may affect its generalization in diverse settings. second, the framework currently focuses on text-based interactions, limiting its applicability in real-time, multimodal scenarios where audio, visual, and contextual cues play a crucial role in emotion recognition and response generation. in addition, the reliance on pre-defined emotional categories and a structured personality model may constrain its flexibility in highly dynamic or open-domain situations. future work should aim to address these limitations by integrating multimodal emotion processing, improving adaptability to diverse cultural contexts, and refining the framework for real-time, interactive applications.