A Hybrid Framework for Real-Time Sentiment Analysis and Adaptive Conversational Outcome Prediction in Domain-Specific Dialogue Systems

Authors

DOI:

https://doi.org/10.31436/iiumej.v27i3.4191

Keywords:

Sentiment Analysis, Adaptive Conversational Outcome Prediction, Dialogue Systems, RoBERTa, Bi-LSTM

Abstract

The lack of non-verbal signals in text-based communication forces dialogue systems to rely entirely on dynamic textual sentiment changes to infer user intent and emotional shifts. However, substantial class imbalance and the static, post-hoc nature of existing text analysis models prevent dialogue systems from recognizing these emotional dynamics and predicting conversational outcomes in real time. This research presents a hybrid machine learning framework to address these challenges through integrated sentiment-aware analysis and real-time conversation outcome prediction. We first utilize a pre-trained RoBERTa model to assign sentiment scores to individual messages, which is required for two subsequent tasks: (i) conversational outcome classification to classify conversations into Interested in Islam, Wants to Convert, and Accepted Islam, and (ii) message impact prediction to assess the emotional influence of agents’ responses before deployment. In the initial task, our Enhanced Bi-LSTM model (enhanced with multi-head attention mechanisms and a boosted input capacity of 2500 tokens) achieves a macro-F1 score of 0.76, a balanced accuracy of 74.3%, and an overall accuracy of 90.0% on the full, unbalanced dataset when addressing the 3-class outcome classification task. By conducting an ablation study, we investigate the main source of error, the extremely ambiguous “Wants to Convert” class, and show the resilience of the model on well-defined classes, revealing that accuracy may exceed 99% by simplifying the task to a binary classification. In the second task, a fine-tuned BERT model achieves 80% accuracy in message-level sentiment prediction. The framework enables real-time feedback to refine adaptive responses and guide conversations toward desired outcomes. We assess our proposed framework using a case study of domain-specific conversations (such as religious outreach), supported by a dataset from a partner organization, to demonstrate applicability. The framework's flexibility makes it applicable to customer service, education, and healthcare, where effective communication depends on real-time sentiment analysis and outcome prediction.

ABSTRAK: Kekurangan isyarat bukan lisan dalam komunikasi berasaskan teks memaksa sistem dialog bergantung sepenuhnya pada perubahan sentimen tekstual dinamik membuat kesimpulan tentang niat pengguna dan perubahan emosi. Walau bagaimanapun, ketidakseimbangan kelas yang ketara dan sifat statik dan pasca-hoc model analisis teks sedia ada menghalang sistem dialog daripada mengenali dinamik emosi ini dan meramalkan hasil perbualan pada masa nyata. Kajian ini membentang rangka kerja pembelajaran mesin hibrid bagi menangani cabaran melalui analisis kesedaran sentimen bersepadu dan ramalan hasil perbualan masa nyata. Pada permulaan, model RoBERTa dilatih terlebih dahulu bagi memberi skor sentimen kepada mesej individu. Ini diperlukan untuk dua tugasan seterusnya: (i) klasifikasi hasil perbualan kepada Berminat tentang Islam, Ingin Beranut Islam dan Menerima Islam, dan (ii) ramalan impak mesej bagi menilai pengaruh emosi respons ejen sebelum penggunaan. Melalui tugasan awal, dapatan model Peningkatan Bi-LSTM (dipertingkatkan dengan mekanisme perhatian berbilang kepala dan peningkatan kapasiti input sebanyak 2500 token) mencapai skor makro-F1 sebanyak 0.76, ketepatan seimbang sebanyak 74.3%, dan ketepatan keseluruhan sebanyak 90.0% pada set data penuh tidak seimbang apabila menangani tugasan pengelasan hasil 3 kelas. Dengan menjalankan kajian ablasi, kami menyiasat punca ralat utama, kelas "Ingin Menukar" yang sangat samar-samar, dan menunjukkan daya tahan model pada kelas yang ditakrif baik, mendedahkan bahawa ketepatan mungkin melebihi 99% dengan memudahkan tugasan kepada pengelasan binari. Menerusi tugasan kedua, model BERT yang ditala halus mencapai ketepatan 80% dalam ramalan sentimen peringkat mesej. Rangka kerja ini memudahkan maklum balas masa nyata bagi memperhalusi respons adaptif dan membimbing perbualan ke arah hasil yang diingini. Kami menilai rangka kerja yang dicadangkan menggunakan kajian kes yang mengandungi perbualan khusus domain (seperti jangkauan keagamaan). Ini disokong oleh set data daripada organisasi rakan kongsi, bagi menunjukkan kebolehgunaan. Fleksibiliti rangka kerja ini boleh digunakan untuk khidmat pelanggan, pendidikan dan penjagaan kesihatan, yang mana komunikasi berkesan bergantung pada analisis sentimen masa nyata dan ramalan hasil.

Downloads

Download data is not yet available.

Metrics

Metrics Loading ...

References

Waheeb SA, Khan NA, Shang X. (2022) An Efficient Sentiment Analysis Based Deep Learning Classification Model to Evaluate Treatment Quality. Malaysian Journal of Computer Science, 35(1):1-20.

Al-Qablan TA, Mohd Noor MH, Al-Betar MA, Khader AT. (2023) A survey on sentiment analysis and its applications. Neural Comput & Applic, 35:21567-21601.

Devlin J, Chang MW, Lee K, Toutanova K. (2019) BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers): 2019; Minneapolis, Minnesota. pp 4171-4186.

Liu Y, Ott M, Goyal N, Du J, Joshi M, Chen D, Levy O, Lewis M, Zettlemoyer L, Stoyanov V. (2019) RoBERTa: A Robustly Optimized BERT Pretraining Approach. arXiv preprint arXiv:1907.11692v1.

Siami-Namini S, Tavakoli N, Namin AS. (2019) The Performance of LSTM and Bi-LSTM in Forecasting Time Series Data. In 2019 IEEE International Conference on Big Data (Big Data), IEEE, pp. 3285–3292. doi: 10.1109/BigData47090.2019.9005997.

Naresh A, Krishna PV. (2021) An efficient approach for sentiment analysis using machine learning algorithm. Evol Intell, 14(2):725-731. doi: 10.1007/s12065-020-00429-1.

Basiri, M. E., Nemati, S., Abdar, M., Cambria, E., Acharya, U. R. (2021) ABCD: Attention-based bidirectional CNN-RNN-deep model for sentiment analysis. Future Generation Computer Systems, 115, 279-294, doi: 10.1016/j.future.2020.08.005.

Sharin, N. H., Kartiwi, M. (2025) Identifying Technical and Vocational Education and Training (TVET) Sentiment from Social Media Using a Machine Learning Approach. IIUM Engineering Journal, 26(3), 295-303. doi: 10.31436/iiumej.v26i3.3739

Buntoro, G., Arifin, R., Syaifuddiin, G., Selamat, A., Krejcar, O., Hamido, F. (2020) The Implementation of the Machine Learning Algorithm for the Sentiment Analysis of Indonesia’s 2019 Presidential Election. IIUM Engineering Journal, 22(1), 78-92. doi: 10.31436/iiumej.v22i1.1532

Poria, S., Majumder, N., Mihalcea, R., Hovy, E. (2019) Emotion recognition in conversation: Research challenges, datasets, and recent advances. IEEE Access, 7, 100943-100953, doi: 10.1109/ACCESS.2019.2929050

Bouktif S, Fiaz A, Awad M. (2019) Stock Market Movement Prediction using Disparate Text Features with Machine Learning. In 2019 Third International Conference on Intelligent Computing in Data Sciences (ICDS). IEEE; pp 1-6. doi: 10.1109/ICDS47004.2019.8942303.

Malhotra P, Patil M, Anchan T, Ganatra K, Gaglani J. (2021) Negotiation Closer Bot: Negotiation Outcome Predictor based on Sentiment Analysis. In 2021 5th International Conference on Information Systems and Computer Networks (ISCON). IEEE; pp 1-5. doi: 10.1109/ISCON52037.2021.9702347.

Li, W., Shao, W., Ji, S., Cambria, E. (2022) BiERU: Bidirectional emotional recurrent unit for conversational sentiment analysis. Neurocomputing, 467, 73-82, doi: 10.1016/j.neucom.2021.09.057.

Johnson, J. M., Khoshgoftaar, T. M. (2019) Survey on deep learning with class imbalance. Journal of Big Data, 6, 27, doi: 10.1186/s40537-019-0192-5

Rukn Al-hewar non-profit Organization. (2025). Home. [https://edialoguec.org.sa/]

Sokolova, M., & Lapalme, G. (2009). A systematic analysis of performance measures for classification tasks. Information Processing & Management, 45(4), 427-437.

Van Rijsbergen, C. J. (1979). Information Retrieval (2nd ed.). Butterworths.

Brodersen, K. H., Ong, C. S., Stephan, K. E., & Buhmann, J. M. (2010). The balanced accuracy and its posterior distribution. In the 2010 20th International Conference on Pattern Recognition (ICPR), IEEE, pp. 3121- 3124.

Downloads

Published

2026-09-11

How to Cite

Safran, M. (2026). A Hybrid Framework for Real-Time Sentiment Analysis and Adaptive Conversational Outcome Prediction in Domain-Specific Dialogue Systems. IIUM Engineering Journal, 27(3), 149–172. https://doi.org/10.31436/iiumej.v27i3.4191

Issue

Section

Electrical, Computer and Communications Engineering