Abstract Background/Objectives: The current state of the art in Retrieval-Augmented Generation (RAG) models is based mostly on semantic similarity and pays little attention to the role of emotional states in memory recall. This study aims to present an Emotion-aware Retrieval-Augmented Generation (Emotional RAG) framework that combines semantic similarity and emotional congruence in memory recall. Method: The emotional states of user queries and memory pieces are represented using 8-dimensional emotion vectors, while semantic similarity is measured using dense embeddings. Four different memory recall strategies are proposed, including additive and multiplicative combination strategies, as well as two sequential semantic and emotional filtering approaches. Findings: The proposed framework is tested on three benchmark datasets: InCharacter, CharacterEval, and Character-LLM, using ChatGLM-6B, Qwen-72B, and GPT-3.5 models as backbones. The performance of the proposed framework is measured using MBTI and Big Five Inventory (BFI) metrics, including Acc(Dim), Acc(Full), MSE, and MAE. The experimental outcome indicates that Emotional RAG always performs better than semantic-only RAG. For InCharacter, MBTI Acc(Full) enhances from 0.2188 to 0.2946 for ChatGLM-6B and from 0.3438 to 0.4688 for Qwen-72B, with a reduction in MAE of up to 6.7%. For CharacterEval, Acc(Full) enhances from 0.0323 to 0.0728, and for Character-LLM, it enhances from 0.1111 to 0.3111. Novelty: The enhancement is more significant for full personality consistency than for personal traits and the use of Mood-Dependent Memory theory RAG-based role-playing system. Keywords: Emotional RAG, Role-playing agent, Large language models, Mood Dependent Theory
Agarwal et al. (Tue,) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: