SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.02814 · IJCAI · 2024

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

Yi Chang, Jindong Wang, Cheng Li, Xu Wang, Yuan Wu

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 5 functions out of this paper's own repositories and ran 3 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
wangxu0820/NegativePrompt canonical 3 of 5
FunctionStatusWhere it lives
get_em_score Ran wangxu0820/NegativePrompt/utility.py
pointer only (licence: NONE) · get_code("676022ccb046e5a3")
get_em_score_contain Ran wangxu0820/NegativePrompt/utility.py
pointer only (licence: NONE) · get_code("047e9d75454ae641")
normalize_prediction Ran wangxu0820/NegativePrompt/utility.py
pointer only (licence: NONE) · get_code("4692ec15c9bd6ee2")
get_query Not yet run wangxu0820/NegativePrompt/exec_accuracy.py
pointer only (licence: NONE) · get_code("d1cc7c58c450ad86")
subsample_data Not yet run wangxu0820/NegativePrompt/exec_accuracy.py
pointer only (licence: NONE) · get_code("01ed101f1dc9de50")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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 Neg-ativePrompt 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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2405.02814")
get_code_for_paper("2405.02814")
have("2405.02814")

Connect an agent — have() is free.