Trust is the hardest part of clinical AI—especially when the system is running locally in a facility without a human expert constantly looking over its shoulder.
So, how do we make Afya-Yangu AI trustworthy enough to be used in real clinical workflows?
Grounding in Kenyan Guidelines: Non-Negotiable
The first guardrail is conceptual:
Afya-Yangu AI is not allowed to invent medicine.
It must speak through Kenyan guidelines.
This shapes every design choice:
- We build our knowledge base from official Kenyan documents: child health, maternal and newborn care, TB, HIV, malaria, NCDs, and more.
- We use RAG so the model is forced to reference this material rather than free-styling based on global data.
- We require the model to cite its sources in responses, so a clinician can see where the recommendation comes from.
If the guidance doesn’t exist in the Kenyan documents we’ve loaded, the system should say so, not guess.
Prompting for Safety: What the Model Is Told to Do
Language models are heavily influenced by how you “frame” their task—what we call prompting.
We use prompting strategies to:
- Constrain the model to evidence in the provided guideline snippets.
- Ask for structured answers – e.g. “Assessment / Actions / Referral / Counselling.”
- Force explicit deferral when out of scope.
For example, the system instruction might say:
- “If you cannot find a clear answer in the provided text, explain that this is outside your scope and recommend referral or consultation with a senior clinician.”
- “Never invent drug doses or off-label uses that are not explicitly present in the guidelines.”
This is not perfect, but it substantially reduces the risk of unsafe improvisation.
De-identified Query Logs: Learning from Real Use
Every question a clinician asks—and every answer the system gives—tells us something about:
- What clinicians struggle with.
- Where guidelines may be unclear.
- How the model behaves at the edges of its competence.
Afya-Yangu AI is designed to keep de-identified logs of:
- The query text (with patient identifiers removed).
- The retrieved guideline snippets.
- The final answer returned by the model.
These logs can be:
- Reviewed by clinical and AI safety teams.
- Used to tune prompts, improve retrieval, or correct failure modes.
- Aggregated to understand common patterns (e.g. frequent confusion around specific conditions).
Alignment with National Digital Health and AI Strategies
Afya-Yangu AI is not just a technical experiment; it sits inside a broader policy and governance conversation:
- National digital health strategies that emphasise interoperability, equity, and local ownership.
- Emerging frameworks on AI ethics, safety, and accountability in health.
- Ongoing discussions about how to regulate clinical AI in Kenya and the region.
We envision Afya-Yangu AI as a testbed for:
- What good documentation and auditability look like in practice.
- How to involve clinicians, regulators, and patients in shaping AI tools.
- How to measure real-world impact beyond accuracy metrics.
What Afya-Yangu AI Will Never Be
Being explicit about limits is also part of safety:
- It is not a replacement for clinical training or supervision.
- It is not a final arbiter in complex cases.
- It is not a stand-alone triage tool in emergencies where seconds matter and protocols demand immediate action.
Instead, we want it to be:
A practical, auditable assistant that nudges care closer to guidelines—especially where support is limited.
Building that kind of trust is a journey, not a one-off deployment. But by grounding Afya-Yangu AI in Kenyan guidelines, transparent logs, and careful prompting, we’re taking steps in the right direction.

