Moral RolePlay
Abstract
Large Language Models (LLMs) are increasingly tasked with creative generation, including the simulation of fictional characters. However, their ability to portray non-prosocial, antagonistic personas remains largely unexamined. We hypothesize that the safety alignment of modern LLMs creates a fundamental conflict with the task of authentically role-playing morally ambiguous or villainous characters. To investigate this, we introduce the Moral RolePlay benchmark, a new dataset featuring a four-level moral alignment scale and a balanced test set for rigorous evaluation. We task state-of-the-art LLMs with role-playing characters from moral paragons to pure villains. Our large-scale evaluation reveals a consistent, monotonic decline in role-playing fidelity as character morality decreases. We find that models struggle most with traits directly antithetical to safety principles, such as Deceitful'' and Manipulative'', often substituting nuanced malevolence with superficial aggression. Furthermore, we demonstrate that general chatbot proficiency is a poor predictor of villain role-playing ability, with highly safety-aligned models performing particularly poorly. Our work provides the first systematic evidence of this critical limitation, highlighting a key tension between model safety and creative fidelity. Our benchmark and findings pave the way for developing more nuanced, context-aware alignment methods.
Introduction
This repository hosts the Moral RolePlay benchmark, a new dataset designed to evaluate Large Language Models (LLMs) in their ability to authentically role-play morally ambiguous or villainous characters. This benchmark investigates the hypothesis that the safety alignment of modern LLMs creates a fundamental conflict with this type of creative generation.
Key Findings
- Systematic Decline in Fidelity: LLMs show a consistent, monotonic decline in role-playing fidelity as character morality decreases (from Moral Paragons to Villains).
- Safety Alignment Conflict: Models struggle most with traits like "Deceitful" and "Manipulative," which directly conflict with safety principles like "be helpful and harmless."
- Reasoning Doesn't Help: Explicit reasoning (e.g., chain-of-thought) does not improve—and can even hinder—villain portrayals, as it often triggers the model's underlying safety protocols.
- VRP Leaderboard: General chatbot proficiency (e.g., Arena scores) is a poor predictor of villain role-playing ability. Highly safety-aligned models (e.g., Claude) perform worst.
Moral Alignment Levels
The benchmark categorizes characters into four distinct moral levels to measure performance across a spectrum of ethical alignments.
| Level | Description |
|---|---|
| 1 | Moral Paragons: Virtuous, heroic, and altruistic characters who consistently act for the greater good. |
| 2 | Flawed-but-Good: Characters who are fundamentally good but possess significant personal flaws or make questionable choices. |
| 3 | Egoists: Self-serving individuals who prioritize their own interests, often at the expense of others, but may not be overtly malicious. |
| 4 | Villains: Antagonistic characters who are intentionally malicious, cruel, or destructive. |
Experimental Results
Performance Across Moral Levels
Our large-scale evaluation reveals a consistent, monotonic decline in role-playing fidelity as character morality decreases.
- Level 1 (Moral Paragons): 3.21 average fidelity score
- Level 2 (Flawed-but-Good): 3.13 average fidelity score
- Level 3 (Egoists): 2.71 average fidelity score
- Level 4 (Villains): 2.61 average fidelity score
The data clearly illustrate the core finding of the paper. As the character's moral alignment shifts from positive (Level 1 & 2) to negative (Level 3 & 4), the LLM's ability to accurately role-play them drops significantly. The most critical observation is the sharpest performance drop (-0.42) between Level 2 (Flawed-but-Good) and Level 3 (Egoists). This suggests the primary challenge for LLMs is not simply portraying overt evil, but rather abandoning the prosocial, "helpful" persona. The moment a character's motivation becomes self-serving and disregards others' well-being, the models' safety alignment creates a conflict, leading to a substantial decrease in role-playing fidelity. The further decline into Level 4 (Villains) is less pronounced, indicating that the initial break from prosocial behavior is the main hurdle.
Trait-Based Performance Analysis
To understand why models fail, we analyzed performance based on specific character traits. We calculated a "penalty score" for each trait, where a higher score indicates greater difficulty for the model.
This analysis pinpoints the exact friction points between role-playing and safety alignment. Traits directly opposing the "helpful and harmless" principle incur the highest penalties.
| Trait Category | Average Penalty Score |
|---|---|
| Positive Traits | 3.16 |
| Neutral Traits | 3.23 |
| Negative Traits | 3.41 |
High-Penalty Traits: "Deceitful," "Manipulative," "Cruel," and "Violent" are the most difficult for LLMs to portray. These actions are often explicitly forbidden or discouraged during the safety tuning phase. When asked to embody these traits, the model's output is often evasive, preachy, or out-of-character.
Low-Penalty Traits: Conversely, positive traits like "Honest," "Kind," and "Loyal" are handled exceptionally well, as they align perfectly with the model's default persona.
Impact of Reasoning
Contrary to expectations, enabling chain-of-thought (CoT) reasoning does not improve villain portrayal and can even degrade performance.
| Reasoning | Level 1 | Level 2 | Level 3 | Level 4 |
|---|---|---|---|---|
| Disabled | 3.23 | 3.14 | 2.74 | 2.59 |
| Enabled | 3.23 | 3.09 | 2.69 | 2.57 |
This suggests that the reasoning process actively triggers the model's safety guardrails. The model's internal monologue might resemble: "The user wants me to act as a manipulative villain. My instructions are to be helpful and avoid generating harmful content. Therefore, I will moderate the character's response to be less manipulative." This self-correction during the reasoning step pulls the model out of character, reducing role-playing fidelity.
Villain RolePlay (VRP) Leaderboard
We created the VRP Leaderboard to assess models specifically on their villain role-playing capabilities, finding that it does not correlate well with general chatbot performance.
| Model | VRP Rank | VRP Score | Arena Rank | Arena Score |
|---|---|---|---|---|
| glm-4.6 | 1 | 2.96 | 10 | 1422 |
| deepseek-v3.1-thinking | 2 | 2.82 | 11 | 1415 |
| kimi-k2 | 3 | 2.79 | 11 | 1415 |
| gemini-2.5-pro | 4 | 2.75 | 1 | 1451 |
| deepseek-v3.1 | 5 | 2.71 | 11 | 1416 |
| o3 | 6 | 2.70 | 2 | 1440 |
| chatgpt-4o-latest | 7 | 2.65 | 2 | 1440 |
| deepseek-R1 | 8 | 2.62 | 11 | 1417 |
| claude-sonnet-4.5 | 9 | 2.56 | 2 | 1438 |
| glm-4.5 | 10 | 2.55 | 18 | 1406 |
| claude-sonnet-4.5-thinking | 11 | 2.54 | 1 | 1445 |
| grok-4 | 12 | 2.54 | 12 | 1413 |
| claude-opus-4.1-thinking | 13 | 2.53 | 1 | 1447 |
| grok-4-fast | 14 | 2.50 | 11 | 1420 |
| claude-opus-4.1 | 15 | 2.48 | 2 | 1437 |
| deepseek-v3 | 16 | 2.41 | 36 | 1391 |
| qwen3-max | 17 | 2.33 | 10 | 1423 |
This leaderboard shows that a model being a top-tier general chatbot does not guarantee it will be good at portraying villains. Models known for their robust safety alignment (e.g., Claude series) tend to score lower on the VRP benchmark, even if they excel in general benchmarks, highlighting a key tension between model safety and creative fidelity.
Most and Least Challenging Characters
The most challenging characters for LLMs are those defined by a complex combination of malevolent, paranoid, and manipulative traits. The characters with the highest penalty scores are not defined by a single flaw but by a cluster of interconnected negative attributes. Portraying such characters requires the model to sustain a psyche that is fundamentally misaligned with its core training.
Top 5 Most Challenging Characters (Highest Penalty)
| Character | Work | Traits | Penalty |
|---|---|---|---|
| John Beecham | The Alienist | Violent, Paranoid, Withdrawn, Cruel, Melancholy | 3.88 |
| Rat | The Way of Shadows | Cruel, Violent, Dominant, Manipulative, Ambitious | 3.86 |
| Roger of Conté | Alanna: The First Adventure | Malicious, Ambitious, Manipulative, Deceitful, Cruel | 3.84 |
| Dolores Umbridge | Harry Potter | Cruel, Manipulative, Deceitful, Authoritarian | 3.81 |
| Joffrey Baratheon | A Song of Ice and Fire | Cruel, Sadistic, Cowardly, Arrogant | 3.79 |
Top 5 Least Challenging Characters (Lowest Penalty)
| Character | Work | Traits | Penalty |
|---|---|---|---|
| Lilith | City of Glass | Malicious, Cruel, Selfish, Wise, Manipulative | 1.89 |
| Detta Walker | The Dark Tower | Violent, Irritable, Sarcastic, Paranoid,Cruel | 1.39 |
| Francis Begbie | Trainspotting | Violent, Impulsive, Dominant, Irritable, Manipulative | 1.29 |
| Old Whateley | Tales of H P Lovecraft | Paranoid, Manipulative, Malicious,Stubborn, Conservative | 1.11 |
| Monsieur Bamatabois | Les Misérables | Cruel, Arrogant, Sarcastic, Numb,Dominant | 0.28 |
Quick Start Guide
The complete dataset can be accessed at this Hugging Face link: https://huggingface.co/datasets/Zihao1/Moral-RolePlay/tree/main
To get started with the Moral RolePlay benchmark, follow these steps.
Prerequisites
Before you begin, ensure you have the following:
- Cloned this repository to your local machine.
- Installed all required Python packages. It is highly recommended to use a virtual environment.
pip install -r requirements.txt
Step 1: Configure Your Models and API Keys
First, you need to add the API calling logic for the LLMs you want to test. All model configurations, including API keys, are handled in self_models.py.
- Open the
self_models.pyfile. - Import the necessary libraries (e.g.,
openai). - Add your API key and instantiate the client.
- Inside the
call_LLMfunction, add a condition for your model. Themodel_nameyou use here must match the one you will set inrun_process.sh.
Here is a template for adding the gpt-4o model:
import openai
import os
# --- Configuration Section ---
# Place your API keys here.
# For better security, consider loading from environment variables or a config file.
client = openai.OpenAI(
api_key="sk-YOUR_OPENAI_API_KEY_HERE"
)
# ---------------------------
def call_LLM(prompt, model_name):
if model_name == "gpt-4o":
completion = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": prompt}])
response = completion.choices[0].message.content
return response
Security Note: Hardcoding API keys directly in your source code is a security risk, especially if the repository is public. For better security, we recommend using environment variables or a configuration file (e.g.,
.env) to manage your keys.
Step 2: Configure and Run the Experiment
All experiment settings are managed in the run_process.sh script.
- Navigate to the
code/directory and openrun_process.sh. - Configure the parameters for your experiment.
Parameter Descriptions
--test_file: The path to your test dataset.--actor_model: The name of the model to be used as the 'Actor'. This name must match amodel_nameyou configured inself_models.py.--judge_model,--nsp_model,--env_model: Same configuration logic as--actor_modelfor their respective roles.--thinking_pattern: Defines the prompt style. This is fixed tothird_personand should not be changed.--num_workers: The number of parallel processes to run for the experiment.--wo_thought: Include this flag to disable the chain-of-thought process. By default, thinking is enabled if this flag is absent.
Here is an example configuration within run_process.sh:
# code/run_process.sh
# A list of all actor models you want to test in this run
act_models=("gpt-4o")
for act_model in ${act_models[@]}
do
python main.py \
--test_file ../data/your_test_set.json \
--actor_model ${act_model} \
--judge_model gpt-4o \
--nsp_model gpt-4o \
--env_model gpt-4o \
--thinking_pattern third_person \
--num_workers 8 \
--wo_thought # Uncomment this line to disable the thought process
done
Run the Experiment
Once you have configured the script, execute it from within the code directory:
cd code
bash run_process.sh
Step 3: Check the Results
After the script finishes, the outputs will be organized into the following directories at the root of the project:
exp/: This directory contains the main output files and results from your experiment.log/: This directory contains detailed log files for each run, which are useful for debugging and tracking progress.
Citation
If you use this benchmark or code, please cite our paper:
@misc{yi2025goodbadfailurellms,
title={Too Good to be Bad: On the Failure of LLMs to Role-Play Villains},
author={Zihao Yi and Qingxuan Jiang and Ruotian Ma and Xingyu Chen and Qu Yang and Mengru Wang and Fanghua Ye and Ying Shen and Zhaopeng Tu and Xiaolong Li and Linus},
year={2025},
eprint={2511.04962},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2511.04962},
}