Character-LLM: A Trainable Agent for Role-Playing

Yunfan Shao, Linyang Li, Junqi Dai, Xipeng Qiu
10/16/2023
cs.CLcs.AI

No official code found. Best implementation: choosewhatulike/trainable-agents (651 stars, Apache-2.0, last commit 2024-10-29).

Abstract

Large language models (LLMs) can be used to serve as agents to simulate human behaviors, given the powerful ability to understand human instructions and provide high-quality generated texts. Such ability stimulates us to wonder whether LLMs can simulate a person in a higher form than simple human behaviors. Therefore, we aim to train an agent with the profile, experience, and emotional states of a specific person instead of using limited prompts to instruct ChatGPT API. In this work, we introduce Character-LLM that teach LLMs to act as specific people such as Beethoven, Queen Cleopatra, Julius Caesar, etc. Our method focuses on editing profiles as experiences of a certain character and training models to be personal simulacra with these experiences. To assess the effectiveness of our approach, we build a test playground that interviews trained agents and evaluates whether the agents \textit{memorize} their characters and experiences. Experimental results show interesting observations that help build future simulacra of humankind.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

Code and datasets for "Character-LLM: A Trainable Agent for Role-Playing"

65151Shell, PythonOct 8, 20231 years agoApache-2.0
agentcharacterlanguage-modellarge-language-modelsllm+3 more

Similar Papers

Cite this paper

@article{shao2023characterllm,
  title  = {Character-LLM: A Trainable Agent for Role-Playing},
  author = {Yunfan Shao and Linyang Li and Junqi Dai and Xipeng Qiu},
  year   = {2023},
  eprint = {2310.10158},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.10158v2}
}

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/2310.10158.svg)](https://codeofpaper.com/paper/2310.10158)

Discussion