OptySleep: AI Sleep Recommendation Engine (OptyAI)

AI Recommendation Engine
Mobile App
Health Tech
FastAPI

How this was built: Recommendation systems

OptyAI for OptySleep

About the OptySleep app

OptySleep is a sleep tracking app that helps people understand what actually improves their sleep. It has a sleep widget, quick data logging, and OptyAI, an assistant that gives each user personal sleep tips.

Building a custom recommendation engine

The old recommendation setup had performance problems, so I designed a new engine from scratch with a custom scoring formula. It runs on FastAPI in Docker, uses Redis caching to keep responses fast, and uses A/B testing to check which recommendations really work. Firebase supports the mobile app side.

After the new engine went live, engagement went up by about 70%. Retention also improved, and more users renewed their subscriptions.

How the personal sleep tips work

The engine looks at what each user has tried before and how it worked for them. It uses Sentence-BERT embeddings to find sleep methods with a similar meaning, and then suggests what to try next. For example, if cutting down on caffeine gave someone more energy, the app might suggest a blue light filter next.


Tech Stack

FastAPI logo
Python logo
Docker logo
Firebase logo