WHAT YOU'RE LOOKING AT
This is the same backend that powers a real CHW's WhatsApp.
Every message you send hits the same pipeline as a real worker texting from a clinic in Maseru: safety filter → RAG retrieval over ministry protocols → Claude → post-LLM safety check → ministry log. The only thing missing is Twilio — you're going through HTTP, they go through WhatsApp Business API.
Watch the Audit Log while you chat — your conversations show up there in real time, tagged as demo entries. Open the Ministry view to see how those interactions aggregate into operational dashboards. Or hit the API directly if you'd rather skip the browser.
conversations + case_tags
tables. Severity, district, topic, condition extracted by a second
Claude call (Haiku) and shown in the Ministry
and Public Health views.
POST /api/demo-chat— your message hits Express- Pre-LLM safety filter checks for dosing/diagnostic patterns
- OpenAI embeds your query, cosine-similarity over the corpus
- Top-3 chunks bundled into Claude's context
- Claude answers, grounded — or routes to a "general knowledge" fallback if the corpus didn't cover it
- Post-LLM scrubber catches any unsafe output
- Response logged with sources, severity tags extracted async