Harnessing the Power of Large Language Models for Empathetic Response Generation: Empirical Investigations and Improvements

Yushan Qian, Weinan Zhang, Ting Liu

Abstract

Empathetic dialogue is an indispensable part of building harmonious social relationships and contributes to the development of a helpful AI. Previous approaches are mainly based on fine small-scale language models. With the advent of ChatGPT, the application effect of large language models (LLMs) in this field has attracted great attention. This work empirically investigates the performance of LLMs in generating empathetic responses and proposes three improvement methods of semantically similar in-context learning, two-stage interactive generation, and combination with the knowledge base. Extensive experiments show that LLMs can significantly benefit from our proposed methods and is able to achieve state-of-the-art performance in both automatic and human evaluations. Additionally, we explore the possibility of GPT-4 simulating human evaluators.

Introduction

Creating an AI capable of responding with genuine empathy is a long-standing challenge in Natural Language Processing (NLP). Empathy requires more than just word matching; it necessitates a deep understanding of a user’s experiences, feelings, and the underlying situation. Historically, researchers built specialized, small-scale models based on specific theoretical frameworks. However, these models often suffer from "safe" but repetitive responses and a lack of linguistic diversity.

With the rise of Large Language Models (LLMs), this research investigates whether general-purpose models like ChatGPT can surpass these specialized architectures. The study demonstrates a paradigm shift, showing that LLMs significantly outperform previous state-of-the-art (SOTA) models, particularly in response diversity and human-perceived quality.

Proposed Enhancements for Empathetic LLMs

To optimize LLM performance without expensive fine-tuning, the authors propose three "Advanced Exploration" methods:

  1. Semantically Similar In-Context Learning (SS ICL): Rather than using random examples, this method employs a sentence encoder to select training examples that are semantically closest to the current user input, providing more relevant context for the model.
  2. Two-stage Interactive Generation: Inspired by "Chain-of-Thought" prompting, this method requires the model to first infer the user's emotion and situation before generating a response. This explicit "thinking" step ensures the final reply is better tailored to the user's state.
  3. Knowledge Base Augmentation: The framework integrates the ATOMIC 20/20 commonsense knowledge base via the COMET model. It generates five types of commonsense inferences (e.g., user intent, subsequent needs) to enrich the prompt context.
Overview of the proposed framework, including Two-stage Interaction and Knowledge Base integration.

Experimental Setup

The study primarily utilizes the EMPATHETICDIALOGUES dataset, a benchmark containing approximately 25,000 multi-turn conversations across 32 emotion labels. The researchers established baselines using GPT-3, GPT-3.5, and ChatGPT in zero-shot and few-shot configurations to compare against existing specialized models.

Key Results and Insights

The Diversity Gap

A striking finding is the massive leap in response diversity. While specialized small models tend to be repetitive, LLMs achieved nearly double or triple the "Distinct-n" scores. For instance, ChatGPT (+ 5-shot) achieved a Dist-2 score of 18.29, compared to just 3.26 for the previous SOTA model, CASE.

Automatic evaluation results comparing state-of-the-art baselines with various LLM configurations.

Human and Automatic Evaluation

In automatic metrics, the SS ICL method was most effective at improving BLEU and BERTScore. In human evaluations, annotators preferred ChatGPT's responses over previous SOTA models in over 70% of cases. The Two-stage and Knowledge methods were particularly favored by humans for being more informative and perceptive. Furthermore, the study found that GPT-4's evaluations correlated strongly with human ratings (Spearman correlation ~0.45), suggesting LLMs can effectively simulate human judges for this subjective task.

Conclusion

This work confirms that LLMs like ChatGPT represent a significant advancement in empathetic dialogue. By leveraging targeted prompting strategies and external knowledge, these models achieve superior performance without the need for specialized architectures. Future work will address the scarcity of diverse, high-quality datasets and explore how these models generalize across different cultural and social contexts.

Summary updated

BibTeX
@inproceedings{qian2023harnessing,
  author = {Yushan Qian and Weinan Zhang and Ting Liu},
  title = {{Harnessing the Power of Large Language Models for Empathetic Response Generation: Empirical Investigations and Improvements}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  url = {https://openreview.net/forum?id=cMMxJxzYkZ},
}
Figure