Four months on OCHA RAG, the AI system the UN OCHA Assessment & Analysis Cell uses to draft situation analyses from the evidence a crisis produces. I used it in three earthquake responses, then turned what broke in the field into tested improvements to the product.
I worked with the Cell's lead developer on three versions of the system: a Python command-line pipeline built per event, a web interface for it deployed on Azure, and the current Rust service with a knowledge graph, vector search and a web console.
Each emergency was a live test. During the response I ran the tool and delivered what the office needed; afterwards I fixed the root cause in the product. Three rules guided the work: reproduce a defect on real data before naming its cause, make sure every new check can actually fail, and land every change through a reviewed pull request.
Emergency responses
Jun 2026Philippines · M7.8
Official figures behind a CAPTCHA
Problem. The national disaster agency's bulletins, the source for casualty figures, sat behind Cloudflare and a CAPTCHA.
Solution. A browser-automation path with local drivers for restricted networks, then a pivot to mirror sites.
Impact: official national figures reached the report pipeline during the response.
Jun–Jul 2026Venezuela
The RAG CLI and a web UI in production
Problem. Analysts needed reports within hours from a pipeline that had to be run by hand.
Solution. Deployed a web interface on Azure, added event-anchored news search, number checking against authoritative figures, and cluster and needs-assessment templates.
Impact: 4 situation-analysis editions, 3 cluster analyses and a needs assessment in two weeks; country offices trained to run it.
Aug 2026Colombia · M7.4
Hard-to-reach rural villages
Problem. Damage counts covered towns; dispersed rural settlements were invisible. The office also needed cluster-ready analysis.
Solution. Coordination support and cluster briefs for the country office; sampled the ShakeMap intensity grid at every populated centre in six departments.
Impact: 271 rural settlements at intensity VII–VIII flagged, 34 in Chocó, for access planning.
Aug 2026Colombia · dashboard
NASA satellite fire hazard map
Problem. The response dashboard had no view of fire activity around the epicentre.
Solution. NASA FIRMS active-fire detections over the shaking bands, with a narrative where every fire figure comes from the data, never from the model.
Impact: detections rose from 47 a day before the quake to 351 on quake day.
Improvements: platform, ingestion and query
Clean-up and ingestion under load. Bulk uploads exhausted the database pool and dead code piled up. Batched writes and single-request uploads; 256,695 dead lines removed.
Fetch and geography hardening. PDF-only reports became permanent failures and district figures were filed as national. Attachments kept, places resolved finest level first, and an endpoint that identifies one event across USGS, GDACS and WFP ADAM.
Multilingual answers. Spanish and Bahasa questions skipped the current-figure logic. Same path in three languages, with national questions answered at national level.
Publication dates. None of 95 hand-uploaded PDFs carried a date, hiding 28% of the corpus from date filters. Dates are now found at ingest and backfilled in place, and retrieval can be limited to a date window.
Workspace isolation. Three graph endpoints could return another workspace's data. One shared rule closed it.
Measured before building. A 72-query experiment showed place-scoped retrieval would cut topical relevance from 90% to 52%, so it was closed instead of built.
The reporting module
About six weeks of the four months went here. The goal: a report an analyst can clear, written as prose, scoped to an area, with every figure grounded and every claim cited.
Reports as prose. Templates with a thesis question, section objectives and writing briefs; a Spanish-language corpus grounds its figures again; background figures no longer leak into an earthquake report.
Admin selection. A run is scoped by picking a country, department and municipality from official boundaries, so the report stays inside the chosen area.
Word export and custom templates. Reports download in OCHA's Word format, and crisis cells design their own report structure without a code change.
Citations. Stored as data rather than left to the model, renumbered in reading order, kept through the editing pass (6 of 6 test runs kept every marker), one hover tooltip per claim.
Fact checking. A Figures tab where a person verifies, withdraws or adds a figure. A verified figure becomes the report's figure everywhere, and the other reported values stay visible.
Numeric guard reliability. Whole-run failures caused by run-together dates removed, and every dropped judgement is now logged with its reason.
The design rule behind all of it: a person decides the numbers, the engine shows its sources. Figures from different sources are never averaged or summed by a model; a verified figure settles the headline and the spread stays visible.
Where it goes next
A single metric registry. The metric vocabulary is kept by hand in seven places. One registry should declare each metric's type, whether it can be summed across places, and its standard (Sendai, HXL, JIAF), with a test that fails when code emits an undeclared metric.
Ledger quality. Record which event each figure belongs to, choose a headline when none is verified, and track where a figure originated so a repeated figure is not counted as a second source.
Wire up or remove unused rules. The impact-to-need inference rules have never fired; they should be connected or deleted.
For questions about OCHA RAG or AI in humanitarian analysis, get in touch.
This page describes my own contribution at a high level. It does not represent the official views of the United Nations, and no internal data, code or documents are shared.