Modern large language models (LLMs) exhibit a remarkable capacity for role-playing, enabling them to embody not only human characters but also non-human entities. This versatility allows them to simulate complex human-like interactions and behaviors within various contexts, as well as to emulate specific objects or systems. While these capabilities have enhanced user engagement and introduced novel modes of interaction, the influence of role-playing on LLMs' reasoning abilities remains underexplored. In this study, we introduce a strategically designed role-play prompting methodology and assess its performance under the zero-shot setting across twelve diverse reasoning benchmarks. Our empirical results illustrate that role-play prompting consistently surpasses the standard zero-shot approach across most datasets. Notably, in experiments conducted using ChatGPT, accuracy on AQuA rises from 53.5% to 63.8%, and on Last Letter from 23.8% to 84.2%.Upon further comparison with the Zero-Shot-CoT technique, which prompts the model to "think step by step", our study demonstrates that role-play prompting acts as a more effective trigger for the CoT process. This highlights its potential to augment the reasoning capabilities of LLMs. We release our code at https://github.com/NKU-HLT/Role-Play-Prompting.
翻译:现代大型语言模型(LLMs)展现出卓越的角色扮演能力,不仅能拟人化塑造角色,还能模拟非人类实体。这种多功能性使它们能在不同情境中模拟复杂的人类互动与行为,同时也能模仿特定物体或系统。尽管这些能力增强了用户参与度并引入了新颖的交互模式,但角色扮演对LLMs推理能力的影响仍未被充分探索。本研究提出了一种策略性设计的角色扮演提示方法,并在零样本设置下评估其性能,涵盖十二个不同的推理基准测试。实证结果表明,角色扮演提示在大多数数据集上 consistently 优于标准零样本方法。值得注意的是,在使用ChatGPT进行的实验中,AQuA的准确率从53.5%提升至63.8%,Last Letter的准确率从23.8%提升至84.2%。进一步与引导模型"逐步思考"的Zero-Shot-CoT技术对比,本研究表明角色扮演提示可更有效地触发思维链(CoT)过程,凸显其在增强LLMs推理能力方面的潜力。我们的代码已开源在https://github.com/NKU-HLT/Role-Play-Prompting。