Character-LLM: A Trainable Agent for Role-Playing

Yunfan Shao,Linyang Li,Junqi Dai,Xipeng Qiu
2023-12-14
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.
Computation and Language,Artificial Intelligence
What problem does this paper attempt to address?
### Problems the Paper Attempts to Solve This paper aims to create trainable agents capable of simulating specific character behaviors, experiences, and emotional states by proposing a new method—**Character-LLM**. Specifically, the paper attempts to address the following issues: 1. **Limitations of Traditional Methods**: - Current large language models (LLMs) can simulate basic human behaviors through simple prompts, but this approach is insufficient to describe a real character. Simple prompts cannot fully capture the complexity and uniqueness of a person. 2. **Improving Simulation Realism**: - By constructing detailed personal experience scenarios and inputting these scenarios into large language models for training, the model can better mimic the behavior patterns, values, and personality traits of specific characters. 3. **Avoiding Hallucinations**: - Traditional LLMs may generate information or knowledge that does not align with a specific character. For example, when asking an ancient figure about modern technology, the model should exhibit ignorance rather than detailed discussion. Therefore, the paper proposes a method of protective experiences to reduce such hallucinations. 4. **Evaluation and Validation**: - A test environment was constructed to evaluate whether these trained agents can accurately reflect the characters they simulate and compare them with other prompt-based models such as Alpaca, Vicuna, and ChatGPT. In summary, the main goal of the paper is to achieve more realistic human behavior simulation by training agents with specific character traits and to validate the effectiveness of this method through a series of experiments.