Dynamic Personality Adaptation in Large Language Models via State Machines
Authors: Leon Pielage, Ole Hätscher, Mitja Back, Bernhard Marschall, Benjamin Risse
Organizations: Institute for Geoinformatics, University of Münster, 48149 Münster, Germany · Faculty of Mathematics and Computer Science, University of Münster, 48149 Münster, Germany · Department of Psychology, University of Münster, 48149 Münster, Germany · Institute of Medical Education and Student Affairs, University of Münster, 48149 Münster, Germany
The inability of Large Language Models (LLMs) to modulate their personality expression in response to evolving dialogue dynamics hinders their performance in complex, interactive contexts. We propose a model-agnostic framework for dynamic personality simulation that employs state machines to represent latent personality states, where transition probabilities are dynamically adapted to the conversational context. Part of our architecture is a modular pipeline for continuous personality scoring that evaluates dialogues along latent axes while remaining agnostic to the specific personality models, their dimensions, transition mechanisms, or LLMs used. These scores function as dynamic state variables that systematically reconfigure the system prompt, steering behavioral alignment throughout the interaction.We evaluate this framework by operationalizing the Interpersonal Circumplex (IPC) in a medical education setting. Results demonstrate that the system successfully adapts its personality state to user inputs, but also influences user behavior, thereby facilitating de-escalation training. Notably, the scoring pipeline maintains comparable precision even when utilizing lightweight, fine-tuned classifiers instead of large-scale LLMs. This work demonstrates the feasibility of modular, personality-adaptive architectures for education, customer support, and broader human-computer interaction.
Figures & tables
Figure 1: The analysis of incoming messages and the selection of a personality prompt happen per dimension. Together with the role description and the message protocol, these provide the LLM-context.
Figure 2: A user message is analyzed, resulting in scores according to a specific personality dimension. These scores can (A) either be used directly to update the assistant personality or (B) be used to update a separate user personality model, which can then be used to update the assistant personality.
Figure 3: Steps to generate a reply to an incoming user message.
Model Name
Agency
Communion
Acc. ↑
1-off ↑
Mean ↓
Error ↓
Acc. ↑
1-off ↑
Mean ↓
Error ↓
Our Classify 0.5B
0.2294
0.5138
2.1743
-
0.1560
0.4220
2.0642
-
Our LoRA 0.5B (s)
0.2569
0.6239
1.5596
0.0000
0.0734
0.2294
2.8073
0.0000
Qwen 2.5 0.5B (s)
0.0196
0.2647
3.0000
0.0642
0.0408
0.0918
3.9592
0.1009
Qwen 2.5 0.5B (l)
0.0000
0.2075
3.1887
0.0275
0.0120
0.0602
3.9398
0.2385
Llama 3.3 70B (s)
0.2981
0.7308
1.1346
0.0459
0.2018
0.4220
1.9817
0.0000
Table 1: Performance of selected LLMs on the task of rating messages in terms of their Agency / Communion prompted with a short (s)/long (l) prompt. Accuracy (Acc.)/One-off accuracy (1-off)/Mean distance (Mean)/Error rate (Error)
Figure 4: Evolution of the current personality of the user and the virtual patient (assistant) over time. (a)+(b): Mean evolution for all 40 participants. (c)+(d): A single long interaction.
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
Figure B.1: Various visualizations support the configuration of new assistant personalities and the creation of scenarios.
Model Name
Accuracy ↑
One-Off ↑
Mean Dist. ↓
Error Rate ↓
Prompt Length
Our Classify 0.5B
0.2294
0.5138
2.1743
-
-
Our LoRA 0.5B
0.2569
0.6239
1.5596
0.0000
short prompt
Qwen 2.5 0.5B
0.0196
0.2647
3.0000
0.0642
short prompt
Qwen 2.5 0.5B
0.0000
0.2075
3.1887
0.0275
long prompt
Llama 3.3 70B
0.2981
0.7308
1.1346
0.0459
short prompt
Llama 3.3 70B
0.1296
0.5185
1.9630
0.0092
long prompt
Appendix
Table C.1: Performance of various LLMs on the task of rating messages in terms of their Agency .
Model Name
Accuracy ↑
One-Off ↑
Mean Dist. ↓
Error Rate ↓
Prompt Length
Our Classify 0.5B
0.1560
0.4220
2.0642
-
-
Our LoRA 0.5B
0.0734
0.2294
2.8073
0.0000
short prompt
Qwen 2.5 0.5B
0.0408
0.0918
3.9592
0.1009
short prompt
Qwen 2.5 0.5B
0.0120
0.0602
3.9398
0.2385
long prompt
Llama 3.3 70B
0.2018
0.4220
1.9817
0.0000
short prompt
Llama 3.3 70B
0.2294
0.5688
1.5229
0.0000
long prompt
Appendix
Table C.2: Performance of various LLMs on the task of rating messages in terms of their Communion .
Parameter
Assistant
User
Deterministic
no
yes
wd
0.1
0.1
wc
0.5
0.5
wo
0.1
0.2
wq
0.3
0.2
σ
0.1
0.6
Appendix
Table H.3: Parameters chosen for the personality axes of the assistant and the user
Current methods for personality control in Large Language Models rely on static prompting or expensive fine-tuning, failing to capture the dynamic and compositional nature of human traits. We introduce PERSONA, a training-free framework that achieves fine-tuning level performance through direct manipulation of personality vectors in activation space. Our key insight is that personality traits appear as extractable, approximately orthogonal directions in the model's representation space that support algebraic operations. The framework operates through three stages: Persona-Base extracts orthogonal trait vectors via contrastive activation analysis; Persona-Algebra enables precise control through vector arithmetic (scalar multiplication for intensity, addition for composition, subtraction for suppression); and Persona-Flow achieves context-aware adaptation by dynamically composing these vectors during inference. On PersonalityBench, our approach achieves a mean score of 9.60, nearly matching the supervised fine-tuning upper bound of 9.61 without any gradient updates. On our proposed Persona-Evolve benchmark for dynamic personality adaptation, we achieve up to 91% win rates across diverse model families. These results provide evidence that aspects of LLM personality are mathematically tractable, opening new directions for interpretable and efficient behavioral control.
Xiachong Feng, Liang Zhao, Weihong Zhong +5
Harbin Institute of Technology · The University of Hong Kong
Existing approaches to persona simulation with Large Language Models (LLMs) mostly rely on shallow character descriptions that fail to sustain coherent character behavior across extended interactions. We introduce Deep Persona, a psychologically grounded, three-layered architecture that organizes personas into hierarchical levels of observable expression, latent beliefs, and core motivational drives, for constructing highly convincing role-playing agents. Governed by the principles of scripted determinism and bounded agency, the architecture restricts the model to a reactive engine guided by a structured internal script. We further propose a reference-free evaluation framework that benchmarks dialogue naturalness against empirical human distributions using established psychological clinical instruments and adversarial stress-tests. Empirical evaluation reveals that while LLMs achieve high pragmatic fluency, they exhibit systematic limitations in emotional expression and joint attention. In addition, we present a case study of two Deep Personas and evaluate them using the proposed framework, demonstrating that structured personas can produce interactions that more closely align with human conversational behavior.
Rotem Dror, Zohar Elyoseph, Yuval Haber +3
Faculty of Computer and Information Science, University of Haifa, Israel · School of Therapy, Counseling and Human Development, University of Haifa, Israel · The PhD Program of Hermeneutics and Culture, Interdisciplinary Studies Unit, Bar-Ilan University, Israel +1
Personalized Large Language Models (LLMs) facilitate more natural, human-like interactions in human-centric applications. However, existing personalization methods are constrained by limited controllability and high resource demands. Furthermore, their reliance on static personality modeling restricts adaptability across varying situations. To address these limitations, we first demonstrate the existence of situation-dependency and consistent situation-behavior patterns within LLM personalities through a multi-perspective analysis of persona neurons. Building on these insights, we propose IRIS, a training-free, neuron-based Identify-Retrieve-Steer framework for advanced situational personality steering. Our approach comprises situational persona neuron identification, situation-aware neuron retrieval, and similarity-weighted steering. We empirically validate our framework on PersonalityBench and our newly introduced SPBench, a comprehensive situational personality benchmark. Experimental results show that our method surpasses best-performing baselines, demonstrating IRIS's generalization and robustness to complex, unseen situations and different models architecture.
Zesheng Wei, Mengxiang Li, Zilei Wang +1
University of Science and Technology of China · Singapore Management University