Personality control in Role-Playing Agents (RPAs) is commonly achieved via training-free methods that inject persona descriptions and memory through prompts or retrieval-augmented generation, or via supervised fine-tuning (SFT) on persona-specific corpora. While SFT can be effective, it requires persona-labeled data and retraining for new roles, limiting flexibility. In contrast, prompt- and RAG-based signals are easy to apply but can be diluted in long dialogues, leading to drifting and sometimes inconsistent persona behavior. To address this, we propose a contrastive Sparse AutoEncoder (SAE) framework that learns facet-level personality control vectors aligned with the Big Five 30-facet model. A new 15,000-sample leakage-controlled corpus is constructed to provide balanced supervision for each facet. The learned vectors are integrated into the model's residual space and dynamically selected by a trait-activated routing module, enabling precise and interpretable personality steering. Experiments on Large Language Models (LLMs) show that the proposed method maintains stable character fidelity and output quality across contextualized settings, outperforming Contrastive Activation Addition (CAA) and prompt-only baselines. The combined SAE+Prompt configuration achieves the best overall performance, confirming that contrastively trained latent vectors can enhance persona control while preserving dialogue coherence. Dataset is available at: https://github.com/lunat5078/BigFive-Personality-Facets-Dataset
Figures & tables
Figure 1: Pipeline for constructing the Big Five personality dataset, illustrated with the Assertiveness facet as an example.
Method
Abstract Questions
Contextual Questions
FA (↑)
MSE (↓)
MAE (↓)
MTR (↓)
FA (↑)
MSE (↓)
MAE (↓)
MTR (↓)
Qwen3-4B
Baselines
Base RPA
7.7
16.0
31.3
0.0
7.7
14.2
30.2
0.1
Prompt-Label
50.0
10.9
24.9
0.0
30.7
11.7
26.2
0.1
CV-CAA
73.1
4.8
16.1
0.0
76.9
4.2
14.7
0.0
Table 1: Performance of Qwen3-4B [ 29 ] and Mistral-7B [ 12 ] on Big Five personality questions. Best results for each metric are bolded .
Figure 3: Effect of control strength α on Role-Play Agent (RPA) performance across backbones and control methods. Results are reported under the abstract (solid) and contextual (dashed) settings. Blue denotes FA, orange denotes MSE, green denotes MAE, and red denotes MTR.
Similarities to centroids
Full-accuracy
Qwen3-4B [ 29 ]
Mistral-7B [ 12 ]
Qwen3-4B [ 29 ]
Mistral-7B [ 12 ]
⟨z,μ+⟩
⟨z,μ−⟩
⟨z,μ+⟩
⟨z,μ−⟩
Abst.
Cont.
Abst.
Cont.
Before training
0.92
0.84
0.64
0.38
11.5
11.5
23.1
3.9
Train w/o CL
0.76
( ↓ )
0.31
( ↓ )
0.29
( ↓ )
−0.01
( ↓ )
0.0
( ↓ )
3.9
( ↓ )
3.9
( ↓ )
0.0
( ↓ )
Train w/ CL
0.93
( ↑ )
0.59
( ↓ )
0.75
( ↑ )
0.21
( ↓ )
76.9
( ↑ )
80.7
( ↑ )
76.9
( ↑ )
84.6
( ↑ )
Table 2: Effect of Contrastive Learning (CL) — The left block reports cosine similarities between the injected representation z and the positive/negative Extraversion centroids (μ+,μ−) on the Extraversion subset of our corpus. The right block reports full-accuracy (FA) on Abstract (Abst.) and Contextual (Cont.) Extraversion questions for ten role agents under three training settings. .
We present Big5-Scaler, a prompt-based framework for conditioning large language models (LLMs) with controllable Big Five personality traits. By embedding numeric trait values into natural language prompts, our method enables fine-grained personality control without additional training. We evaluate Big5-Scaler across trait expression, dialogue generation, and human trait imitation tasks. Results show that it induces consistent and distinguishable personality traits across models, with performance varying by prompt type and scale. Our analysis highlights the effectiveness of concise prompts and lower trait intensities, providing a efficient approach for building personality-aware dialogue agents.
Controlling emergent behavioral personas (e.g., sycophancy, hallucination) in Large Language Models (LLMs) is critical for AI safety, yet remains a persistent challenge. Existing solutions face a dilemma: manual prompt engineering is intuitive but unscalable and imprecise, while automatic optimization methods are effective but operate as "black boxes" with no interpretable connection to model internals. We propose a novel framework that adapts gradient ascent to LLMs, enabling targeted prompt discovery. In specific, we propose two methods, RESGA and SAEGA, that both optimize randomly initialized prompts to achieve better aligned representation with an identified persona direction. We introduce fluent gradient ascent to control the fluency of discovered persona steering prompts. We demonstrate RESGA and SAEGA's effectiveness across Llama 3.1, Qwen 2.5, and Gemma 3 for steering three different personas, sycophancy, hallucination, and myopic reward. Crucially, on sycophancy, our automatically discovered prompts achieve significant improvement (49.90% compared with 79.24%). By grounding prompt discovery in mechanistically meaningful features, our method offers a new paradigm for controllable and interpretable behavior modification. We release our scripts for RESGA and SAEGA in this github repo: https://github.com/HarshSaini10/RESGA_SAEGA.
Harshvardhan Saini, Yiming Tang, Dianbo Liu
Indian Institute of Technology (ISM), Dhanbad · National University of Singapore
Controlling personality in large language models is important for building conversational agents that can be customized to different users and interaction settings. However, existing personality control methods often face a tradeoff between strong trait expression and natural dialogue generation. We introduce FATE-5, Faithful Alignment of Trait Expression for the Big Five, a two-stage framework that separates personality encoding from naturalness alignment. FATE-5 first learns continuous soft prompt representations of Big Five profiles using dialogue supervision and an auxiliary survey objective. It then improves dialogue naturalness through preference alignment based on both dialogue quality and personality agreement. Across three language model backbones, FATE-5 maintains strong trait expression while achieving substantially higher dialogue naturalness than other trait-strong methods. On held-out questionnaires, it achieves monotonicity correlations of 0.97-0.99 and recovery RMSE of 8.9-12.4, substantially improving over the evaluated baselines. These results demonstrate effective continuous personality control while maintaining natural conversational behavior.
Gunhee Cho, Hongyeob Kim, Yun-Gyung Cheong
Department of Artificial Intelligence Sungkyunkwan University Suwon, South Korea