AI Safety · Youth Mental Health · Montréal

A triage tool
for youth
in crisis

Answer five short questions about frequency, intensity, plan, protective factors, and personal resources — and get routed to the right Montréal support, from telephone lines to psychiatric emergency.

5-step clinical triage
Routes to verified Montréal resources
Protective factors & personal resources
Powered by on-device Phi-3-mini LLM
How often do dark or suicidal thoughts occur?
These questions are about thoughts of suicide, self-harm, or not wanting to be alive. Select what best describes what you or the young person is experiencing.
Step 1 of 5
How strong or intense are these dark or suicidal thoughts?
This helps determine the level of urgency and type of support needed.
Step 2 of 5
Is there a specific plan or means in mind?
Regarding the suicidal or self-harm thoughts — this is critical for determining whether emergency services are needed.
Step 3 of 5
What is holding them back from acting?
Protective factors significantly reduce immediate risk. Select all that apply.
Step 4 of 5
What resources does this person have?
Personal resources are positive forces that pull toward life — inner strengths, relationships, and sources of meaning. Select all that apply.
People & belonging
Joy & meaning
Step 5 of 5

Try an example:


The project

Why safe-minds?

As LLMs become embedded in everyday tools used by children and teenagers, a vulnerable young person expressing a mental health crisis in a chat interface is no longer a hypothetical. safe-minds is a lightweight, privacy-first pipeline that classifies risk in real time and routes to the right help — from a phone call to a mobile crisis team to psychiatric emergency.

800K+Youth contact KHP yearly
2-stageDetection pipeline
100%On-device, no API key

How it works

A two-stage
detection pipeline

Stage 1 catches unambiguous crisis language in microseconds at zero cost. Stage 2 handles nuance — context, tone, and passive ideation — using a local LLM.

Stage 1
Regex Pre-filter

Pattern-based scan. CRISIS hits fast-path directly to emergency response — no model call needed.

  • Zero latency — runs in microseconds
  • No API cost, no internet required
  • 3 severity tiers: CRISIS, HIGH, MEDIUM
  • CRISIS triggers instant safe response + crisis resources
Stage 2
Phi-3-mini LLM

Microsoft's Phi-3-mini (3.8B) runs locally on Apple Silicon via MPS. Handles nuance regex can't catch.

  • Fully on-device — no data leaves the machine
  • Structured JSON: risk, confidence, reasoning
  • Conversation history for contextual assessment
  • Generates warm, age-appropriate safe responses
Risk taxonomy
SAFENo indicators detected
LOWMild distress, monitor
MEDIUMPassive ideation, intervene
HIGHActive ideation, escalate
CRISISImminent danger, emergency

Technical stack

Built for
production safety

Designed to run on any device, with full audit trails for regulatory review — aligned with EU AI Act requirements for high-risk AI in healthcare.

🤗
Phi-3-mini · HuggingFace

microsoft/Phi-3-mini-4k-instruct — 3.8B params, strong instruction-following, runs in float16 on Apple Silicon via MPS.

🔒
100% On-device

No data sent to external APIs. Model runs locally via PyTorch MPS backend — critical for HIPAA/PIPEDA-compliant deployments.

📋
Audit-ready outputs

Every assessment produces structured JSON: risk level, confidence, indicators, reasoning, model used, and UTC timestamp.

Two-stage efficiency

Regex pre-filter handles obvious cases at zero cost. LLM stage only fires when nuanced contextual reasoning is needed.

🇨🇦
Montréal-first routing

Triage logic routes to verified Montréal crisis resources — SPC Montréal, Tracom, Douglas Institute, and 911 — based on severity.

📐
Safe Messaging Guidelines

System prompt encodes AFSP / KHP guidelines. Model never provides methods, always validates distress, always surfaces resources.

detector.py
# Two-stage assessment — fast-path CRISIS, LLM for nuance
result = assess("I've been feeling really hopeless lately")

# Structured output — audit-trail ready
print(result.to_json())

# → { "risk_level": "MEDIUM", "confidence": 0.82,
# "indicators": ["hopeless"], "model_used": "Phi-3-mini" }

Context

Built at
Mila × KHP Hackathon

Developed for Championing AI for Good: Building Safer AI for Youth Mental Health — co-organized by Mila, Bell, Buzz HPC, and Kids Help Phone.

Mila — Québec AI Institute Kids Help Phone Bell Canada Buzz HPC

"AI has a clear capacity to expand the reach of mental health professionals — yet this potential is matched by equally significant risks. How do we ensure AI systems do not cause harm when engaging with individuals in crisis?"

— Hackathon opening conference, Mila × KHP


The builder

About the project

This project sits at the intersection of applied NLP, AI safety, and real-world mental health impact.

G
Georges Bélanger-Alba
AI Governance · Applied NLP · Montréal

Working at the intersection of AI governance, EU AI Act compliance, and practical LLM implementation. Previously built AI risk classifiers and safety evaluation frameworks. This project extends that work into high-stakes applied NLP — using open-source models to protect vulnerable youth in real-time conversational systems.