A Hybrid Multilingual Sentiment Analysis Pipeline Using n8n Workflow Orchestration and LangChain Large Language Model Ensemble
DOI:
https://doi.org/10.70917/ijcisim-2026-5287Keywords:
Multilingual sentiment analysis, workflow automation, LangChain, large language models, ensemble learning, machine translation, n8nAbstract
Despite significant research into multilingual sentiment analysis, challenges persist since many of the best-performing sentiment classifiers are English-only, and non-English text poses difficulties due to errors in translation, cultural context, and a lack of training data. Current approaches involve either the use of pre-trained multilingual encoders (such as mBERT and XLM-R), which have problems with accuracy for informal or specialized text, or translating non-English text using online services and applying standard sentiment analysis models to the translated text. This paper proposes an approach that combines the n8n workflow automation service with LangChain large language model orchestration and uses a model ensemble of RoBERTa, BERTweet, and GPT-3 models for sentiment classification. Before performing sentiment classification, this pipeline involves dynamic text translation using Google Translate and LibreTranslate, depending on whether the text is formal or not. We conduct experiments with a pipeline involving five language datasets (Arabic, Chinese, French, Marathi, and Hindi) and compare the performance of our proposed approach with mBERT, XLM-R, RoBERTa, and GPT-3 models. Our model demonstrates the best performance in sentiment classification across all five languages (accuracy is from 85.5% to 87.6%) with an improvement in precision, recall, F1-score, and specificity metrics by 1.2–2.3 percentage points compared to the strongest baseline.