USAII Hackathon — Challenge 4 · Housing Stability

Smart Crisis
Routing for
Real People

An AI-powered emergency triage engine connecting vulnerable individuals facing sudden displacement or distress to verified, real-time local resources across 6th of October City — via a universally accessible conversational interface.

Not-Null Crisis Router — WhatsApp Simulator
AI Crisis Router
Welcome to the Not-Null Emergency Router (October City Sector). Please reply with the number of what you need most right now:

1. Immediate Shelter & Housing Stability
2. Food Security & Nutritional Support
3. Safety Threats & Immediate Abuse
4. Emergency Rental & Financial Assistance
User
أنا في الحي المتميز ومحتاجة مأوى بسرعة. I need shelter in Al-Motamayez.
AI Crisis Router
LIVE VERIFIED

We have routed you to:
Al-Motamayez Emergency Shelter
Address: Block 4, Al-Motamayez Area, 6th of October
Phone: +20 (2) 3835-1010
Beds Available: 12
4
Crisis Vectors
7
Verified Shelters
3
Food Distribution Centers
2
Safe Houses & Dispatch Lines
6h
Stale-Data Threshold
100%
October City Localized

Four Crisis Vectors,
One Unified Router

Each vector activates a dedicated database query path, telemetry pipeline, and operator backchannel — no generalised chatbot noise.

🛖

Immediate Shelter & Housing

Routes users to verified emergency beds across Al-Motamayez, 11th District, and Hadayek October. Telemetry enforces a 6-hour stale-data window with automated supervisor pings when thresholds are breached.

3 Active Shelters · 25 Beds

Food Security & Nutrition

Connects users to soup kitchens and food banks in the 3rd District, Industrial Zone, and Sheikh Zayed. A daily 8:00 AM inventory reset check flags stale stock before routing.

3 Food Banks · 205 Daily Meals

Safety Threats & Abuse Bypass

Instantly locks out all AI inference and serves human caseworker hotlines. Keyword detection across Arabic and English triggers the bypass before any NLP processing runs.

AI Lockout · Direct Dispatch

Emergency Financial Assistance

Surfaces eviction relief grant pools and pro-bono legal counsel slots across 7th and 12th Districts. Backlog delay warnings are surfaced to the client when processing pipelines are overloaded.

$17,000 Grant Pool · 5 Legal Slots

From Distress Signal
to Verified Resource

A four-stage pipeline processes every incoming message — from acoustic analysis to SQLite retrieval — in under two seconds.

1

ASR Intake

Voice or text input is transcribed by a simulated Whisper ASR module with emotional distress flags extracted alongside the transcript.

2

Safety Bypass

A keyword scanner checks for abuse and violence signals in Arabic & English. If triggered, all AI inference is halted and caseworker cards are served immediately.

3

Geo-Entity Extraction

A bilingual location parser maps colloquial district references like "المتميز" or "hadayek" to standardised October City neighbourhood categories.

4

SQLite RAG Routing

A targeted SQL query retrieves the best-matching, live-verified resource. If none exist, a human hotline fallback is issued — no hallucination possible.

Multi-Layer Architecture

Three decoupled layers handle ingestion, intelligence, and data persistence independently — enabling each to be upgraded or replaced in isolation.

Layer A — Client Interface

WhatsApp Simulator

  • Streamlit-rendered chat timeline
  • Bilingual (AR / EN) text input
  • Simulated Whisper ASR voice notes
  • Intake triage state machine
  • Dynamic retro vector theme switching
  • Quick-reply intake buttons (1–4)
Layer B — NLP Pipeline

Intent & Entity Engine

  • Bilingual safety keyword scanner
  • Geospatial entity extractor (16 mappings)
  • Intent classifier (Shelter / Food / Safety / Financial)
  • Severity scoring (0–10)
  • Optional Gemini API live routing mode
  • Hallucination containment via sandbox prompts
Layer C — Data & Operator

SQLite Live Database

  • Four relational tables (shelters, food_banks, safety_registry, financial_assistance)
  • 6-hour stale-data telemetry pings
  • 8:00 AM daily food inventory resets
  • Operator bed / meal / fund adjustment controls
  • Caseworker dispatch webhook simulation
  • Real-time system audit log trail

October City Resource Database

All resource data is seeded locally at startup and updated in real-time through the operator backchannel. No external API dependency.

Facility Name Vector Neighbourhood Capacity Status Contact
Al-Motamayez Emergency Shelter Shelter Al-Motamayez District 12 Beds LIVE VERIFIED +20 (2) 3835-1010
11th District Youth Shelter Shelter 11th District 5 Beds LIVE VERIFIED +20 (2) 3835-1020
Hadayek October Relief Hub Shelter Hadayek October 8 Beds STALE WARNING +20 (2) 3835-1030
District 3 Soup Kitchen Food 3rd District 85 Meals/Day LIVE VERIFIED +20 (2) 3835-2010
Industrial Zone Food Bank Food Industrial Zone 120 Meals/Day LIVE VERIFIED +20 (2) 3835-2020
Sheikh Zayed Welfare Pantry Food Sheikh Zayed 0 Meals/Day EMPTY FALLBACK +20 (2) 3835-2030
Central Axis Women's Safe House Safety Central Axis Anonymous ACTIVE +20 (10) 9999-0000
6th of October Social Dispatch Safety Al-Motamayez District Mobile Team ACTIVE +20 (10) 8888-0000
District 7 Legal & Rental Aid Office Financial 7th District $15,000 Pool · 4 Slots FLUID +20 (2) 3835-3010
District 12 Community Support Fund Financial 12th District $2,000 Pool · 1 Slot HEAVY DELAY +20 (2) 3835-3020

Built for Trust & Resilience

Every design decision prioritises accuracy, privacy, and accessibility for users operating under extreme cognitive load.

Zero Hallucination Policy

The Python layer overrides LLM output if the SQLite query returns zero results — the central hotline is always served instead of a fabricated address.

Biometric Privacy

Voice audio is processed in transient buffer memory only. No audio files, biometrics, or user identifiers are ever written to disk or permanent logs.

Stale-Data Telemetry

Automated supervisor webhook pings are triggered when shelter beds go unverified for 6+ hours or food inventory is not refreshed before 8:00 AM.

Bilingual NLP

The geospatial entity parser handles 16 location mappings in both colloquial Arabic and English, covering all major October City districts and sectors.

Reversible Interface Engine

Operators can force-switch vectors, override client routing, and reset the entire session state to the intake greeting loop from the sidebar at any time.

Safety Lockout Protocol

Abuse and violence keywords in Arabic and English instantly bypass all AI inference — routing directly to human caseworkers with no LLM intermediate step.

Test Five Pre-Loaded
Crisis Scenarios

Each scenario simulates a real bilingual distress message from an October City resident. The ASR transcribes the audio, the NLP extracts the location and intent, and the SQLite router returns a verified result in under 2 seconds.

Run Scenarios in Dashboard →
S
Motamayez Eviction
Routes to Al-Motamayez Emergency Shelter (12 beds verified)
S
Hadayek October Displacement
Triggers stale-data ping (8h update gap) + supervisor alert
F
District 3 Hunger
Routes to District 3 Soup Kitchen (85 meals live verified)
!
Central Axis Abuse (Bypass)
Safety lockout — AI halted, caseworker dispatch activated
$
District 7 Eviction Court
Routes to District 7 Legal Aid Office ($15,000 FLUID)