Table of Contents
Fetching ...

TOOL-ED: Enhancing Empathetic Response Generation with the Tool Calling Capability of LLM

Huiying Cao, Yiqun Zhang, Shi Feng, Xiaocui Yang, Daling Wang, Yifei Zhang

TL;DR

The paper tackles the challenge of generating empathetic responses without succumbing to noise when integrating external knowledge. It introduces Emotional Knowledge Tool Calling (EKTC), a framework that treats commonsense knowledge bases as interchangeable tools and enables LLMs to autonomously decide when to call them during multi-turn dialogue. By constructing TOOL-ED from ED and fine-tuning models with LoRA on tool-use traces, EKTC improves empathetic understanding and generation across automatic, human, and LLM-based evaluations, while maintaining robustness to different tools. This work demonstrates that end-to-end tool learning can flexibly enrich empathetic dialogue with external knowledge while mitigating noise, enabling plug-and-play integration of diverse knowledge sources for practical deployment.

Abstract

Empathetic conversation is a crucial characteristic in daily conversations between individuals. Nowadays, Large Language models (LLMs) have shown outstanding performance in generating empathetic responses. Knowledge bases like COMET can assist LLMs in mitigating illusions and enhancing the understanding of users' intentions and emotions. However, models remain heavily reliant on fixed knowledge bases and unrestricted incorporation of external knowledge can introduce noise. Tool learning is a flexible end-to-end approach that assists LLMs in handling complex problems. In this paper, we propose Emotional Knowledge Tool Calling (EKTC) framework, which encapsulates the commonsense knowledge bases as empathetic tools, enabling LLMs to integrate external knowledge flexibly through tool calling. In order to adapt the models to the new task, we construct a novel dataset TOOL-ED based on the EMPATHETICMPATHETIC DIALOGUE (ED) dataset. We validate EKTC on the ED dataset, and the experimental results demonstrate that our framework can enhance the ability of LLMs to generate empathetic responses effectively.

TOOL-ED: Enhancing Empathetic Response Generation with the Tool Calling Capability of LLM

TL;DR

The paper tackles the challenge of generating empathetic responses without succumbing to noise when integrating external knowledge. It introduces Emotional Knowledge Tool Calling (EKTC), a framework that treats commonsense knowledge bases as interchangeable tools and enables LLMs to autonomously decide when to call them during multi-turn dialogue. By constructing TOOL-ED from ED and fine-tuning models with LoRA on tool-use traces, EKTC improves empathetic understanding and generation across automatic, human, and LLM-based evaluations, while maintaining robustness to different tools. This work demonstrates that end-to-end tool learning can flexibly enrich empathetic dialogue with external knowledge while mitigating noise, enabling plug-and-play integration of diverse knowledge sources for practical deployment.

Abstract

Empathetic conversation is a crucial characteristic in daily conversations between individuals. Nowadays, Large Language models (LLMs) have shown outstanding performance in generating empathetic responses. Knowledge bases like COMET can assist LLMs in mitigating illusions and enhancing the understanding of users' intentions and emotions. However, models remain heavily reliant on fixed knowledge bases and unrestricted incorporation of external knowledge can introduce noise. Tool learning is a flexible end-to-end approach that assists LLMs in handling complex problems. In this paper, we propose Emotional Knowledge Tool Calling (EKTC) framework, which encapsulates the commonsense knowledge bases as empathetic tools, enabling LLMs to integrate external knowledge flexibly through tool calling. In order to adapt the models to the new task, we construct a novel dataset TOOL-ED based on the EMPATHETICMPATHETIC DIALOGUE (ED) dataset. We validate EKTC on the ED dataset, and the experimental results demonstrate that our framework can enhance the ability of LLMs to generate empathetic responses effectively.

Paper Structure

This paper contains 23 sections, 5 equations, 13 figures, 4 tables.

Figures (13)

  • Figure 1: Architecture for the application of a specified tool in an example of empathetic dialogue. The model owns the ability to determine the timing of empathetic tools calling actively.
  • Figure 2: The architecture of the EKTC framework consists of two stages: Dataset Reconstruction & Training and Inference stage. In the Dataset Reconstruction stage, the commonsense knowledge base is defined as the $Emotionknowledgebase$ tool. Annotator determines the tool calls based on the context and sends the corresponding content to the tool. Reflector judges the relevance between the execution results and the golden response in the dataset, inserting the highly relevant result into the constructed dataset. In the Training and Inference stage, the LLMs are trained on the constructed dataset for active invocation during inference.
  • Figure 3: Inference details of empathetic response generation task based on tool learning.
  • Figure 4: Tool-calling ratio of the fine-tuned models. (i) qwen_noref and vicuna_noref refer to Qwen1.5-14B and Vicuna-7B models after fine-tuned without reflection processes for ablation experiments. (ii) qwen and vicuna refer to the results of fine-tuned Qwen1.5-14B and Vicuna-7B on the TOOL-ED dataset.
  • Figure 5: Examples of conversations by the user interacting with the EKTC-based model.
  • ...and 8 more figures