Case study
Hope — patient assistant at Animo Sano Psychiatry
Clinic assistant for booking and common questions. Crisis routing before the model, PHI redaction, and booking into the clinic site.
React · FastAPI · Cloud Run
Context
Built Hope for Animo Sano Psychiatry so patients can book appointments and find clinic information from the website.
When a message indicates crisis, rules handle it before any model runs, then the conversation goes to a person.
Constraints
Crisis messages must be handled by rules before generation.
Answers must stay grounded in clinic information. PHI entered in free text must be redacted.
Approach
Crisis messages and simple shortcuts are handled before any generation runs.
Crisis detection uses both pattern matching and a classifier over PHI-redacted text.
Retrieval combines keyword search with Gemini embeddings, then a low-temperature prompt constrained to retrieved clinic facts.
The chatbot redacts PHI entered in free text, not only structured fields.
Booking details pass into the clinic site through a signed deep link.
Architecture
Crisis and shortcut routing → keyword plus embedding retrieval → grounded generation → PHI-safe logging and booking
Outcomes
Completed bookings pass from the chat into the clinic site.
Lower-rated conversations inform changes to routing, FAQ content, and booking prompts.
Tradeoffs
Handling crisis messages with rules before generation reduces flexibility and improves consistency where it is required.
Grounding answers in clinic facts reduces unsupported replies and requires the retrieved content to stay current.