Retrieva Labs

Case study Digital mental health

NamheeAn AI mental-health companion with mood tracking and automatic risk detection.

A production-ready MVP offering CBT and mindfulness guidance, mood tracking and session memory, with automatic risk detection that surfaces crisis helplines.

Client
Namhee
Sector
Digital mental health
Engagement
MVP design and build
Our role
AI architecture and backend
Status
Production-ready MVP

Interface recreation · client data anonymized

pass rate on 11 core tests
100%
pass rate on 11 core tests
RAG response target
<5s
RAG response target
crisis detection
Risk-aware
crisis detection

(01) The challenge

What needed solving.

Namhee set out to offer accessible mental-health support. The assistant had to feel personal, remember context, guide users with evidence-based techniques and, above all, recognize when someone might be at risk.

(02) The solution

What we built.

We built a FastAPI backend with LangChain and GPT-4o, grounded in a Pinecone knowledge base of CBT and mindfulness guidance. Mood assessment and tracking personalize each session and session memory keeps continuity.

An automatic risk-detection layer surfaces crisis helplines when warning signs appear, and the MVP shipped with documented performance targets and an automated test suite.

(03) Architecture

How the system fits together.

  1. 01 · Check-in

    • Mood assessment
  2. 02 · Context

    • Session memory
    • Mood history
  3. 03 · Retrieve

    • CBT & mindfulness
    • Pinecone
  4. 04 · Respond

    • GPT-4o guidance
  5. 05 · Safeguard

    • Risk detection
    • Crisis helplines

(04) Engineering decisions

The choices that made it work.

  1. 01

    Safety by design

    Risk detection runs on every conversation and escalates to crisis resources.

  2. 02

    Grounded guidance

    Advice comes from a curated CBT and mindfulness knowledge base, not open-ended generation.

(05) Results

What the client got.

  • Production-ready MVP with documented performance targets
  • 100% pass rate across 11 core automated tests
  • Sub-5-second RAG responses
  • Automatic risk detection with crisis helpline escalation

Technology

  • FastAPI
  • LangChain
  • GPT-4o
  • Pinecone
  • Python

Services involved

Go deeper

Next case study HealthcareMedical Imaging AI

Taking on new projects

Let’sbuild.

Want results like these? Let's talk.

Book a free 30-minute strategy call with our founder. You’ll leave with a clear view of the right architecture, timeline and next step, whether or not we work together.

  • Reply within 24 hours
  • NDA before you share anything confidential
  • You own the code, prompts and documentation
  • Hours overlap with US, UK, EU and Gulf teams
Or get an instant AI plan with the Project Scoper
Book a free strategy call