Abstract
HydroSentinel is a flood early-warning system for Philippine communities. It combines a modelled 30-day river discharge outlook for 17 Philippine basins, live disaster alerts, measured river stage used to validate a short-range forecasting engine, and a tool-using language-model agent whose numerical claims are verified against their sources before publication. This page documents the data, parameters, methods and live evaluation, all read from the running system.
1. Data
| Source | Variable | Resolution | Window | Use |
|---|---|---|---|---|
| GloFAS v4 via Open-Meteo Flood API | River discharge Q (m³/s), ensemble median, p25, p75 | Daily, 0.05° grid | 30 days back, 30 days ahead; 5-year climatology | Philippine outlook, alert levels |
| UK Environment Agency flood-monitoring API | River stage (m) | 15 minutes, resampled hourly | About 30 days rolling | Training and validating the forecasting engine |
| Open-Meteo forecast API | Precipitation (mm) | Hourly | Past 30 days, next 72 h | Model features (observed) and context (forecast) |
| GDACS | Tropical cyclones and floods: alert level, position, severity | Event | Current events | Hazard context for the agent and maps |
Grid cells for each basin were chosen on the main channel: the cell with the highest mean discharge within roughly 15 km of the named place, because a 0.05° grid can misplace small rivers. The Pasig–Marikina system is therefore represented at its Manila Bay outlet.
2. Basin alert levels and trend
For basin b, the watch, prepare and act levels are the 95th, 99thth percentiles of its daily discharge over the last 5 years, so they are exceeded on about 18, 3.7, 0.7 days a year respectively. The status of a basin is the highest level reached by today's value or by the forecast peak within 7 days. A basin is rising or falling when the relative change over 3 days exceeds ±15%. The visual layers above plot r = Q / Qwatch.
3. Gauge preprocessing
Readings outside [] m or [] mm/h, duplicates, and readings more than minutes in the future are rejected. Stage is averaged hourly and despiked with a Hampel filter (window h, threshold σ with σ = 1.4826 × MAD). Gaps of up to h are interpolated in time; longer gaps stay missing.
4. Forecasting models
For horizons h ∈ {} hours, three models compete: persistence (ŷ = yt), a damped trend over h with damping φ = , and histogram gradient boosting predicting the change in level from level differences at lags h and rainfall totals over h. Gradient boosting is enabled only with at least 21 days of data.
5. Evaluation design
Forecast origins are split chronologically 70 / 10 / 20 into training, calibration and test sets, purging any sample whose target time crosses a boundary. The model with the lowest calibration RMSE is selected per horizon. Skill is reported on the test set as S = 1 − RMSEmodel / RMSEpersistence, so S > 0 means the model beats “no change”. Prediction intervals are split-conformal residual quantiles, calibrated separately for two regimes (; at least samples per regime), and their empirical coverage is reported.
6. The verifiable agent
A Muse Spark agent runs up to 8 tool-calling steps over 6 tools (). Each tool result is stored as evidence Ei. A second, schema-constrained call writes the briefing, in which every claim must cite evidence ids, plus SMS text in . The server then extracts every number from each claim (ignoring dates and times) and accepts it only if it matches a number in the cited evidence within . The share of matched numbers is published with the briefing. Tool results are treated as untrusted data in the prompt.
7. Results (live, out of sample)
Loading the live evaluation…
Computed now from the measured gauges; values change as new data arrives.
8. Limitations and threats to validity
- GloFAS is a hydrological model, not a gauge. Its coarse grid can misrepresent small or urban rivers, and its forecasts inherit weather-forecast error.
- Percentile alert levels describe how unusual a flow is for that river; they are not official PAGASA thresholds and do not map directly to flood depth.
- The forecasting engine is validated on UK gauges because no open real-time Philippine gauge feed exists; skill there is evidence the method works, not a measure of Philippine accuracy.
- Training windows are short (about 30 days), so rare high-flow events are under-represented in the test set.
- Forecast rainfall is shown as context but is not a model input, which limits skill at longer horizons.
- Verification checks numbers against their sources, not the reasoning between them; a correctly cited claim can still be poorly framed.
9. Reproducibility
Everything here is served by the public API: /api/outlook (basins and series), /api/research (parameters and evaluation), /api/stations/{id} (per-gauge diagnostics and backtests) and /api/stations/{id}/export.csv. The source code is at github.com/Debb1ie/Meta-AI.
References
- Harrigan, S. et al. (2020). GloFAS-ERA5 operational global river discharge reanalysis 1979–present. Earth System Science Data, 12, 2043–2060.
- Gardner, E. S. & McKenzie, E. (1985). Forecasting trends in time series. Management Science, 31(10), 1237–1246.
- Hampel, F. R. (1974). The influence curve and its role in robust estimation. Journal of the American Statistical Association, 69(346), 383–393.
- Vovk, V., Gammerman, A. & Shafer, G. (2005). Algorithmic Learning in a Random World. Springer.
- Lei, J. et al. (2018). Distribution-free predictive inference for regression. Journal of the American Statistical Association, 113(523), 1094–1111.
- Ke, G. et al. (2017). LightGBM: A highly efficient gradient boosting decision tree. Advances in Neural Information Processing Systems 30.
- Pedregosa, F. et al. (2011). Scikit-learn: Machine learning in Python. Journal of Machine Learning Research, 12, 2825–2830.
- PAGASA. Tropical cyclone information. pagasa.dost.gov.ph. GDACS, Global Disaster Alert and Coordination System. gdacs.org.