Skip to content
Conference

RAG-Based Emotion-Aware Conversational Agent with Multilevel Sentiment and Pragmatic Contextual Analysis

Aug 2026 · International Conference Computational Vision and Bio Inspired Computing · pp. 640-645 · 0 citations · 26 references

Abstract

Retrieval-Augmented Generation (RAG) has significantly reduced hallucination rates in Large Language (models, or LLMs). Standard RAG workflows (models, or LLMs) remain unfeeling to user affect, often giving responses which are true but emotionally inappropriate. This paper introduces an Emotion-Aware Conversational Agent that embeds Multilevel Sentiment and Pragmatic Contextual Analysis into the RAG orchestration layer. We design a highly modular pipeline built on a Multi-Task Learning (MTL) Transformer backbone that jointly classifies user emotion and pragmatic intent in real time. To reduce mode collapse arising from skewed emotional class distributions, we employ an inverse-frequency weighted Cross-Entropy loss when fine-tuning the classification head. The inferred psycholinguistic state is tracked through a temporal Dialogue State Tracker (DST) and combined with vector-based domain retrieval, enabling dynamic adjustment of the generative prompt. To curb run-on script hallucinations, the orchestration layer natively adopts ChatML templating. In local evaluation using the RAGAS framework with a 4-bit double-quantized Qwen2.5-1.5B generator, our architecture achieves a 0.84 Macro F1-Score on minority affect classes and preserves strong factual faithfulness (0.87) while markedly improving Answer Relevancy (0.91). These results demonstrate that deeply contextual, emotion-aware AI systems can be efficiently deployed on edge devices without depending on proprietary cloud APIs.

View source

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.