Improving multi-factor river water quality prediction using deep learning and large language models with retrieval-augmented generation
Water quality prediction is critical to protect river ecosystems and sustain effective water management under increasing urbanization pressures. Current methods rely on a limited number of influencing factors and lack interpretability, which presents challenges in practical applications. Emerging large language models (LLMs) have strong capabilities for understanding domain knowledge, but require most relevant information for reliability. This study proposed an automated multi-factor river water quality prediction framework by coupling deep learning with LLMs enhanced by retrieval-augmented generation (RAG). A multi-dimensional dataset was constructed by integrating water quality with meteorological, socio-economic and hydro-topographic features to fully characterize river dynamics. Then, LLM-guided hybrid deep learning model, combining convolutional neural network (CNN), long short-term memory (LSTM) and attention mechanisms, namely LCLA model, was developed to predict six water quality indicators. Hyperparameters covering model structure and training strategy were efficiently configured through a literature-based knowledge retrieval, achieving optimal MAE, MSE, RMSE, and MAPE of 0.42, 0.96, 0.54, and 0.11, respectively, with improved optimization efficiency. Model interpretability was enhanced using Shapley analysis, revealing main contributions of turbidity, domestic water use, and river discharge. Finally, a RAG-enhanced multi-agent system was established to perform water quality grade classification and improvement recommendation generation by integrating domain knowledge and expert experience with LLM reasoning. The case study of Xinwu District demonstrated actionable management guidance consistent with on-site conditions. This study offered a reliable and efficient framework, with advantages in prediction performance and knowledge decision support, for advancing intelligent river water quality prediction and management in complex environments.
Authors
- Zuxiang Situ (ORCID: https://orcid.org/0000-0003-0503-0594)
- 冉启华
- Qiyang Ling (ORCID: https://orcid.org/0009-0009-7710-8339)
- Shengqi LYU
- Xiangju Cheng (ORCID: https://orcid.org/0000-0003-4276-5856)
- Hongwu Tang
- Hong Chen
- Huiming Zhang
Institutions
- Hohai University (CN)
- State Key Laboratory of Hydrology-Water Resources and Hydraulic Engineering (CN)
- Ministry of Water Resources of the People's Republic of China (CN)
- South China University of Technology (CN)
Publication Details
- Journal
- Ecological Indicators
- Published
- 2026-09-25
- DOI
- https://doi.org/10.1016/j.ecolind.2026.115572
- Primary Topic
- Hydrological Forecasting Using AI
- Type
- article
- Field-Weighted Citation Impact
- 0.00