GeoFaham: 40 disaster tasks, 0.940 vs 0.879, and 7.5x fewer tokens
GeoFaham wins not because it writes better code but because it splits domain roles, keeps gigabyte artifacts out of the context window, and validates each produced artifact; that advantage is scoped to multi-source, multi-step geospatial workflows.
On this page
A team holding 40 disaster-response questions must pick one stack to run them — but a demo that executes cleanly is not the same as an analysis that is right. You have a flood outline, a list of hospitals, and a briefing due in the morning: are those hospitals still reachable by road? Nobody on the team is a GIS analyst, so the obvious move is to hand the question to a general coding agent and let it look up data, compute distances, and draw the map. That works in a demo. It also fails quietly: the wrong footprint gets used, imagery is pulled from before the event rather than after, distances are measured on a projection that distorts them. GeoFaham, from Microsoft AI for Good Lab and collaborators, targets exactly that quiet failure [1].
The Default Bet: Bolt GIS Tools Onto a Coding Agent
The paper states the default approach plainly: equip a general coding agent with geospatial libraries, a spatial database, map APIs and a satellite imagery catalog, then ask it to solve the workflow end to end [1]. That works in a demo because the code does execute. The problem is a class of failure that successful execution never catches — the answer reads well, the code returns no error, and the analysis underneath is wrong. The agent picked the wrong disaster footprint, used an inappropriate spatial boundary, searched imagery outside the event window, or leaned on an intermediate artifact that was planned but never produced.
The paper groups the difficulty into three parts. Domain complexity comes first: an agent must know how to query a spatial database, what satellite bands mean, and how map features and raster products should each be validated. Data heterogeneity comes second: one workflow mixes vector layers (features drawn as points, lines and polygons), multi-band rasters (values on a pixel grid), tabular summaries and temporal products, each with its own tools and checks. Scale and context come third: a GeoJSON layer can hold thousands of features and a raster can reach gigabytes, so routing complete intermediates through the context window is impractical — yet downstream correctness depends on metadata surviving, including coordinate reference systems, band names, acquisition timestamps and spatial bounds.
- Domain complexity: spatial databases, image spectra, map features and raster analysis each carry their own rules
- Data heterogeneity: vector, raster, tabular and temporal products share one workflow
- Scale and context: artifacts are too large for context, but losing their metadata breaks the result
Four Specialist Agents and an Orchestrator With Two Ledgers
GeoFaham does not ship one generalist with a wide toolbelt. It splits the workflow into four roles defined by data source and operation type, coordinated by a single Orchestrator [1]. The Vector Agent queries structured spatial data in PostGIS; the Maps Agent retrieves map features from OpenStreetMap; the STAC Agent discovers satellite imagery through a catalog following the STAC specification; the Raster Agent generates raster analysis code.
| Agent | Responsibility | Data source |
|---|---|---|
| Vector Agent | Structured spatial data querying | PostGIS database |
| Maps Agent | Map feature retrieval | OpenStreetMap |
| STAC Agent | Imagery discovery | STAC imagery catalog |
| Raster Agent | Raster analysis code generation | Raster products |
The Orchestrator runs two ledgers. The outer loop is a task ledger: it extracts structured task facts from the question and builds a dependency-aware plan. The inner loop is a progress ledger: it tracks where each step stands, checks that required artifacts were actually produced, and replans when execution stalls or a dependency cannot be satisfied. The paper places this design at the junction of three existing ideas — plan up front, dispatch in parallel, and replan when a stall counter trips [1]. In practice it does not ask the model to think harder; it inserts an explicit checkpoint that decides whether a step passed.
The Response Store Keeps Gigabyte Artifacts Out of Context
This is the most transferable piece of the design. Agents do not pass large coordinate arrays, raster data or complete imagery payloads to each other. Full outputs land in a working memory called the Response Store, and the Orchestrator exchanges only compact response identifiers and typed metadata. Agents reason over schemas, summaries, spatial bounds, temporal ranges and band metadata, while deterministic geospatial engines operate on the full artifacts.
The gain has two layers. The surface layer is token savings: thousands of coordinates stop flowing through the context window. The deeper layer is metadata survival. Once a layer is flattened into prose and paraphrased by a model, the coordinate reference system, timestamp and band names are the first things lost — and those are exactly what downstream spatial operations consume. Note the limit: the Response Store guarantees that downstream computation sees the full artifact rather than a truncated copy. It does not guarantee the geometry was chosen correctly. Catching a wrong footprint is the Orchestrator's validation job, not the store's.
GeoFaham-Bench: 40 Tasks Over 17 Real Disasters
The paper also releases a benchmark. GeoFaham-Bench contains 40 natural-language tasks grounded in 17 real-world disaster records spanning fires, floods, hurricanes, cyclones, earthquakes and tornadoes [1]. Each task captures a workflow a GIS analyst, humanitarian worker or government decision-maker would actually run, requiring integration across disaster databases, OpenStreetMap features, satellite imagery catalogs and raster products, with spatial joins, aggregation, ranking and artifact generation along the way. Outputs include maps, tables, GeoJSON layers and GeoTIFFs.
Grading is where this benchmark deserves the most scrutiny. Multiple valid execution traces can satisfy one task, so it uses a non-rigid protocol: instead of matching one trace, it checks invariants at the spatial, temporal, methodological and output levels. That fixes the false negative where a correct answer is penalized for taking a different route, but it also hands part of the judgment to a scoring model, following prior work on LLM-as-judge evaluation [1]. For anyone buying a benchmark result, that means the score carries scorer uncertainty and should not be read as a purely objective measurement.
0.940 vs 0.879, With 7.5x Fewer Tokens
The comparison runs against three general-purpose coding agents: Codex, Claude Code and OpenCode. GeoFaham takes the best overall score [1].
| System | Overall score | Note |
|---|---|---|
| GeoFaham | 0.940 | Also reports roughly 7.5x fewer tokens |
| Codex | 0.879 | Best-performing baseline |
| Claude Code | Not reported in the material available here | Listed as a baseline |
| OpenCode | Not reported in the material available here | Listed as a baseline |
The two largest gaps appear in data selection correctness and spatial-temporal logic: 11.9 and 13.9 points over the best baseline. That distribution is informative. If GeoFaham's edge were simply cleaner code, the lift would concentrate in execution success. Instead it wins on choosing the right evidence source and on not mangling time and space — precisely the silent failure modes described earlier. The paper reaches the same conclusion, attributing the result to the combination of domain specialization, validation awareness and artifact preservation rather than to better code generation [1].
Where This Approach Stops Working
First, it fails when the task is the wrong shape. For single-source retrieval or a question about one image, four specialist agents plus a dual-ledger orchestrator is over-engineering, and a general agent with one geospatial tool is cheaper. The paper itself positions single-source remote-sensing agent benchmarks as a separate category that does not cover cross-source collaboration [1].
Second, it does not apply when your data sources change. The four roles are bound to PostGIS, OpenStreetMap, a STAC imagery catalog and raster code generation. Swap in a different catalog standard or a proprietary format and the benefit does not carry over automatically — you rewrite a role.
Third, the benchmark's size caps how strong the conclusion can be. With 40 tasks across 17 disaster records the disaster types are varied but the total volume is small, and the dimension-level gaps of 11.9 and 13.9 points rest on that sample. Because the non-rigid protocol leans on a judging model, absolute scores may not reproduce under a different scorer. Run your own sampled audit before treating 0.940 as a constant.
One scope note: this analysis is built from the paper's abstract and early sections. Experimental detail past Section 5, including ablation configurations and recovery behavior analysis, sits outside the material available here, so return to the original for reproduction specifics.
