← All work

LLM GIS agent + benchmark

KeralaFloodBench

An AI agent that answers questions about the 2018 Kerala floods by writing and running real GIS code on satellite radar, elevation and map data.

When a small model fails at GIS, you can’t tell why. I built a frozen benchmark that separates “chose a different expert setting” from “couldn’t run the analysis”.

  • RoleSolo project · built on the open-source GISclaw agent
  • Year2026
  • StackPython · GeoPandas · Rasterio · Shapely · Ollama · Sentinel-1 · Copernicus DEM · OpenStreetMap
Map of Ernakulam and Alappuzha districts from Sentinel-1 radar, 21 August 2018: detected flood in blue, permanent water in navy.
Flood extent on 21 Aug 2018 from Sentinel-1 radar (threshold −14 dB). Contains modified Copernicus Sentinel-1 data (2018).

Questions like “how many hospitals in Alappuzha were flood-affected?” need a GIS analyst’s expert choices: the radar water threshold, the buffer distance, a point versus a polygon. When an LLM agent gets them wrong, is it missing the expertise — or failing to run the analysis?

  1. An agent layer on top of GISclaw: a ReAct loop with a Python sandbox and geoprocessing tools, plus an AnswerChecker that rejects implausible answers (wrong unit, an area computed in degrees) and lets the agent retry.
  2. A domain pack serves each expert parameter with its value, unit and provenance through a domain_param tool.
  3. A frozen, hash-locked benchmark: 23 questions, gold answers from an independent script that never imports the agent, and three arms — the model picks the settings, gets them inline, or fetches them from the pack.
  4. Sandbox isolation: the agent only ever sees the data layers, never the gold answers, rubric or pack files.
domain_paramQuestionplain EnglishAgentReAct loop on GISclawToolsgeoprocess · executeSandbox dataSentinel-1 · DEM · OSMgpt-oss:20blocal, via OllamaDomain packvalues + provenanceanswer.jsonvalue · unit · paramsAnswerCheckerunits · plausibility · retryScorerfrozen rubricGold answersindependent scriptSHA-256 freezequestions · gold · layersFailure taxonomywhat went wrong, per run
A plain-English question goes to the agent, which calls GIS tools in a sandbox holding radar, elevation and map layers, and can fetch expert settings from a domain pack. Its answer file passes an AnswerChecker, then a scorer compares it with gold answers computed by an independent script. Every benchmark file is frozen by SHA-256 hashes. Failures are classified into a taxonomy.
  • Python
  • GeoPandas
  • Rasterio
  • Shapely
  • Ollama
  • Sentinel-1
  • Copernicus DEM
  • OpenStreetMap
  • The benchmark design: questions, the three arms, the floor check, the pre-committed re-run rule.
  • Validation of the gold answers and the radar threshold, including the sensitivity analysis.
  • Diagnosis of the failures and the upstream fixes.

AI assistance: Implemented with AI coding agents (Codex, Claude Code) under my direction; decisions, validation and fixes are logged in PROGRESS.md (stated in the repo’s README).

What these numbers don’t show

  • A single complete run, small n, one model. A second run stopped at 35 of 52 when GPU access was lost and is not used anywhere.
  • The radar water threshold (−14 dB) was chosen after looking at the histogram; ±1 dB sensitivity is reported.
  • The elevation model is a DSM, not a DTM.
  • Built on GISclaw (open source, AGPL-3.0) — github.com/geumjin99/GISclaw.
  • Contains modified Copernicus Sentinel-1 data (2018), via Microsoft Planetary Computer; JRC Global Surface Water (Pekel et al. 2016); Copernicus DEM GLO-30; © OpenStreetMap contributors (ODbL).