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)已成为从传统计算任务到高级人工智能(AI)应用等广泛领域不可或缺的技术。这一广泛应用推动了各学科对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。