Extroversion or Introversion? Controlling The Personality of Your Large Language Models

Yanquan Chen, Zhen Wu, Junjie Guo, Shujian Huang, Xinyu Dai
6/7/2024
cs.CL

No official code found. Best implementation: yqchen0205/PISF (4 stars, Apache-2.0, last commit 2025-10-30).

Abstract

Large language models (LLMs) exhibit robust capabilities in text generation and comprehension, mimicking human behavior and exhibiting synthetic personalities. However, some LLMs have displayed offensive personality, propagating toxic discourse. Existing literature neglects the origin and evolution of LLM personalities, as well as the effective personality control. To fill these gaps, our study embarked on a comprehensive investigation into LLM personality control. We investigated several typical methods to influence LLMs, including three training methods: Continual Pre-training, Supervised Fine-Tuning (SFT), and Reinforcement Learning from Human Feedback (RLHF), along with inference phase considerations (prompts). Our investigation revealed a hierarchy of effectiveness in control: Prompt > SFT > RLHF > Continual Pre-train. Notably, SFT exhibits a higher control success rate compared to prompt induction. While prompts prove highly effective, we found that prompt-induced personalities are less robust than those trained, making them more prone to showing conflicting personalities under reverse personality prompt induction. Besides, harnessing the strengths of both SFT and prompt, we proposed $\underline{\text{P}}$rompt $\underline{\text{I}}$nduction post $\underline{\text{S}}$upervised $\underline{\text{F}}$ine-tuning (PISF), which emerges as the most effective and robust strategy for controlling LLMs' personality, displaying high efficacy, high success rates, and high robustness. Even under reverse personality prompt induction, LLMs controlled by PISF still exhibit stable and robust personalities.

View on arXivView PDF

Code Implementations(1)

yqchen0205/PISFCommunity100%
Apache-2.0

Official repo for "Extroversion or Introversion? Controlling The Personality of Your Large Language Models"

40Shell, PythonJan 9, 202411 months agoApache-2.0

Similar Papers

Cite this paper

@article{chen2024extroversion,
  title  = {Extroversion or Introversion? Controlling The Personality of Your Large Language Models},
  author = {Yanquan Chen and Zhen Wu and Junjie Guo and Shujian Huang and Xinyu Dai},
  year   = {2024},
  eprint = {2406.04583},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2406.04583v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2406.04583.svg)](https://codeofpaper.com/paper/2406.04583)

Discussion