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
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