Inspiration
Anxiety increases over time and involuntarily. The majority of people do not receive timely, personal insight or practical support at the time they require them. I wanted to create an agent that identifies emerging forms of anxiety from ordinary daily contextual and chronological information, predicts threat days or hours ahead, and offers timely customized, practical support—without requiring third-party services at an additional cost.
What it does
Saves the user's check-ins (sleep, energy, mood, triggers, etc.) and summarizes previous trends. Rocks An AI-based forecast of future levels of anxiousness from contextual metadata and recent history. Creates at run-time three separate, singly tailored mental health advices locally from an instruction-inadapted language model and fallback reasoning for fault tolerance. Offers insight (weekly cycles of anxiousness, best and worst days, streaks) to enable frequent checking-in and self-discovery.
How I made it
Frontend: React Native + Expo for cross-platform mobile UI, check-ins, and insight dashboards. Backend / ML: Python and FastAPI with two essential services: an anxiousness predicting AI (scikit-learn-trained, with standardised contextual features) and an LLM-based local tip generator. Data & Authentic: Realtime Firebase Realtime Database and Authentications for player state, entries, and persistence. Pipeline: User data → feature scaling → prediction of anxiety → tips generation → UI feedback.
The Challenges I Faced
Poor LLM performance: The language model would repeat inputs or provide ambiguous advice; remedied by constructing limited-shot prompts, heuristics filtering, and sampling parameter adjustment. Alignment of features: Verifying training pipeline received precisely the features the training model was waiting for (mitigated by aligning training preprocessing at serving). Real-time computations of trends:Averaging over aggregated weekly values, performing proper streak resetting, and all this with minimal delay to enable decent performance on phones. Fallback resilience: Designing a fallback system deterministically for tips to provide humans with helpful direction where the output of the model underperforms.
What I Have Done
Integrated an all-in-one end-to-end ML + mobile system: panic prediction and recommendation generation adaptively at real-time all-in-one flow. has free counseling individually. Incorporated proper management of prompts to deal with LLM fallacies (generic responses,echoing). Designed an end-user experience with visualization of insight (trends, best/worst days, streaks) to facilitate interaction.
What I learned
Pragmatic construction of prompts and how small changes significantly impact LLM usefulness. End-to-end pre-processing of features and its critical role for reliability of models. Synchronization of state between Firebase, Python ML services, and React Native UI. Designing graceful degradation: AI fallback logic and caching to maintain the app valuable under suboptimal conditions.
What's next for Anxiety Predictor?
Individualize tip efficacy according to user responses (reinforcement signal) and adaptively change prompts. Run prediction/tip services on a secured cloud platform with proper authentication, rate limiting, and HTTPS. Improve the model further by incorporating higher-order trends (weekly and higher-order) and context features (calendar events, geolocation). Incorporate offline-first features with local caching and syncing. Add A/B testing to further fine-tune what tips work best.
Built With
- expo.io
- fastapi
- firebase-authentication
- firebase-realtime-database
- flan-t5-small
- git
- github
- hugging-face-transformers
- javascript
- joblib
- numpy
- pandas
- python
- react-native
- scikit-learn
- typescript
- uvicorn
Log in or sign up for Devpost to join the conversation.