Validation of a large language models-based socio-political sentiment analysis system with a retrieval-augmented generation approach

(1) * Sidharta Sidharta Mail (Bina Nusantara University, Indonesia)
(2) Hady Pranoto Mail (Bina Nusantara University, Indonesia)
(3) Frederik Gasa Mail (Bina Nusantara University, Indonesia)
(4) Nur Kholis Mail (Bina Nusantara University, Indonesia)
(5) Ardvin Kester S Ong Mail (School of Industrial Engineering and Engineering Management, Mapua University, Philippines)
*corresponding author

Abstract


Socio-political discourse on digital platforms generates large volumes of unstructured textual data, posing challenges for reliable sentiment analysis and contextual interpretation. Conventional sentiment analysis approaches often lack contextual grounding, while direct use of Large Language Models (LLMs) may introduce hallucinations, bias, and excessive generalization. To address these issues, this study proposes an LLM-based sentiment analysis system that integrates multi-source data acquisition, zero-shot sentiment classification, Retrieval-Augmented Generation (RAG), and generative reasoning for contextual interpretation. Unlike prior studies that mainly focus on improving model accuracy, this research emphasizes system-level validation of the entire analytical pipeline. The evaluation includes sentiment calibration using a Golden Dataset, data ingestion performance analysis, retrieval quality assessment based on semantic distance, and generative evaluation using an LLM-as-a-Judge framework. Experimental results indicate that the system provides stable data acquisition and produces coherent analytical reports. However, retrieval noise and neutrality bias introduced by LLM alignment mechanisms still affect the groundedness of generated outputs. These findings highlight the importance of retrieval quality and demonstrate the potential of LLMs as reasoning and evaluation components for analyzing complex socio-political discourse.

Keywords


LLM; Sentiment Analysis, RAG, Socio-Political Discourse; System-Level Validation

   

DOI

https://doi.org/10.26555/ijain.v12i3.2389
      

Article metrics

Abstract views : 163 | PDF views : 4

   

Cite

   

Full Text

Download

References


[1] J. Shen, “Sentiment Analysis of Social Media Texts for Aquatic Product Listed Companies Based on the BERT-CNN-BiLSTM-Att Hybrid Model,” Adv. Educ. Humanit. Soc. Sci. Res., vol. 13, no. 1, p. 182, Mar. 2025, doi: 10.56028/aehssr.13.1.182.2025.

[2] D. Guna Mandhasiya, H. Murfi, and A. Bustamam, “The hybrid of BERT and deep learning models for Indonesian sentiment analysis,” Indones. J. Electr. Eng. Comput. Sci., vol. 33, no. 1, p. 591, Jan. 2024, doi: 10.11591/ijeecs.v33.i1.pp591-602.

[3] K. Ahmed, M. I. Nadeem, G. Wang, F. Zuo, and Z. Han, “LLM-infused multi-module transformer for emotion-aware sentiment analysis in few-shot scenarios,” Inf. Fusion, vol. 126, p. 103668, Feb. 2026, doi: 10.1016/j.inffus.2025.103668.

[4] C. Liu, A. Arulappan, R. Naha, A. Mahanti, J. Kamruzzaman, and I.-H. Ra, “Large Language Models and Sentiment Analysis in Financial Markets: A Review, Datasets, and Case Study,” IEEE Access, vol. 12, pp. 134041–134061, 2024, doi: 10.1109/ACCESS.2024.3445413.

[5] M. Khasanova Zafar kizi and Y. Suh, “Design and Performance Evaluation of LLM-Based RAG Pipelines for Chatbot Services in International Student Admissions,” Electronics, vol. 14, no. 15, p. 3095, Aug. 2025, doi: 10.3390/electronics14153095.

[6] J. P. Nayinzira and M. Adda, “SentimentCareBot: Retrieval-Augmented Generation Chatbot for Mental Health Support with Sentiment Analysis,” Procedia Comput. Sci., vol. 251, pp. 334–341, 2024, doi: 10.1016/j.procs.2024.11.118.

[7] J. Zhou, J. Ji, J. Dai, and Y. Yang, “Sequence to Sequence Reward Modeling: Improving RLHF by Language Feedback,” Proc. AAAI Conf. Artif. Intell., vol. 39, no. 26, pp. 27765–27773, Apr. 2025, doi: 10.1609/aaai.v39i26.34992.

[8] S. B. Shah et al., “Navigating the Web of Disinformation and Misinformation: Large Language Models as Double-Edged Swords,” IEEE Access, vol. 13, pp. 169262–169282, 2025, doi: 10.1109/ACCESS.2024.3406644.

[9] A. Britzolakis, H. Kondylakis, and N. Papadakis, “AthPPA: A Data Visualization Tool for Identifying Political Popularity over Twitter,” Information, vol. 12, no. 8, p. 312, Jul. 2021, doi: 10.3390/info12080312.

[10] Y. M. Tun and M. Khaing, “A large-scale sentiment analysis using political tweets,” Int. J. Electr. Comput. Eng., vol. 13, no. 6, p. 6913, Dec. 2023, doi: 10.11591/ijece.v13i6.pp6913-6925.

[11] D. Valle-Cruz, R. Sandoval-Almazán, A. López-Chau, and J. I. Criado, “Unveiling political polarization on Twitter: Machine learning and sentiment analysis in presidential elections,” JeDEM - eJournal eDemocracy Open Gov., vol. 16, no. 1, pp. 186–212, Sep. 2024, doi: 10.29379/jedem.v16i1.846.

[12] D. Tiwari, B. S. Bhati, B. Nagpal, N. Alturki, and L. Bayisenge, “Attention-augmented hybrid CNN-LSTM model for social media sentiment analysis in cryptocurrency investment decision-making,” Sci. Rep., vol. 15, no. 1, p. 33201, Sep. 2025, doi: 10.1038/s41598-025-18245-x.

[13] Jinjing Zeng, Kailing Luo, Yu Lu, and Mingfen Wang, “An Evaluation Framework for Online Courses Based on Sentiment Analysis Using Machine Learning,” Int. J. Emerg. Technol. Learn., vol. 18, no. 18, pp. 4–22, Sep. 2023, doi: 10.3991/ijet.v18i18.42521.

[14] Y. Zhang, H. Xu, D. Zhang, and R. Xu, “A Hybrid Approach to Dimensional Aspect-Based Sentiment Analysis Using BERT and Large Language Models,” Electronics, vol. 13, no. 18, p. 3724, Sep. 2024, doi: 10.3390/electronics13183724.

[15] A. Assiri, A. Gumaei, F. Mehmood, T. Abbas, and S. Ullah, “DeBERTa-GRU: Sentiment Analysis for Large Language Model,” Comput. Mater. Contin., vol. 79, no. 3, pp. 4219–4236, 2024, doi: 10.32604/cmc.2024.050781.

[16] R. Cantini, A. Orsino, M. Ruggiero, and D. Talia, “Benchmarking adversarial robustness to bias elicitation in large language models: scalable automated assessment with LLM-as-a-judge,” Mach. Learn., vol. 114, no. 11, p. 249, Nov. 2025, doi: 10.1007/s10994-025-06862-6.

[17] N. Christakis and D. Drikakis, “Evaluating Large Language Models in Code Generation: INFINITE Methodology for Defining the Inference Index,” Appl. Sci., vol. 15, no. 7, p. 3784, Mar. 2025, doi: 10.3390/app15073784.

[18] K. Combs, T. Bihl, S. Howlett, and Y. Adams, “Zero-shot Comparison of Large Language Models (LLMs) Reasoning Abilities on Long-text Analogies,” in Hawai International Conference, 2025, p. 1610, doi: 10.24251/HICSS.2025.194.

[19] R. Chandra, A. Tiwari, N. Jain, and S. Badhe, “Large Language Models for Metaphor Detection: Bhagavad Gita and Sermon on the Mount,” IEEE Access, vol. 12, pp. 84452–84469, 2024, doi: 10.1109/ACCESS.2024.3411060.

[20] F. Geissler, K. Roscher, and M. Trapp, “Concept-Guided LLM Agents for Human-AI Safety Codesign,” Proc. AAAI Symp. Ser., vol. 3, no. 1, pp. 100–104, May 2024, doi: 10.1609/aaaiss.v3i1.31188.

[21] J. Ren et al., “PHM–GPT: A Large Language Model for Prognostics and Health Management,” Engineering, vol. 63, pp. 156–172, Aug. 2026, doi: 10.1016/j.eng.2025.11.001.

[22] J. Prakash, R. Swathiramya, G. Balambigai, R. Menaha, and J.S. Abhirami, “AI-Driven Real-Time Feedback System for Enhanced Student Support: Leveraging Sentiment Analysis and Machine Learning Algorithms,” Int. J. Comput. Exp. Sci. Eng., vol. 10, no. 4, Dec. 2024, doi: 10.22399/ijcesen.780.

[23] M. Giuffrè et al., “Expert of Experts Verification and Alignment (EVAL) Framework for Large Language Models Safety in Gastroenterology,” npj Digit. Med., vol. 8, no. 1, p. 242, May 2025, doi: 10.1038/s41746-025-01589-z.

[24] R. Massenon, I. Gambo, J. A. Khan, C. Agbonkhese, and A. Alwadain, “”My AI is Lying to Me”: User-reported LLM hallucinations in AI mobile apps reviews,” Sci. Rep., vol. 15, no. 1, p. 30397, Aug. 2025, doi: 10.1038/s41598-025-15416-8.

[25] I. C. Rafidhul Haque, “Implementation of Retrieval-Augmented Generation (RAG) and Large Language Models (LLM) for a Document and Tabular-Based Chatbot System,” J. Electron. Technol. Explor., vol. 3, no. 1, pp. 19–23, Jul. 2025, doi: 10.52465/joetex.v3i1.588.

[26] B. Han, T. Susnjak, and A. Mathrani, “Automating Systematic Literature Reviews with Retrieval-Augmented Generation: A Comprehensive Overview,” Appl. Sci., vol. 14, no. 19, p. 9103, Oct. 2024, doi: 10.3390/app14199103.

[27] S.-M. Kuo, S.-K. Tai, H.-Y. Lin, and R.-C. Chen, “Automated Clinical Trial Data Analysis and Report Generation by Integrating Retrieval-Augmented Generation (RAG) and Large Language Model (LLM) Technologies,” AI, vol. 6, no. 8, p. 188, Aug. 2025, doi: 10.3390/ai6080188.

[28] H. Lijaya, P. Ho, and H. Santoso, “Comparative Analysis of RAG-Based Open-Source LLMs for Indonesian Banking Customer Service Optimization Using Simulated Data,” J. Sisfokom (Sistem Inf. dan Komputer), vol. 14, no. 3, pp. 330–341, Jul. 2025, doi: 10.32736/sisfokom.v14i3.2383.

[29] A. Dubey, A. Ambasta, J. Soni, P. Doshi, M. R. Rane, and P. Kanani, “A Hybrid Semantic–Rule-Based NLP Framework Integrating DFCI and MSKCC Approaches for Clinical Trial Matching Using UMLS and FAISS,” Ingénierie des systèmes d Inf., vol. 30, no. 9, pp. 2285–2295, Sep. 2025, doi: 10.18280/isi.300906.

[30] S. A. Haider et al., “The Development and Evaluation of a Retrieval-Augmented Generation Large Language Model Virtual Assistant for Postoperative Instructions,” Bioengineering, vol. 12, no. 11, p. 1219, Nov. 2025, doi: 10.3390/bioengineering12111219.

[31] L. Magee, V. Arora, and L. Munn, “Structured like a language model: Analysing AI as an automated subject,” Big Data Soc., vol. 10, no. 2, pp. 1–15, Jul. 2023, doi: 10.1177/20539517231210273.

[32] S. Sagi, “Optimizing LLM Inference: Metrics that Matter for Real Time Applications,” J. Artif. Intell. Cloud Comput., vol. 4, no. 1, p. 1, Jan. 2025, doi: 10.47363/JAICC/2025(4)446.

[33] Y. Guan et al., “Intelligent Agents with LLM-based Process Automation,” in Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Aug. 2024, pp. 5018–5027, doi: 10.1145/3637528.3671646.

[34] M. Azhari and P. Parjito, “Sentiment Analysis of Public Opinion on the Free Lunch Program Using Random Forest in Media,” Build. Informatics, Technol. Sci., vol. 6, no. 3, pp. 1932–1942, Dec. 2024, doi: 10.47065/bits.v6i3.6423.

[35] E. Wallace, M. Gardner, and S. Singh, “Interpreting Predictions of NLP Models,” in Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: Tutorial Abstracts, 2020, pp. 20–23, doi: 10.18653/v1/2020.emnlp-tutorials.3.

[36] A. Timashov, “Evaluating Large Language Models: A Comprehensive Guide,” Int. J. Latest Eng. Manag. Res., vol. 9, no. 10, pp. 5–16, Nov. 2024, doi: 10.56581/IJLEMR.9.10.05-16.

[37] X. Feng, N. Angkawisittpan, and J. Li, “Design and Performance Analysis of a Web Crawler-Based System for Emotional Feature Extraction from Social Media Data,” Teh. Vjesn. - Tech. Gaz., vol. 32, no. 5, p. 397, Oct. 2025, doi: 10.17559/TV-20240829001951.

[38] R. Tekumalla and J. M. Banda, “Towards automated phenotype definition extraction using large language models,” Genomics Inform., vol. 22, no. 1, p. 21, Oct. 2024, doi: 10.1186/s44342-024-00023-2.

[39] Y. Guo, G. Shang, and C. Clavel, “Benchmarking Linguistic Diversity of Large Language Models,” Trans. Assoc. Comput. Linguist., vol. 13, pp. 1507–1526, Nov. 2025, doi: 10.1162/TACL.a.47.

[40] G. Ma, Y. Ma, X. Wu, Z. Su, M. Zhou, and S. Hu, “Task-level Distributionally Robust Optimization for Large Language Model-based Dense Retrieval,” Proc. AAAI Conf. Artif. Intell., vol. 39, no. 23, pp. 24759–24767, Apr. 2025, doi: 10.1609/aaai.v39i23.34657.

[41] A. Narasimhan Sampath, A. Thakur, and S. Krishnan, “Agentic Reasoning for Social Event Extrapolation: Integrating Knowledge Graphs and Language Models,” IEEE Access, vol. 13, pp. 172096–172110, 2025, doi: 10.1109/ACCESS.2025.3612015.




Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

___________________________________________________________
International Journal of Advances in Intelligent Informatics
ISSN 2442-6571  (print) | 2548-3161 (online)
Organized by UAD and ASCEE Computer Society
Published by Universitas Ahmad Dahlan
W: http://ijain.org
E: info@ijain.org (paper handling issues)
 andri.pranolo.id@ieee.org (publication issues)

View IJAIN Stats

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0