Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
41 tokens/sec
GPT-4o
60 tokens/sec
Gemini 2.5 Pro Pro
44 tokens/sec
o3 Pro
8 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Character-LLM: A Trainable Agent for Role-Playing (2310.10158v2)

Published 16 Oct 2023 in cs.CL and cs.AI

Abstract: 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.

Character-LLM: A Trainable Agent for Role-Playing

The paper "Character-LLM: A Trainable Agent for Role-Playing" explores an intriguing approach to simulating human characters using LLMs. Unlike typical prompting methods, the authors propose training specific models to embody historical or fictional figures, allowing these models to maintain consistent personas across varied interactions.

Methodology Overview

The paper introduces Character-LLM, a method in which LLMs are fine-tuned to simulate specific characters such as Beethoven or Cleopatra. The approach consists of three main components:

  1. Experience Reconstruction: The authors compile character profiles and use them to create detailed scenes that mimic the experiences and interactions of the characters. This process leverages the capabilities of models like LLaMA to simulate the intricate traits and personal histories of these figures.
  2. Experience Upload: LLMs are trained using the reconstructed experiences, effectively loading these narratives into the model, thus allowing it to simulate the character with greater authenticity.
  3. Protective Experiences: This involves training models to forget or avoid knowledge that contradicts the character's historical or fictional context, preventing anachronistic or irrelevant responses.

Experimental Results

The evaluation focuses on model performances across several dimensions: memorization, values, personality, hallucination avoidance, and stability. The trained agents show consistent character portrayal, outperforming baseline models like Alpaca and Vicuna. Specifically, the results demonstrate that Character-LLMs excel in maintaining the distinct traits and knowledge scopes of the characters they simulate. Notably, the introduction of protective experiences helps mitigate hallucination, restricting knowledge to what is appropriate for the simulated persona.

Implications and Future Directions

The implications of this research are manifold, especially for applications requiring role-based interactions, such as NPCs in games, educational tools, and historical studies. Trainable agents could become instrumental in fields like social sciences by providing insights into historical and theoretical character interactions.

The paper suggests potential developments in integrating multimodal data, increasing the vividness and diversity of character experiences beyond textual content. Future work could explore larger model architectures or more extensive pre-training data to enhance the authenticity and complexity of the role-play simulations.

Conclusion

Character-LLM represents a significant step in specialization of LLMs for simulating human-like characters. This approach underscores the potential of trainable agents to augment human-computer interaction by providing consistent, believable personas, while also addressing the challenges inherent in retaining the nuances of individual character traits. The research opens new avenues for the use of AI in immersive simulations and interactive storytelling.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (35)
  1. Training a helpful and harmless assistant with reinforcement learning from human feedback. arXiv preprint arXiv:2204.05862.
  2. Joseph Bates. 1994. The role of emotion in believable agents. Commun. ACM, 37(7):122–125.
  3. On the opportunities and risks of foundation models. arXiv preprint arXiv:2108.07258.
  4. The cog project: Building a humanoid robot. In Computation for Metaphors, Analogy, and Agents, number 1562 in Lecture Notes on Artificial Intelligence, pages 52–87, Berlin. Springer-Verlag.
  5. Language models are few-shot learners. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual.
  6. Dungeons and dragons as a dialog challenge for artificial intelligence. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 9379–9393, Abu Dhabi, United Arab Emirates. Association for Computational Linguistics.
  7. Vicuna: An open-source chatbot impressing gpt-4 with 90%* chatgpt quality.
  8. Jonas Freiknecht and Wolfgang Effelsberg. 2020. Procedural generation of interactive stories using language models. In International Conference on the Foundations of Digital Games (FDG ’20), page 8, Bugibba, Malta. ACM.
  9. A survey on automated fact-checking. Trans. Assoc. Comput. Linguistics, 10:178–206.
  10. Survey of hallucination in natural language generation. ACM Computing Surveys, 55(12):1–38.
  11. Soda: Million-scale dialogue distillation with social commonsense contextualization. arXiv preprint arXiv:2212.10465.
  12. Evaluating the factual consistency of abstractive text summarization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, EMNLP 2020, Online, November 16-20, 2020, pages 9332–9346. Association for Computational Linguistics.
  13. John Laird and Michael VanLent. 2001. Human-level ai’s killer application: Interactive computer games. AI Magazine, 22(2):15.
  14. Neil Madden and Brian Logan. 2007. Collaborative narrative generation in persistent virtual environments. In Intelligent Narrative Technologies, Papers from the 2007 AAAI Fall Symposium, Arlington, Virginia, USA, November 9-11, 2007, volume FS-07-05 of AAAI Technical Report, pages 71–78. AAAI Press.
  15. Developing game ai agent behaving like human by mixing reinforcement learning and supervised learning. In Proceedings of the 18th IEEE/ACIS International Conference on Software Engineering, Artificial Intelligence, Networking and Parallel/Distributed Computing (SNPD), pages 153–158, Kanazawa, Japan.
  16. Deep learning for deepfakes creation and detection: A survey. Computer Vision and Image Understanding, 223:103525.
  17. OpenAI. 2023. GPT-4 technical report. CoRR, abs/2303.08774.
  18. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730–27744.
  19. Generative agents: Interactive simulacra of human behavior. arXiv preprint arXiv:2304.03442.
  20. Social simulacra: Creating populated prototypes for social computing systems. In In the 35th Annual ACM Symposium on User Interface Software and Technology (UIST ’22), UIST ’22, New York, NY, USA. Association for Computing Machinery.
  21. Mark O. Riedl. 2012. Interactive narrative: A novel application of artificial intelligence for computer games. In Proceedings of the Twenty-Sixth AAAI Conference on Artificial Intelligence (AAAI’12), pages 2160–2165.
  22. Mark O. Riedl and R. Michael Young. 2005. An objective character believability evaluation procedure for multi-agent story generation systems. In Proceedings of the 5th International Working Conference on Intelligent Virtual Agents (IVA’05), pages 58–70, Kos, Greece.
  23. Stanford alpaca: An instruction-following llama model. https://github.com/tatsu-lab/stanford_alpaca.
  24. Frank Thomas and Ollie Johnston. 1981. Disney Animation: The Illusion of Life. Abbeville Press, New York.
  25. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971.
  26. Neural codec language models are zero-shot text to speech synthesizers. arXiv preprint arXiv:2301.02111.
  27. Voyager: An open-ended embodied agent with large language models. arXiv preprint arXiv:2305.16291.
  28. Self-instruct: Aligning language model with self generated instructions. arXiv preprint arXiv:2212.10560.
  29. Hififace: 3d shape and semantic prior guided high fidelity face swapping. In Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI 2021, Virtual Event / Montreal, Canada, 19-27 August 2021, pages 1136–1142. ijcai.org.
  30. Chain-of-thought prompting elicits reasoning in large language models. In NeurIPS.
  31. Promptchainer: Chaining large language model prompts through visual programming. In CHI EA ’22: Extended Abstracts of the 2022 CHI Conference on Human Factors in Computing Systems.
  32. Ai chains: Transparent and controllable human-ai interaction by chaining large language model prompts. In CHI ’22: Proceedings of the 2022 CHI Conference on Human Factors in Computing Systems.
  33. Wizardlm: Empowering large language models to follow complex instructions. arXiv preprint arXiv:2304.12244.
  34. Speak foreign languages with your own voice: Cross-lingual neural codec language modeling. arXiv preprint arXiv:2303.03926.
  35. Lima: Less is more for alignment. arXiv preprint arXiv:2305.11206.
User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (4)
  1. Yunfan Shao (19 papers)
  2. Linyang Li (57 papers)
  3. Junqi Dai (9 papers)
  4. Xipeng Qiu (257 papers)
Citations (136)