In everyday conversations, humans can take on different roles and adapt their vocabulary to their chosen roles. We explore whether LLMs can take on, that is impersonate, different roles when they generate text in-context. We ask LLMs to assume different personas before solving vision and language tasks. We do this by prefixing the prompt with a persona that is associated either with a social identity or domain expertise. In a multi-armed bandit task, we find that LLMs pretending to be children of different ages recover human-like developmental stages of exploration. In a language-based reasoning task, we find that LLMs impersonating domain experts perform better than LLMs impersonating non-domain experts. Finally, we test whether LLMs' impersonations are complementary to visual information when describing different categories. We find that impersonation can improve performance: an LLM prompted to be a bird expert describes birds better than one prompted to be a car expert. However, impersonation can also uncover LLMs' biases: an LLM prompted to be a man describes cars better than one prompted to be a woman. These findings demonstrate that LLMs are capable of taking on diverse roles and that this in-context impersonation can be used to uncover their hidden strengths and biases.
翻译:在日常对话中,人类可以扮演不同角色,并根据所选角色调整词汇。我们探索了大型语言模型(LLMs)在生成文本时能否通过上下文模仿扮演不同角色。我们要求LLMs在解决视觉与语言任务前假设不同的人物角色。具体做法是在提示前添加与社会身份或领域专业知识相关的角色描述。在多臂赌博机任务中,我们发现假装成不同年龄段儿童的LLMs重现了人类探索行为的发育阶段特征。在基于语言的推理任务中,扮演领域专家的LLMs比扮演非领域专家的LLMs表现更佳。最后,我们检验了LLMs的角色模仿在描述不同类别时是否与视觉信息互补。结果表明,模仿能提升性能:被提示为鸟类专家的LLMs描述鸟类的能力优于被提示为汽车专家的LLMs。然而,模仿也可能暴露LLMs的偏见:被提示为男性的LLMs描述汽车的能力优于被提示为女性的LLMs。这些发现证明LLMs具备扮演多样化角色的能力,且这种上下文模仿可用于揭示其隐藏的优势与偏见。