Table of Contents
Fetching ...

Dynamic Generation of Personalities with Large Language Models

Jianzhi Liu, Hexiang Gu, Tianyu Zheng, Liuyu Xiang, Huijia Wu, Jie Fu, Zhaofeng He

TL;DR

The paper tackles the challenge of endowing LLMs with dynamic, nuanced personalities to improve deliberation. It proposes Dynamic Personality Generation (DPG), which embeds Big Five traits into GPT-4 for automatic personality assessment, constructs a personality-dialogue dataset, and uses Hypernetworks to generate LoRA adapters that encode personality in pre-trained LLMs. Across scripted-dialogue, open-ended questions, and new-personality generation tasks, DPG outperforms traditional fine-tuning and prompt-based baselines, even surpassing GPT-4 prompts in several metrics. The approach combines an enhanced personality assessment module with a Hypernetworks-based LoRA framework, enabling flexible, input-conditioned personality expressions with practical implications for adaptive, user-aligned dialogue systems.

Abstract

In the realm of mimicking human deliberation, large language models (LLMs) show promising performance, thereby amplifying the importance of this research area. Deliberation is influenced by both logic and personality. However, previous studies predominantly focused on the logic of LLMs, neglecting the exploration of personality aspects. In this work, we introduce Dynamic Personality Generation (DPG), a dynamic personality generation method based on Hypernetworks. Initially, we embed the Big Five personality theory into GPT-4 to form a personality assessment machine, enabling it to evaluate characters' personality traits from dialogues automatically. We propose a new metric to assess personality generation capability based on this evaluation method. Then, we use this personality assessment machine to evaluate dialogues in script data, resulting in a personality-dialogue dataset. Finally, we fine-tune DPG on the personality-dialogue dataset. Experiments prove that DPG's personality generation capability is stronger after fine-tuning on this dataset than traditional fine-tuning methods, surpassing prompt-based GPT-4.

Dynamic Generation of Personalities with Large Language Models

TL;DR

The paper tackles the challenge of endowing LLMs with dynamic, nuanced personalities to improve deliberation. It proposes Dynamic Personality Generation (DPG), which embeds Big Five traits into GPT-4 for automatic personality assessment, constructs a personality-dialogue dataset, and uses Hypernetworks to generate LoRA adapters that encode personality in pre-trained LLMs. Across scripted-dialogue, open-ended questions, and new-personality generation tasks, DPG outperforms traditional fine-tuning and prompt-based baselines, even surpassing GPT-4 prompts in several metrics. The approach combines an enhanced personality assessment module with a Hypernetworks-based LoRA framework, enabling flexible, input-conditioned personality expressions with practical implications for adaptive, user-aligned dialogue systems.

Abstract

In the realm of mimicking human deliberation, large language models (LLMs) show promising performance, thereby amplifying the importance of this research area. Deliberation is influenced by both logic and personality. However, previous studies predominantly focused on the logic of LLMs, neglecting the exploration of personality aspects. In this work, we introduce Dynamic Personality Generation (DPG), a dynamic personality generation method based on Hypernetworks. Initially, we embed the Big Five personality theory into GPT-4 to form a personality assessment machine, enabling it to evaluate characters' personality traits from dialogues automatically. We propose a new metric to assess personality generation capability based on this evaluation method. Then, we use this personality assessment machine to evaluate dialogues in script data, resulting in a personality-dialogue dataset. Finally, we fine-tune DPG on the personality-dialogue dataset. Experiments prove that DPG's personality generation capability is stronger after fine-tuning on this dataset than traditional fine-tuning methods, surpassing prompt-based GPT-4.
Paper Structure (35 sections, 7 equations, 5 figures, 10 tables)

This paper contains 35 sections, 7 equations, 5 figures, 10 tables.

Figures (5)

  • Figure 1: Illustration of the Dynamic Generation of Personalities (DPG). Personality Assessment:The Big Five personality traits are quantified into 11 scores ranging from -5 to 5. GPT-4, equipped with expertise in personality assessment, evaluates the character's Big Five personality traits through dialogue. Personality Generation: Adapters are inserted into the pre-trained LLMs, and hypernetworks are trained using dialogue data with personality scores. This allows for the generation of different adapter weights based on the prompt, enabling the LLMs to exhibit diverse personalities.
  • Figure 2: Statistics of the Dataset
  • Figure 3: Generating Lora weights based on Hypernetworks. The Pretrained weights $W$ are frozen (), and the LoRA's weights ($Weight_{A}$ and $Weight_{B}$) are generated by hypernet ($Hypernet_{A}$ and $Hypernet_{B}$), with only the weights of the hypernet being trained. represents the data transfer path of LoRA hu2021lora. represents the data transfer path where hypernet generates LoRA's weights
  • Figure 4: Illustrate the relationship between prompt personalities and assessed personalities in the new personality generation task by DPG, mainly across the dimensions of openness (O), agreeableness (A), and neuroticism (N). The prompt personalities are divided into four levels: -5, -2, 2, and 5, while the assessed personalities are divided into eleven levels from -5 to 5. The color in each cell represents the frequency of the relationship's occurrence (for example, when Prompt Openness is -5, the frequency of Assess Openness being -5 is higher than that of Assess Openness being 5).
  • Figure A1: Illustrate the distribution of the Big Five personality scores for the same character (Hermione) using script data and augmented data, where red represents script data and blue represents augmented data. The deeper the color, the more overlapping points there are. $\mu_{*}$ stands for personality center.