NegativePrompt: Leveraging Psychology for Large Language Models Enhancement via Negative Emotional Stimuli

Xu Wang, Cheng Li, Yi Chang, Jindong Wang, Yuan Wu
5/5/2024
cs.CL

Official code: wangxu0820/NegativePrompt (25 stars, last commit 2024-05-10).

Abstract

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.

View on arXivView PDF

Code Implementations(1)

The official GitHub page for paper "NegativePrompt: Leveraging Psychology for Large Language Models Enhancement via Negative Emotional Stimuli".

251PythonApr 25, 20242 years ago
large-language-modelsllmllmsprompt-engineeringpsychology-experiments

Similar Papers

Cite this paper

@article{wang2024negativeprompt,
  title  = {NegativePrompt: Leveraging Psychology for Large Language Models Enhancement via Negative Emotional Stimuli},
  author = {Xu Wang and Cheng Li and Yi Chang and Jindong Wang and Yuan Wu},
  year   = {2024},
  eprint = {2405.02814},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.02814v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.02814.svg)](https://codeofpaper.com/paper/2405.02814)

Discussion