[论文解读] RoleLLM: Benchmarking, Eliciting, and Enhancing Role-Playing Abilities of Large Language Models
RoleLLM 引入 RoleBench、Context-Instruct、RoleGPT 和 RoCIT,用于基准测试、引导和微调开放源码的大模型,以实现对角色扮演的细粒度控制,在特定角色任务上与 GPT-4 取得竞争性结果。
The advent of Large Language Models (LLMs) has paved the way for complex tasks such as role-playing, which enhances user interactions by enabling models to imitate various characters. However, the closed-source nature of state-of-the-art LLMs and their general-purpose training limit role-playing optimization. In this paper, we introduce RoleLLM, a framework to benchmark, elicit, and enhance role-playing abilities in LLMs. RoleLLM comprises four stages: (1) Role Profile Construction for 100 roles; (2) Context-Based Instruction Generation (Context-Instruct) for role-specific knowledge extraction; (3) Role Prompting using GPT (RoleGPT) for speaking style imitation; and (4) Role-Conditioned Instruction Tuning (RoCIT) for fine-tuning open-source models along with role customization. By Context-Instruct and RoleGPT, we create RoleBench, the first systematic and fine-grained character-level benchmark dataset for role-playing with 168,093 samples. Moreover, RoCIT on RoleBench yields RoleLLaMA (English) and RoleGLM (Chinese), significantly enhancing role-playing abilities and even achieving comparable results with RoleGPT (using GPT-4).
研究动机与目标
- 为 100 个角色(英文和中文)构建细粒度的角色档案,以实现细化的角色扮演。
- 通过 Context-Instruct 生成与角色相关的知识与记忆,提供高质量的指令数据。
- 使用 RoleGPT 通过对话工程化的提示实现说话风格的拟合,进行角色定制。
- 在 RoleBench 数据上对开源模型(RoleLLaMA、RoleGLM)进行 RoCIT 微调,以实现强大的角色扮演性能。
- 将 RoleBench 作为评估与改进大模型角色扮演的基准和数据集。
提出的方法
- 角色档案构建:基于剧本创建 100 个具备多样个性的字符级角色。
- 基于情境的指令生成(Context-Instruct):提取角色相关的知识与记忆,并产出带有置信度的问答三元组。
- Role prompting(RoleGPT):通过对话工程化提示模仿说话风格。
- 角色条件化指令微调(RoCIT):使用 RoleBench 数据对开源模型(RoleLLaMA、RoleGLM)进行系统指令驱动的角色定制微调。
- RoleBench 数据集:由 RoleGPT 与 Context-Instruct 的输出构建,总计 168,093 条英语与中文的角色扮演样本。
- 评估:使用基于 Rouge-L 的指标与基于 GPT 的评估者,评估说话风格模仿、回答准确性与角色相关知识。
实验结果
研究问题
- RQ1我们如何为 LLM 构建细粒度的、字符级别的角色基准与相应知识?
- RQ2是否能够通过数据驱动的方法对开源 LLM 进行有效微调,以达到与 GPT-4 相当的强大角色扮演能力?
- RQ3对比对话工程与以提示为基础的方法在引出角色扮演方面的相对有效性如何?
- RQ4情境高效的角色条件化策略如何影响角色定制与知识整合?
- RQ5角色扮演模型对未见角色与语言(英语/汉语)的泛化能力如何?
主要发现
| 模型 | CUS | RAW | SPE | 平均值 |
|---|---|---|---|---|
| RoleGPT | 0.5764 | 0.5322 | 0.3229 | 0.4772 |
| LLaMA | 0.1291 | 0.1232 | 0.2553 | 0.1692 |
| LLaMA-script | 0.0832 | 0.0509 | 0.1081 | 0.0807 |
| Alpaca | 0.2423 | 0.3529 | 0.2695 | 0.2882 |
| Vicuna | 0.2101 | 0.2550 | 0.2913 | 0.2521 |
| RoleLLaMA | 0.3294 | 0.3755 | 0.3814 | 0.3621 |
- RoleGPT 的对话工程化提示在引出基于 RoleGPT 的评测中的角色行为方面优于零-shot 提示。
- RoleBench 显著提升模型的角色扮演能力,在某些指标上甚至可以与 RoleGPT(GPT-4)相抗衡。
- RoleLLaMA 在对未见角色的说话风格模仿与准确性方面具有出色的泛化能力,所需角色描述与口号极少。
- 系统指令驱动的角色定制在 RoCIT 的有效性和上下文效率方面优于检索增强方法。
- Context-Instruct 在角色相关知识方面的提升,相较于检索增强,在档案噪声或稀疏时更具优势。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。