Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2025 Oct 1;15(1):34192.
doi: 10.1038/s41598-025-15501-y.

Intelligent emotion sensing using BERT BiLSTM and generative AI for proactive customer care

Affiliations

Intelligent emotion sensing using BERT BiLSTM and generative AI for proactive customer care

Sandra Karunya G et al. Sci Rep. .

Abstract

Contact centers now rely on intelligent chatbots and virtual assistants that detect and respond to customer emotions in real time. The paper presents a novel method for detecting emotions in customer care chat by utilizing a hybrid model that combines the BERT (Bidirectional Encoder Representations from Transformers) and Bi-LSTM (Bidirectional Long Short-Term Memory) networks. This combination of features enhanced AI capabilities. This method overcomes the limitations of current emotion recognition techniques by integrating BERTs contextual understanding with Bi-LSTMs sequential modeling power. It allows for more accurate and nuanced understanding of customer emotions. We process incoming customer messages in real time-our hybrid BERT + Bi-LSTM classifier detects emotions and a generative AI module drafts agent responses with end-to-end latency below 200 ms. Analyzing customer-agent interactions to classify emotions such as frustration, anger, sadness, and satisfaction. By incorporating Generative AI, the model not only detects emotions but also generates context-aware responses to de-escalate tense situations, providing agents with actionable insights and support. The proposed solution is validated using real-world contact center data, demonstrating superior performance in emotion recognition and aggression detection compared to existing methods. This advancement paves the way for improved customer experiences, reduced agent burnout, and enhanced operational efficiency in high-stress contact center environments. The integration of BERT-Bi-LSTM with Generative AI represents a significant step forward in creating empathetic, intelligent, and proactive customer care systems.

Keywords: BERT-Bi-LSTM; Customer care; Emotion detection; Generative AI; Real-Time emotion recognition.

PubMed Disclaimer

Conflict of interest statement

Declarations. Competing interests: The authors declare no competing interests.

Figures

Fig. 1
Fig. 1
Framework of emotion analysis model.
Fig. 2
Fig. 2
The LSTM neural network model.
Fig. 3
Fig. 3
Distribution of training (a), test (b), and validation (c) samples across the six emotion classes in the tweet corpus. (a) Train data. (b) Test data. (c) Validation data.
Fig. 4
Fig. 4
Class-wise sample-count distributions in the training (a), test (b), and validation (c) sets, before and after applying imbalance-handling methods. (a)Train data. (b) Test data. (c) Validation data.
Fig. 5
Fig. 5
Duplicated in the text but with different emotions.
Fig. 6
Fig. 6
Method to visualize the model architecture.
Fig. 7
Fig. 7
Training vs. validation accuracy curves over 30 epochs for the proposed BERT–BiLSTM model.
Fig. 8
Fig. 8
Training vs. validation loss curves over 30 epochs for the proposed BERT–BiLSTM model.
Fig. 9
Fig. 9
Accurately captured emotions based on BERT_BiLSTM_Emotion_GenAI model.
Fig. 10
Fig. 10
The BERT_BiLSTM_Emotion_GenAI model then predicts the emotion. (a) Provided code. (b) Predicted emotional content.
Fig. 11
Fig. 11
. Confusion matrix for test-set predictions.
Fig. 12
Fig. 12
Comparison of different accuracy parameter for different algorithms for emotion classes.
Fig. 13
Fig. 13
Results of verification of emotion detection process using different algorithm.
Fig. 14
Fig. 14
User study ratings for generative responses.

References

    1. Singh, R. et al. Introduction To Generative Artificial Intelligence. Contextualizing the Future. Arch. Pathol. Lab. Med.149 2, 112–122 (2025). - PubMed
    1. Yehia, E. Developments on generative AI. In Pokhariyal, P., Patel, A., & Pandey, S. (Eds.), AI and Emerging Technologies: Automated Decision-Making, Digital Forensics, and Ethical Considerations (pp. 139–160). CRC Press (2025).
    1. Hadi, M. U. et al. Large Language Models: a Comprehensive Survey of its Applications, Challenges, Limitations, and Future Prospects1pp.1–26 (Authorea Preprints, 2023).
    1. Naveed, H. et al. A comprehensive overview of large Language models. arXiv:1308.5499 (2023).
    1. Chaudhary, P. S., Khurana, M. R. & Ayalasomayajula, M. Real-world applications of data analytics, big data, and machine learning. In Singh, P., Mishra, A. R., & Garg, P. (Eds.), Data Analytics and Machine Learning: Navigating the Big Data Landscape (pp. 237–263). Springer Nature Singapore (2024).

LinkOut - more resources