afya yangu

    Artificial & Intelligence

    Afya-Yangu AI – Offline Clinical Decision Support for Level 2 & 3 Care

    Project Details

    CATEGORY

    Artificial & Intelligence

    afya

    1.Problem & Context

    Why Afya-Yangu AI?

    Kenya’s level 2 and 3 facilities (dispensaries and health centres) are the backbone of primary care, yet clinicians often have limited time and tools to search and interpret national guidelines during a busy shift.

    Guidelines exist for child health, maternal and newborn care, TB, HIV, malaria, and NCDs – but they are scattered across PDFs, booklets, and static websites.

    The result is:

    • Variation in care between facilities and providers.
    • Overuse or misuse of antibiotics.
    • Missed danger signs and delayed referrals.

    Afya-Yangu AI aims to bridge this gap by making Kenyan guidelines “conversational” and available offline at the point of care.

    2.Technical Architecture (High-Level)

    Under the Hood

    1. Model: MedGemma SLM, fine-tuned on:
    • Synthetic and real QA pairs from Kenyan guidelines.
    • Common level 2 & 3 clinical scenarios.

    2. Knowledge Base:

    • Kenyan level 2 & 3 guidelines converted from PDF to text.
    • Chunked and tagged by topic (e.g. child, maternal, HIV, TB, NCD).
    • Embedded and stored in a FAISS index for efficient similarity search

    3. RAG Pipeline:

    • User query → FAISS retrieves top-k relevant chunks → combined into prompt → MedGemma generates answer.
    • Deployment:
    • Containerised (e.g. Docker) for on-prem or local server.
    • Simple REST API for mobile / web front-ends.

    4. Governance & Safety:

    • Strict prompting: no advice outside Kenyan guidelines; defer or refer when out of scope.
    • Logging of queries/answers (de-identified) for quality improvement and audit.

    3. Impact & Roadmap

    Expected Impact

    • Improved guideline adherence at level 2 & 3.
    • More appropriate antibiotic use.
    • Better triage and referral decisions, especially for maternal and child health.
    • Data to understand what clinicians struggle with (through anonymized query logs).

    Roadmap bullets:

    1. Phase 1 – Prototype with a subset of guidelines (e.g. child health & maternal care).
    2. Phase 2 – Expand guidelines, optimise latency on low-power hardware.
    3. Phase 3 – Pilot in select facilities, collect usability & clinical outcome signals.
    4. Phase 4 – County-level scaling and integration with EMRs / DHIS2 data flows.