Emotion-Aware Response Generation Using Affect-Enriched Embeddings with LLMs
<|reference_start|>Emotion-Aware Response Generation Using Affect-Enriched Embeddings with LLMs: There is a need for empathetic and coherent responses in automated chatbot-facilitated psychotherapy sessions. This study addresses the challenge of enhancing the emotional and contextual understanding of large language models (LLMs) in psychiatric applications. We introduce a novel framework that integrates multiple emotion lexicons, including NRC Emotion Lexicon, VADER, WordNet, and SentiWordNet, with state-of-the-art LLMs such as LLAMA 2, Flan-T5, ChatGPT 3.0, and ChatGPT 4.0. The primary dataset comprises over 2,000 therapy session transcripts from the Counseling and Psychotherapy database, covering discussions on anxiety, depression, trauma, and addiction. We segment the transcripts into smaller chunks, enhancing them with lexical features and computing embeddings using BERT, GPT-3, and RoBERTa to capture semantic and emotional nuances. These embeddings are stored in a FAISS vector database, enabling efficient similarity search and clustering based on cosine similarity. Upon user query, the most relevant segments are retrieved and provided as context to the LLMs, significantly improving the models' ability to generate empathetic and contextually appropriate responses. Experimental evaluations demonstrate that in-corporating emotion lexicons enhances empathy, coherence, informativeness, and fluency scores. Our findings highlight the critical role of emotional embeddings in improving LLM performance for psychotherapy.<|reference_end|>
@article{rasool2024emotion-aware,
    title={Emotion-Aware Response Generation Using Affect-Enriched Embeddings with
  LLMs},
    author={Abdur Rasool, Muhammad Irfan Shahzad, Hafsa Aslam, Vincent Chan},
    journal={arXiv preprint arXiv:2410.01306},
    year={2024},
    archivePrefix={arXiv},
    eprint={2410.01306},
    primaryClass={cs.CL cs.AI cs.CY}
}