Predictive Wellness AI

Industry

Healthcare

Client

Private Client

Team

STARTER

Year

2024

We were hired to build an LLM-powered platform that takes a user's health profile and returns a life expectancy estimate, a Healthy Lifestyle Index, and personalized recommendations grounded in WHO guidelines, all in real time.

Challenge

The client wanted to move beyond static health calculators. They needed a platform where users input their actual health data like physical activity, diet, sleep quality, smoking habits, BMI, environmental factors and receive personalized, science-backed insights: how long they're likely to live, how their lifestyle scores against a meaningful index, and what specific changes would make the biggest difference.

The hard problem was making it consistent and trustworthy. Early model testing exposed serious instability in life expectancy predictions, particularly for unhealthy profiles where outputs swung between runs with the same inputs. A health platform that gives a different life expectancy estimate every time a user refreshes the page is worse than useless. The recommendations had to be specific enough to act on ("address your BMI through X") without crossing into clinical advice. This meant grounding everything in WHO guidelines rather than letting the model improvise.

Approach

The project moved through two phases in model selection and prototype development with consistency as the central engineering constraint throughout.

Phase 1 benchmarked GPT-4o Mini, LLaMA-3, and Falcon 7B on health insight accuracy, testing each against life expectancy estimation, health index calculation, and recommendation quality across user profiles ranging from healthy to high-risk. This phase also established the data flow: user inputs health metrics through a web app, the model processes them, and results (a Healthy Lifestyle Index and life expectancy estimate) return in real time.

Phase 2 built the prototype around the winning model with a weighted scoring system. Health parameters (physical activity, dietary habits, sleep, environmental factors) each contribute to a composite index score, while life expectancy starts from a base estimate and adjusts for individual factors like smoking, activity level, and diet quality. The weighting structure means users can trace how each factor influences their results.

The consistency problem was solved through parameter tuning. Fine-tuning seed and temperature settings stabilized outputs dramatically, especially for unhealthy profiles where variance had been highest. We also ran targeted model selection by profile type as different health profiles stress models differently, and the best overall model isn't necessarily the most stable one for edge cases. Combined with API-level adjustments, this brought health index predictions to the reliability threshold needed for a consumer-facing product.

All recommendations are grounded in WHO guidelines and validated medical literature. The system generates individualized lifestyle suggestions tied to the specific factors driving each user's scores.

Architecture/Backend

Python health API & web app; structured data pipeline for weighted scoring.

AI/ML models

Benchmarked LLMs (GPT/LLaMA/Falcon); weighted Health Index; life expectancy modeling.

Infrastructure/Deployment

Scalable integration API; real-time processing; mock-up to production rollout.

Key results

  1. Improved health index consistency by over 20% through parameter tuning and profile-specific model selection, turning volatile predictions into stable, repeatable outputs that users can trust.

  2. Built a real-time pipeline from health profile input to personalized output: life expectancy estimate, Healthy Lifestyle Index score, and actionable recommendations delivered near-instantly through a web interface.

  3. Grounded every recommendation in WHO guidelines and validated research, producing individualized lifestyle guidance tied to specific health factors rather than generic wellness content.

  4. Delivered a scalable prototype with API integration, giving the client a production-ready health insights engine they can embed in their existing platform.