OpenCharacter: Training Customizable Role-Playing LLMs with Large-Scale Synthetic Personas

Xiaoyang Wang, Hongming Zhang, Tao Ge, Wenhao Yu, Dian Yu, Dong YuarXiv 2025 · DOI

Abstract

OpenCharacter introduces a large-scale synthetic data pipeline designed to achieve "Character Generalization" in Large Language Models (LLMs)—the ability to role-play as any arbitrary, user-defined persona. By fine-tuning a LLaMA-3 8B model on 306,000 high-quality synthetic dialogues across 20,000 diverse characters, the researchers created a model that rivals GPT-4o in role-playing consistency and linguistic style.

Introduction

While current LLMs excel at in-domain role-playing (characters seen during training), they often struggle with out-of-domain role-playing, where a user defines a brand-new character on the fly. Achieving true character generalization requires diverse, contrastive data that demonstrates how different personalities respond to identical prompts. However, human-annotated data is prohibitively expensive at scale. OpenCharacter addresses this bottleneck by using advanced LLMs to "hallucinate" a massive library of characters and corresponding dialogues.

Methodology

The OpenCharacter framework employs a multi-stage data synthesis pipeline to generate high-quality training pairs.

Character Profile Synthesis

The process begins with one-sentence descriptions from "Persona Hub." These seeds are expanded using GPT-4o into comprehensive "Character Profiles," which include names, ages, physical appearances, life experiences, and distinct personality traits.

The process of expanding a simple persona description into a detailed character profile using an LLM.

Response Synthesis

The authors explored two primary strategies for generating character-aligned responses:

  1. OpenCharacter-R (Rewriting): Existing high-quality instructions (e.g., from LIMA or Alpaca) are rewritten to match a specific character's voice.
  2. OpenCharacter-G (Generation): Responses are generated from scratch based solely on the character profile and the query.
Comparison of response rewriting and response generation strategies for character-driven dialogue.

Empirical results suggest that generation (OpenCharacter-G) outperforms rewriting, likely because modern LLMs can produce higher-quality original content than they can "fix" older instruction-tuning examples while simultaneously adapting a persona.

Supervised Fine-Tuning (SFT)

The final models were trained on LLaMA-3 8B. To ensure the model learned character-specific nuances, the training process randomly assigned three different characters to the same prompt within each dialogue session, forcing the model to differentiate between distinct voices.

Datasets and Evaluation

The training set, the OpenCharacter Dataset, consists of 306,000 dialogue pairs for 20,000 synthetic characters. It utilizes Persona Hub as a seed and incorporates instructions from LIMA, Alpaca, and a new PH-Instruct set containing 50,000 complex synthetic instructions.

Evaluation was conducted using PersonaGym, a benchmark of 200 personas and 10,000 questions. The authors also introduced PersonaGym-Light, a 1/10th scale version for faster iteration.

Key Results

The OpenCharacter 8B model demonstrated remarkable performance, achieving a PScore of 4.66 on PersonaGym-Light, surpassing both the LLaMA-3 8B Instruct baseline (4.62) and GPT-4o-mini (4.58). On the full PersonaGym benchmark, the 8B model (4.52) outperformed the much larger LLaMA-3 70B Instruct (4.45) and performed comparably to the full GPT-4o (4.53). The model showed particular strength in maintaining "Linguistic Habits" and "Persona Consistency."

Discussion and Future Work

A significant challenge remains in "World Knowledge" leakage, where characters might accidentally reference real-world facts outside their intended knowledge scope. Future research will focus on scaling this synthetic approach to larger backbone models and developing benchmarks for role-playing in fictional settings (e.g., sci-fi or fantasy) where the internal logic differs from reality.

Summary updated

BibTeX
@misc{wang2025opencharacter,
  author = {Xiaoyang Wang and Hongming Zhang and Tao Ge and Wenhao Yu and Dian Yu and Dong Yu},
  title = {{OpenCharacter: Training Customizable Role-Playing LLMs with Large-Scale Synthetic Personas}},
  year = {2025},
  eprint = {2501.15427},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.15427},
}
Figure