Back to Blog
May 20, 2025 5 min read

Building a Therapy Clinic Assistant - Google GenAI Project

A
Arta Mirzadeh Builder & Strategist
Building a Therapy Clinic Assistant - Google GenAI Project

Why Mental Health Needs AI — And How I Built a Therapy Clinic Assistant

Mental health services have a front-door problem. Before a client ever speaks to a therapist, they face a gauntlet of friction: unanswered phone calls, confusing intake forms, impersonal automated menus, and the emotional weight of reaching out in the first place. Studies show that nearly 60% of people who consider therapy never follow through, often because the process of getting started feels overwhelming. I built the Therapy Clinic Assistant to fix that first interaction, using generative AI to create a digital front desk that is warm, intelligent, and available around the clock.

The Problem: A Broken First Touchpoint

Therapy clinics, especially small to mid-sized practices, typically rely on phone lines, email forms, or basic website FAQs to handle new client inquiries. These channels share a common failure: they treat emotionally vulnerable people the same way a SaaS company treats a billing question. There is no warmth, no context, and no ability to meet the client where they are emotionally.

The result is predictable. Clients who are already anxious about seeking help encounter cold systems that reinforce their hesitation. Questions go unanswered after hours. Intake forms feel like tax documents. Appointment booking requires multiple back-and-forth emails. Every friction point is an exit point, and in mental health, an exit can mean someone doesn't get the help they need.

The Solution: A Gen AI Agent with Emotional Intelligence

The Therapy Clinic Assistant is a conversational AI agent built specifically for mental health practices. It handles three core workflows: answering client FAQs with empathy, guiding users through intake forms conversationally, and managing appointment booking through natural language. But what makes it different from a standard chatbot is the emotional layer.

Using few-shot prompting, the assistant was trained to mirror the communication style of a compassionate receptionist. It doesn't just deliver information; it validates feelings, normalizes the therapy-seeking process, and uses language that reduces stigma. When a user says, "I'm not sure if therapy is right for me," the assistant doesn't respond with a FAQ answer. It responds the way a caring human would: by acknowledging the uncertainty, sharing that it's completely normal, and gently offering next steps without pressure.

Under the Hood: RAG, Embeddings, and Structured Output

The technical architecture combines several Gen AI techniques into a cohesive pipeline. At the retrieval layer, Google's text-embedding-004 model converts both the clinic's FAQ dataset and incoming user queries into semantic vectors. This means the assistant understands intent, not just keywords, a user asking "do you take insurance?" and "what are my coverage options?" both map to the same knowledge base entry, even though the phrasing is completely different.

The retrieval layer feeds into a Retrieval-Augmented Generation (RAG) pipeline that grounds every response in verified clinic information. This is critical in healthcare-adjacent contexts where hallucination isn't just unhelpful, it's potentially harmful. The assistant never invents therapy approaches, fabricates availability, or makes clinical claims. Every factual response is anchored to the clinic's actual data.

For structured tasks like intake and booking, the assistant uses prompt-based extraction to pull key details like client name, preferred therapist, date, time, and insurance provider from natural language messages and transforms them into structured JSON output suitable for direct integration with clinic management systems, CRMs, or EHR platforms.

To deepen conversational quality, the system incorporates the Hugging Face mental_health_counseling_conversations dataset, enabling more fluid, contextually aware dialogue that mirrors real therapeutic exchanges. This isn't the assistant playing therapist, it's the assistant understanding the emotional register of the conversation and responding appropriately.

What I Upgraded: From Notebook to Production Architecture

The original prototype was built as a Kaggle notebook for the Google Gen AI Capstone Project 2025. It demonstrated the core concept, but production deployment requires significant evolution. Here's what I redesigned:

Secure frontend interface — replaced simulated notebook inputs with a real-time chat UI that handles live user sessions, maintains conversation state, and works across devices. Built with a WebSocket-backed architecture for instant responses.

PHIPA-compliant data handling — all client data is encrypted in transit and at rest. Conversation logs are stored in a compliant database with role-based access controls. No conversation data is sent to third-party services beyond the embedding and generation APIs, and those calls are configured with data processing agreements.

Backend integration layer — structured outputs from intake and booking flows connect directly to clinic scheduling tools via REST APIs. Appointment confirmations trigger automated SMS reminders through Twilio, reducing no-shows by an estimated 35%.

Escalation protocol — the assistant detects crisis language using a keyword-and-context scoring system. If a user expresses suicidal ideation or acute distress, the assistant immediately provides crisis resources (988 Lifeline, Crisis Text Line) and flags the conversation for immediate human review. This is non-negotiable in any mental health AI system.

Results and Impact

In pilot testing with a Vancouver-based therapy practice, the assistant demonstrated strong results across every metric that matters:

Response time dropped from hours to under 30 seconds. clients get answers immediately, including after hours and weekends, which is when most people research therapy options.

Intake completion rate increased by 40%. The conversational format eliminated the friction of traditional form-filling. Clients completed intake in an average of 4 minutes versus 12 minutes on the old PDF form.

Appointment booking conversion improved by 28%. The ability to book directly through the conversation, without leaving the chat or opening a separate calendar tool, removed a critical drop-off point.

Client feedback scored 4.7 out of 5 for warmth and helpfulness. users consistently noted that the assistant "felt like talking to a real person" and "made me feel less nervous about starting therapy."

The Bigger Picture: AI as a Bridge, Not a Replacement

This project sits at the intersection of two things I care deeply about: making technology that serves people, and making mental health care more accessible. The assistant doesn't replace therapists. It removes the barriers that prevent people from reaching therapists in the first place.

As generative AI matures, the opportunity to deploy emotionally intelligent agents in healthcare, education, and social services is enormous. But it requires building with intention,  prioritizing safety, privacy, and genuine human benefit over feature count. Every design decision in this project was filtered through one question: Does this make it easier for someone in pain to get help?

The answer, I believe, is yes. And that's worth building for.

Built with: Google Gemini API, text-embedding-004, Python, FastAPI, Pinecone, Hugging Face Datasets, Twilio, WebSockets. Originally developed as part of the Google Gen AI Intensive Course Capstone Project 2025.

Share this article