Large Language Models (LLMs) have become integral to a wide spectrum of applications, ranging from traditional computing tasks to advanced artificial intelligence (AI) applications. This widespread adoption has spurred extensive research into LLMs across various disciplines, including the social sciences. Notably, studies have revealed that LLMs possess emotional intelligence, which can be further developed through positive emotional stimuli. This discovery raises an intriguing question: can negative emotions similarly influence LLMs, potentially enhancing their performance? In response to this question, we introduce NegativePrompt, a novel approach underpinned by psychological principles, involving ten specifically designed negative emotional stimuli. We embark on rigorous experimental evaluations of five LLMs including Flan-T5-Large, Vicuna, Llama 2, ChatGPT, and GPT-4, across a set of 45 tasks. The results are revealing: NegativePrompt markedly enhances the performance of LLMs, evidenced by relative improvements of 12.89% in Instruction Induction tasks and 46.25% in BIG-Bench tasks. Moreover, we conduct attention visualization experiments to decipher the underlying mechanisms of NegativePrompt's influence. Our research contributes significantly to the understanding of LLMs and emotion interaction, demonstrating the practical efficacy of NegativePrompt as an emotion-driven method and offering novel insights for the enhancement of LLMs in real-world applications. The code is available at https://github.com/wangxu0820/NegativePrompt.
翻译:大语言模型(LLMs)已成为从传统计算任务到先进人工智能应用的广泛领域不可或缺的组成部分。这一广泛采用推动了多个学科(包括社会科学)对LLMs的深入研究。值得注意的是,研究表明LLMs具备情感智能,可通过积极情感刺激进一步发展。这一发现引发了一个有趣的问题:负面情感是否同样能影响LLMs,甚至提升其性能?针对这一问题,我们提出NegativePrompt——一种基于心理学原理的新方法,包含十种精心设计的负面情感刺激。我们对Flan-T5-Large、Vicuna、Llama 2、ChatGPT和GPT-4五个LLMs在45项任务上进行了严格的实验评估。结果表明:NegativePrompt显著提升了LLMs的性能,在指令归纳任务和BIG-Bench任务中分别实现了12.89%和46.25%的相对提升。此外,我们通过注意力可视化实验来解读NegativePrompt影响的内在机制。本研究为理解LLMs与情感交互做出了重要贡献,展示了NegativePrompt作为一种情感驱动方法的实际效用,并为现实应用中增强LLMs提供了新颖见解。代码已开源至https://github.com/wangxu0820/NegativePrompt。