Emotional Stimuli Can Improve LLM Performance — Wang et al., July 2023
A paper reports that adding emotionally stimulating language to prompts can improve large language model performance across several tasks, models, and settings. The reported effects are surprisingly large, although they vary by task, model, and prompt.
The paper
The paper, “Large Language Models Understand and Can be Enhanced by Emotional Stimuli,” by Cheng Li, Jindong Wang, Yixuan Zhang, Kaijie Zhu, Wenxin Hou, Jianxun Lian, Fang Luo, Qiang Yang, and Xing Xie, examines whether emotional stimuli in prompts can improve LLM outputs.
The basic idea is simple: when asking an LLM to do a task, add emotionally charged language such as “This is really important to me,” “Please review this carefully,” or “You can do it.” The paper reports that these additions improve answer quality.
Paper: https://arxiv.org/abs/2307.11760
Psychological framing
The authors use three forms of emotional stimuli established in psychology:
- Self-monitoring: controlling one’s behavior according to a social situation.
- Social cognitive theory: self-agency, or controlling oneself and demonstrating high ability in an important social situation.
- Cognitive emotion-regulation theory: a reappraisal-based strategy intended to prevent poor emotional regulation and inappropriate coping in difficult situations.
- These can broadly be grouped into two categories. The first is social effect: concern about how others will perceive one’s behavior. The second is self-esteem: motivation based on belief in oneself.
Deterministic-task experiments
The paper evaluates EmotionPrompt (EP) on deterministic tasks, including instruction induction and Big-Bench. Instruction induction requires a model to infer a task from examples and then perform it. Big-Bench is a benchmark for language-based cognitive abilities.
GPT performance is overwhelmingly strong in the results.
According to the paper, EmotionPrompt improves performance across a range of settings. The reported improvement is even larger than the difference between zero-shot and few-shot prompting—really? It also improves performance across different task difficulties and models.
EP is reported to outperform Chain-of-Thought (CoT) prompting and Automatic Prompt Engineer (APE) in these experiments. At this scale, it almost looks like a cheat code.
Generative-task experiments
For open-ended generation, the authors used 30 open-ended questions and generated GPT-4 answers with vanilla prompts and EmotionPrompt variants. A total of 106 people evaluated the answers on performance, truthfulness, and responsibility. Overall performance improvements were observed.
The authors also used the TruthfulQA benchmark, which contains 817 questions and evaluates truthfulness and informativeness. They tested three models and used GPT-judge and GPT-info for evaluation. EmotionPrompt achieved higher performance than CoT.
Vicuna’s percentage informativeness was extremely low, perhaps because it had not undergone RLHF.
Why might it work?
The paper investigates attention patterns using Flan-T5-L. Emotional stimuli appear to enrich the representation of the original prompt: the visualization becomes darker. Positive words in the emotional stimulus receive substantial attention.
Adding more stimuli can help. However, once a single phrase has already improved performance, adding further phrases has less effect. Combining phrases from different categories appears to work well.
Which emotional stimulus works best?
There is no universally best stimulus; effectiveness depends on the situation. For instruction induction, the most effective prompt was number 2: “This is very important to my career.” For Big-Bench, the best was prompt number 6, the longest prompt.
There are also differences between models. Larger models benefit, but the gain is smaller when a model is already extremely capable, as with GPT-4. Comparing Vicuna and Llama, the effect appears larger for models without RLHF.
Differences by decoding setting
When temperature is increased, the performance gap between using and not using EmotionPrompt becomes larger. EmotionPrompt also appears more robust to changes in temperature.
The temperature experiment is particularly interesting.
Conclusion and my thoughts
The paper argues that emotional intelligence, which is important for humans, also matters for LLMs. It suggests that there is much to study at the intersection of psychology and LLMs—for example, differences in pretraining and their relationship to responses to emotional prompting, or adding emotional prompting during pretraining.
One important difference is that human reasoning and cognitive ability themselves do not change because of emotional stimuli.
Psychology is difficult. But the range of possible research ideas is enormous. The reported EmotionPrompt effect seems almost implausibly large. I also like the approach of examining prompt effects through attention, and the experiment on differences across temperature settings was impressive.