Water Quality Assessment Using Transformer, Quantum Neural Network, XGBoost, and Random Forest Models in an Agentic n8n Workflow with Applications in Maritime Robotics, Education, and Training

Water quality monitoring is important for protecting aquatic life and supporting informed water quality assessment and environmental decision support. However, many existing systems mainly focus on data collection and threshold-based alerts, without connecting prediction, diagnosis, and intelligent assessment within a unified workflow. This paper proposes an integrated smart aquatic monitoring system using Southeast Texas (SETX) water quality data, advanced machine learning models, large language models (LLMs), and an agentic n8n workflow. Firstly, SETX water quality data are extracted, cleaned, and converted into a structured CSV format. Important water features such as pH, dissolved oxygen, temperature, conductivity, and total dissolved solids are used to train and evaluate four different machine learning models, including Transformer, Quantum Neural Network (QNN), XGBoost, and Random Forest. The ML model is then deployed to a backend system for use inside the n8n automation workflow. For simulation, a Python script is designed to emulate an IoT water quality sensor by reading dataset records, converting valid records into JSON objects, and sending them to an agentic n8n webhook. The n8n workflow receives the sensor data and forwards it to the deployed model to predict surface water quality status. Across three simulations with three different datasets, the ML models demonstrate strong performance in classifying safe and unsafe water conditions. On the SETX dataset, Random Forest achieved the best performance, with 99.97% accuracy and a 99.95% macro F1-score. XGBoost also performed strongly, achieving 99.91% accuracy and a 99.86% macro F1-score. The Transformer model achieved 95.98% accuracy and a 94.00% macro F1-score, while the QNN model achieved 94.78% accuracy and a 92.24% macro F1-score. These results demonstrate that the processed SETX dataset supports reliable water quality prediction and can be integrated into the proposed n8n-based intelligent monitoring workflow. The prediction results are subsequently analyzed by an LLM-based diagnosis agent to generate an LLM-based water quality assessment, risk classification, and assessment summary that explain the prediction and highlight the most influential water quality parameters. The proposed system demonstrates a practical framework for combining sensor simulation, predictive modeling, LLM-based decision support, and agentic workflow automation for intelligent water quality assessment and smart environmental monitoring.

Authors

Institutions

Publication Details

Journal
Water
Published
2026-09-09
DOI
https://doi.org/10.3390/w18182240
Primary Topic
Water Quality Monitoring Technologies
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
article

Water Quality Assessment Using Transformer, Quantum Neural Network, XGBoost, and Random Forest Models in an Agentic n8n Workflow with Applications in Maritime Robotics, Education, and Training

Clayton Jeffryes, Wajiha Shireen, Md. Masud Rana, Nabin Bhandari et al.
Water
Water Quality Monitoring Technologies
article

Water Quality Assessment Using Transformer, Quantum Neural Network, XGBoost, and Random Forest Models in an Agentic n8n Workflow with Applications in Maritime Robotics, Education, and Training

Clayton Jeffryes, Wajiha Shireen, Md. Masud Rana, Nabin Bhandari, Mamta Singh
article en

Abstract

Water quality monitoring is important for protecting aquatic life and supporting informed water quality assessment and environmental decision support. However, many existing systems mainly focus on data collection and threshold-based alerts, without connecting prediction, diagnosis, and intelligent assessment within a unified workflow. This paper proposes an integrated smart aquatic monitoring system using Southeast Texas (SETX) water quality data, advanced machine learning models, large language models (LLMs), and an agentic n8n workflow. Firstly, SETX water quality data are extracted, cleaned, and converted into a structured CSV format. Important water features such as pH, dissolved oxygen, temperature, conductivity, and total dissolved solids are used to train and evaluate four different machine learning models, including Transformer, Quantum Neural Network (QNN), XGBoost, and Random Forest. The ML model is then deployed to a backend system for use inside the n8n automation workflow. For simulation, a Python script is designed to emulate an IoT water quality sensor by reading dataset records, converting valid records into JSON objects, and sending them to an agentic n8n webhook. The n8n workflow receives the sensor data and forwards it to the deployed model to predict surface water quality status. Across three simulations with three different datasets, the ML models demonstrate strong performance in classifying safe and unsafe water conditions. On the SETX dataset, Random Forest achieved the best performance, with 99.97% accuracy and a 99.95% macro F1-score. XGBoost also performed strongly, achieving 99.91% accuracy and a 99.86% macro F1-score. The Transformer model achieved 95.98% accuracy and a 94.00% macro F1-score, while the QNN model achieved 94.78% accuracy and a 92.24% macro F1-score. These results demonstrate that the processed SETX dataset supports reliable water quality prediction and can be integrated into the proposed n8n-based intelligent monitoring workflow. The prediction results are subsequently analyzed by an LLM-based diagnosis agent to generate an LLM-based water quality assessment, risk classification, and assessment summary that explain the prediction and highlight the most influential water quality parameters. The proposed system demonstrates a practical framework for combining sensor simulation, predictive modeling, LLM-based decision support, and agentic workflow automation for intelligent water quality assessment and smart environmental monitoring.

WaterVol. 18(18)
Lamar University (US), University of Houston (US)
Clean water and sanitation
Openalex Percentile: Top 20%
Water Quality Monitoring Technologies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.