计算机科学与探索 ›› 2024, Vol. 18 ›› Issue (11): 2925-2939.DOI: 10.3778/j.issn.1673-9418.2406036

• 垂直领域大模型构建与应用专题 • 上一篇    下一篇

基于大语言模型多阶段推理的情绪支持对话生成方法

桑晨扬,马廷淮,谢欣彤,孙圣杰,黄锐   

  1. 1. 南京信息工程大学 计算机学院,南京 210044
    2. 南京信息工程大学 软件学院,南京 210044
    3. 江苏海洋大学 计算机工程学院,江苏 连云港 222005
  • 出版日期:2024-11-01 发布日期:2024-10-31

Multi-stage Reasoning Method for Emotional Support Dialogue Generation Based on Large Language Models

SANG Chenyang, MA Tinghuai, XIE Xintong, SUN Shengjie, HUANG Rui   

  1. 1. School of Computer Science, Nanjing University of Information Science & Technology, Nanjing 210044, China
    2. School of Software, Nanjing University of Information Science & Technology, Nanjing 210044, China
    3. School of Computer Engineering, Jiangsu Ocean University, Lianyungang, Jiangsu 222005, China
  • Online:2024-11-01 Published:2024-10-31

摘要: 情绪支持对话任务需在充分理解用户心理状态的基础上,采取特定的对话策略进行支持性回复,以减轻用户的情绪困扰。现有的研究大多采用端到端生成的方法,通过微调的方式调整小型预训练语言模型,以对情绪支持任务进行适配。然而,这些方法缺乏对用户心理状态的细粒度理解,导致共情程度不足,并且模型决策过程不透明,导致可解释性较差。为解决上述问题,受目前大语言模型出色的推理能力启发,提出了一种基于大语言模型的情绪支持对话推理框架CoES(chain-of-emotional-support),将端到端的生成问题转化为分阶段的推理问题,从而将复杂的情绪支持任务分解为简单子任务来逐步解决。该框架由情绪推理链、策略推理链、回复生成链三条思维链组成,分别用于用户心理状态的细粒度挖掘、情绪支持策略的选择以及回复的生成与优化。针对性地设计了不同的外部知识增强策略,以改善大模型在心理状态挖掘及支持策略选择过程中的推理效果。ESConv数据集上的人工评估及自动评估结果表明,所提出的推理方法在情绪支持的可解释性及内容生成质量方面达到了先进的性能。

关键词: 情绪支持对话, 大语言模型, 思维链推理, 心理健康

Abstract: The task of emotional support dialogue requires providing supportive responses based on a thorough understanding of the user’s psychological state, with the aim of alleviating their emotional distress. Most existing studies employ end-to-end generation methods, where small pre-trained language models are fine-tuned to adapt to the emotional support task. However, these methods lack a fine-grained understanding of the user’s psychological state, resulting in insufficient empathy, and the model decision process is opaque, resulting in poor interpretability. To address these issues, inspired by the excellent reasoning capabilities of current large language models, this paper proposes an emotional support dialogue reasoning framework based on large language models called CoES (chain-of-emotional-support). This framework transforms the end-to-end generation problem into a step-by-step reasoning problem, breaking down the complex task of emotional support into simpler subtasks to be solved sequentially. The framework comprises three reasoning chains: the emotional reasoning chain, the strategy reasoning chain, and the response generation chain, which are used for the fine-grained exploration of the user’s psychological state, the selection of emotional support strategies, and the generation and optimization of responses, respectively. Additionally, this paper designs various external knowledge augmentation strategies to improve the reasoning effectiveness of the large model in the psychological state exploration and support strategy selection processes. Both manual and automatic evaluation results on the ESConv dataset demonstrate that the proposed reasoning method achieves advanced performance in terms of the interpretability of emotional support and the quality of content generation.

Key words: emotional support dialogue, large language models, chain-of-thought reasoning, mental health