作者
Assel Ospan,Мадина Мансурова,Timur Ishmurzin,Amir Hosein Mosavi
摘要
Hydrological analysis in large river basins requires the integration of heterogeneous monitoring observations, environmental indicators, spatial coordinates, and temporally distributed records across multiple data sources. Although large language models (LLMs) provide strong natural-language and codegeneration capabilities, their direct application to hydrological GIS tasks remains limited by weak domain grounding, unreliable spatial evidence, unstable executable outputs, and insufficient control over out-of-domain requests. This paper proposes HydroGraphRAG, an executable ontology-grounded graph retrieval-augmented generation framework for explainable hydrological analysis in the Ile–Balkhash Basin. The framework integrates Cognitive Demand Analysis (CDA), ontology-guided graph retrieval, WKT spatial evidence extraction, structured ANSWER/ABSTAIN decision handling, template-constrained Python GIS generation, and execution validation within a controlled temporary execution workspace. Retrieved RDF relations, literals, and spatial evidence are used to produce analytical explanations, executable GIS code, and materialized HTML geospatial maps. HydroGraphRAG was evaluated on a frozen benchmark of 285 queries spanning Explicit, Semi-explicit, Implicit, and Anomalous/OOD regimes across seven open-weight LLMs. On valid in-domain queries, HydroGraphRAGachieved the highest pooled decision accuracy (0.470), Execution Success Rate (0.388), and map-materialization rate (0.352), compared with 0.367, 0.288, and 0.239 for VectorRAG and 0.268, 0.215, and 0.195 for the Baseline, respectively. It also achieved the highest pooledOODF1-score of 0.565 and the highest architecture-level mean Semantic, Structural, and Faithfulness scores in the evidence-aware LLM-as-a-Judge evaluation. The results show that ontology-guided evidence organization and constrained executable synthesis improve average operational and evidence-aware performance, while also revealing remaining trade-offs in latency, OOD precision, implicit-query retrieval, and generator dependence.