[Paper] Dynamic Personality Adaptation in Large Language Models via State Machines
Source: arXiv - 2602.22157v1
Overview
The paper introduces a model‑agnostic framework that lets large language models (LLMs) shift their “personality” on the fly during a conversation. By representing personality as a set of latent states in a state machine, the system can adjust its behavior in response to user cues—something that standard LLM deployments struggle with. The authors demonstrate the idea in a medical‑education scenario, showing that dynamic personality adaptation can both reflect and shape user behavior.
Key Contributions
- State‑machine‑driven personality model – formalizes personality as discrete latent states with context‑dependent transition probabilities.
- Modular scoring pipeline – continuously evaluates dialogue along arbitrary personality dimensions (e.g., the Interpersonal Circumplex) without tying the pipeline to a specific LLM or personality taxonomy.
- Prompt‑reconfiguration mechanism – feeds the current state scores back into the system prompt, steering the LLM’s next response in real time.
- Empirical validation in a de‑escalation training setting – shows that the framework can adapt to user inputs and actively influence user behavior.
- Efficiency proof‑point – lightweight fine‑tuned classifiers achieve scoring precision comparable to using full‑scale LLMs, lowering compute costs.
Methodology
-
Define latent personality axes – the authors instantiate the Interpersonal Circumplex (IPC) with two orthogonal dimensions: Dominance and Warmth. Any dialogue turn can be projected onto this 2‑D space.
-
State machine construction – each node represents a discrete personality state (e.g., “high‑dominance / low‑warmth”). Transition probabilities are modeled as a function of the latest user utterance and the current state.
-
Scoring pipeline
- Input: the latest user turn (and optionally the preceding context).
- Processor: either a large LLM (zero‑shot) or a small fine‑tuned classifier that outputs a continuous score for each IPC dimension.
- Output: updated state variables (e.g., new dominance/warmth values).
-
Prompt re‑generation – the system prompt is dynamically rewritten to embed the current state (e.g., “You are a supportive mentor with high warmth”). This prompt is then fed to the underlying LLM for the next response.
-
Evaluation – participants interact with a medical‑education chatbot that must de‑escalate a simulated angry patient. The authors measure:
- Accuracy of personality scoring vs. a human‑annotated gold standard.
- Changes in user sentiment and escalation level over the conversation.
Results & Findings
| Metric | LLM‑based scorer | Fine‑tuned classifier |
|---|---|---|
| IPC axis MAE (lower is better) | 0.12 | 0.14 |
| Transition alignment (KL‑divergence) | 0.08 | 0.09 |
| User de‑escalation rate | 71 % | 68 % |
- Scoring precision stays high even when swapping a 13‑B parameter LLM for a ~200 M parameter classifier, confirming the pipeline’s modularity.
- Dynamic adaptation: the chatbot’s personality state shifted in line with user sentiment (e.g., moving toward higher warmth when the user expressed frustration).
- Behavioral influence: conversations where the system successfully increased warmth saw a statistically significant reduction in user aggression scores (p < 0.01).
Practical Implications
| Domain | How the framework can be used |
|---|---|
| Customer support | Auto‑adjust tone (e.g., become more empathetic when a user is upset) without retraining the whole LLM. |
| Education & training | Simulate varied instructor personalities for role‑play scenarios (de‑escalation, negotiation, tutoring). |
| Therapeutic chatbots | Dynamically align with therapeutic alliance models, potentially improving adherence and outcomes. |
| Gaming & interactive fiction | NPCs can evolve their demeanor based on player actions, creating richer narratives. |
For developers, the biggest win is plug‑and‑play: you can drop the scoring module into any existing LLM‑backed service, define your own personality axes (e.g., “formality”, “enthusiasm”), and let the state machine handle the rest. Because the scoring can be done with tiny classifiers, the added latency is often < 50 ms, making it viable for real‑time applications.
Limitations & Future Work
- State granularity – The current implementation uses a relatively small number of discrete states; scaling to richer personality taxonomies may require more sophisticated transition models.
- Domain dependence – The IPC works well for interpersonal dynamics but may not capture domain‑specific traits (e.g., technical expertise, humor).
- User modeling – The framework assumes the user’s personality cues are observable in text; multimodal signals (voice tone, facial expression) are not yet integrated.
- Long‑term consistency – Maintaining a coherent personality over very long dialogues (> 30 min) remains an open challenge.
Future research directions include: extending the state machine to hierarchical or continuous latent spaces, incorporating reinforcement learning to fine‑tune transition policies from real user feedback, and testing the approach in other high‑stakes domains such as mental‑health counseling or negotiation bots.
Authors
- Leon Pielage
- Ole Hätscher
- Mitja Back
- Bernhard Marschall
- Benjamin Risse
Paper Information
- arXiv ID: 2602.22157v1
- Categories: cs.CL, cs.HC, cs.LG
- Published: February 25, 2026
- PDF: Download PDF