Inspiration

LMNSPN has operated for 14 years without a single digital referral pathway. Intake still happens by phone, spreadsheet, and word-of-mouth — which means the people who need help most (especially women, young people, and those at crisis point at 2 am) don't get reached. We wanted to fix that in 30 hours.

What we built

PathFinder is a full-stack AI triage and referral platform with two portals:

  • Public portal — anonymous chat interface with voice input, real-time risk analysis, and warm crisis escalation. No account required. Accessible via QR code at any partner venue.
  • Staff portal — Kanban referral pipeline, live conversation monitor, role-based dashboards, and a notification system that bypasses silent mode for HIGH-risk after-hours cases.

Key features:

  • Multi-signal risk engine — 35+ crisis phrase variants trigger escalation; risk never drops once HIGH is reached within a conversation
  • Live context injection — the AI knows the current time, which staff are on-call, and which programs have available capacity, and uses that in every reply
  • Conversation memory — cumulative emotion and theme tracking means users don't have to repeat themselves on return contact
  • Auto-referral pipeline — HIGH risk chat immediately creates a case in the staff pipeline with a full AI assessment attached
  • Voice intake — OpenAI Whisper transcription removes literacy barriers; critical for the demographics LMNSPN serves
  • Source-tagged QR codes?source=charlestown-gaming routing lets partners track where referrals originate
  • Twilio voice calls - bypasses phone silent mode for on-call staff at 3 am

How we built it

  • Backend: FastAPI (Python) with an in-memory store, Azure AI Foundry (gpt-oss-120b) + OpenAI (gpt-5) with a cascading provider chain
  • Frontend: React 18 + Vite with Server-Sent Events for ChatGPT-style streaming
  • Risk engine: Custom keyword classifier (35+ phrases) with emotion detection, escalation scoring, and per-conversation peak tracking
  • Program matcher: 14 weighted specialty profiles with risk-fit, emotion-fit, capacity, and keyword signals
  • Notifications: Web push + Twilio SMS + Twilio voice call (silent-mode bypass)

Challenges

The biggest technical challenge was Azure content filtering; Azure blocks the exact crisis language we need to handle clinically. We solved this by making OpenAI the primary provider and Azure the fallback. We also hit macOS SSL issues with Python's urllib, gpt-5 parameter incompatibilities (max_completion_tokens vs max_tokens), and had to implement real-time SSE streaming without a websocket dependency. The hardest non-technical challenge was making the chatbot feel genuinely warm and safe—not clinical, not robotic—for someone in crisis.

What we learned

Building for mental health means every design decision is a clinical one. We removed risk scores from the user-facing chat entirely, showing that someone "HIGH RISK" is harmful. We learned to think about the 3 am use case first. We also learned how much the right AI system prompt matters: the bot became measurably warmer when we replaced clinical language with "kind neighbour" framing.

What's next for PathFinder

Immediate (0–3 months)

  • Deploy to production on Azure with persistent PostgreSQL — currently the store is in-memory and resets on restart
  • QR code generator for partner venues — one-click print-ready codes for GPs, pharmacies, gaming lounges, and community centres
  • SMS follow-up loop — automated check-in 48 hours after a HIGH-risk chat with a warm re-engagement message
  • Referral acknowledgement — notify the person who submitted a referral when a staff member picks it up

Short term (3–6 months)

  • NDIS provider portal — dedicated intake flow for disability support coordinators with NDIS plan number capture
  • Multi-language support — Arabic, Mandarin, and Tagalog are the top non-English languages in the Hunter Region
  • GP integration — HL7 FHIR-compatible referral export so GPs can submit directly from their clinical software
  • Repeat contact detection — identify returning users (with consent) so staff can see the full history, not just the latest chat

Longer term

  • Outcome tracking — close the feedback loop by recording whether referred clients actually accessed services and how they progressed
  • Regional expansion — the platform is network-agnostic; the same codebase could serve other suicide prevention networks across NSW and nationally
  • Peer worker matching — use conversation signals to route not just to programs but to specific peer workers with lived experience that matches the person's situation
  • Predictive load management — alert program coordinators when a specialty (e.g. gambling, youth) is trending up in the referral pipeline so they can adjust capacity before it becomes a waitlist problem

The core vision is turning PathFinder from a hackathon prototype into the standard digital infrastructure for suicide prevention networks in Australia — the layer that sits between community and clinical services, and makes sure nobody falls through the gap.

Built With

Share this project:

Updates