Kenko AI - Hackathon Submission

Inspiration

Kenko AI was inspired by a common healthcare gap: most people only react when a serious issue appears, even though early warning signs are often present in everyday vitals. Glucose trends, blood pressure patterns, poor sleep, low activity, and fatigue can signal risk long before diagnosis, but these signals are usually hard to interpret without clinical context.

We wanted to build a system that helps users move from raw numbers to clear next steps. Instead of showing only a score, Kenko AI explains what is driving risk, how strong the signal is, and what practical actions may help reduce risk over time. The goal is preventive intelligence that is understandable, actionable, and responsible.

What it does

Kenko AI is an AI-powered preventive risk assistant that combines local machine learning predictions with Gemini-generated explanations.

Given a user profile and vitals, it produces:

  • Metabolic risk probability
  • Cardiovascular risk probability
  • Nutritional deficiency risk estimate
  • Overall composite risk score and risk band (low, moderate, high)
  • Confidence score and model reliability signals
  • Top risk factors with contribution breakdown
  • Recommended lifestyle actions
  • Suggested follow-up tests
  • Intervention simulations that estimate potential improvement

A key capability is context-aware glucose handling. The model interprets glucose differently for fasting, random, or unknown sample type, which makes outputs more realistic and clinically sensible.

How we built it

Kenko AI uses a hybrid architecture with three layers: data/modeling, inference API, and user-facing experience.

1. Data and model pipeline (Python + scikit-learn)

  • Created a dataset ingestion pipeline that pulls multiple health datasets from OpenML.
  • Mapped heterogeneous schemas into one unified feature contract:
    • age, bmi, glucose, blood_pressure, activity_level, diet_quality, sleep_hours, fatigue, smoking
  • Built source-specific mapping functions for diabetes, diabetes130us, heart disease, and heart failure data.
  • Trained two calibrated risk heads:
    • metabolic model
    • cardio model
  • Added reliability diagnostics, feature profiles, and caveat metadata in training reports.

2. Inference engine (Python risk core)

  • Implemented robust input normalization with safe defaults and aliases.
  • Added physiological context handling for glucose interpretation.
  • Computed:
    • metabolic risk
    • cardio risk (plus age-aware calibration)
    • nutritional risk
    • overall weighted risk
  • Added explainability outputs:
    • top factors
    • factor breakdown percentages
    • phenotype signatures
    • intervention scenario simulation

3. API and frontend experience (Next.js + TypeScript + Gemini)

  • Built a flexible Next.js API route that securely calls a separate Python FastAPI model service (for production) or spawns a Python wrapper process via IPC (for local development).
  • Added resilient parsing to handle cross-runtime communication, IPC logs, and JSON output safely.
  • Integrated Gemini in the API layer to generate concise, non-alarmist health narrative from structured outputs.
  • Built an animated, modern UI with Tailwind and GSAP for a polished judge/demo experience.

Challenges we ran into

  1. Dataset inconsistency and schema alignment Different datasets had incompatible feature formats, missing values, and different definitions. Harmonizing them into one reliable schema required careful mapping and quality checks.

  2. Proxy feature engineering without overclaiming Some source datasets lacked direct fields for BMI, glucose, smoking, or lifestyle. We needed conservative approximations that were useful but still transparent.

  3. Avoiding leakage and unrealistic shortcuts Certain combinations in medical datasets can unintentionally leak outcomes. We had to design targets and mappings carefully to avoid inflated performance.

  4. Cross-runtime reliability (Node <-> Python) Process spawning and output parsing created edge cases when logs mixed with JSON. We built line-scanning and robust error propagation to keep inference stable.

  5. Explainability and trust A raw probability is not enough in health contexts. We added confidence, reliability caveats, factor ranking, and practical recommendations to improve interpretability.

  6. Balancing technical rigor with clear communication We wanted outputs that are data-driven but understandable to non-expert users. Gemini helped convert structured risk signals into empathetic, actionable language.

Accomplishments that we're proud of

  • Delivered an end-to-end preventive health intelligence workflow, not just a model demo.
  • Built a hybrid AI stack where local ML and Gemini each play a clear role.
  • Added context-sensitive logic (especially for glucose interpretation) instead of one-size-fits-all thresholds.
  • Implemented reliability diagnostics and caveat messaging for safer communication.
  • Designed intervention simulation to show users how behavior changes can shift risk.
  • Shipped a polished product experience with strong storytelling for judges and users.

What we learned

  • Data quality and schema design often matter more than model complexity.
  • Calibration and confidence reporting are essential in risk-facing applications.
  • Explainability should be built into the prediction contract, not added later.
  • Hybrid systems work well: deterministic local inference for structure, LLMs for communication.
  • Responsible health AI requires clear caveats and next-step recommendations, not just predictions.
  • User trust improves when outputs are both transparent and encouraging.

What's next for Kenko AI

  1. Richer clinical signals Expand inputs with lipid profile, HbA1c trends, waist metrics, family history, and medication context.

  2. Longitudinal intelligence Move from one-time snapshots to trend-based forecasting and weekly trajectory tracking.

  3. Validation and calibration at scale Test on broader cohorts, improve subgroup robustness, and benchmark against established risk tools.

  4. Gemini-powered coaching upgrades Add personalized weekly micro-plans, multilingual explanations, and discrepancy-aware guidance.

  5. Product hardening Add secure user history, report exports, clinician-friendly summaries, and deployment-ready observability.

  6. Responsible AI roadmap Publish model cards, fairness diagnostics, and explicit limitations to keep trust and safety central.

Built With

Share this project:

Updates