Letian Peng, Yupeng Hou, Kun Zhou, Jingbo Shang
The paper introduces Codified Finite-State Machines (CFSMs) and their probabilistic extension (CPFSMs) to improve character state modeling in role-playing with large language models, enhancing consistency and engagement by automatically generating state transitions from character profiles.
Role-playing with large language models can be inconsistent because these models often focus on visible actions without understanding the deeper character states that drive interactions. The authors propose a new approach called Codified Finite-State Machines (CFSMs) to address this issue. CFSMs automatically create a structured model of character states and transitions from textual character profiles, ensuring more consistent behavior. Additionally, they introduce a probabilistic version, CPFSMs, to handle uncertainty and variability in character interactions. This method has been shown to outperform traditional approaches in both controlled and open-ended role-playing scenarios.