Afya Gemma: Two-Stage Clinical RAG
Clinical decision support grounded on Kenyan MoH guidelines · Aga Khan University Hospital
GCP · GKE · Vertex AI · Terraform · Monitoring
Clinician · residents & interns, AKU Hospital · Architecture component
Clinician
residents & interns, AKU Hospital
Stage 1 · Gemini 2.5 Flash · intent + scope classifier · GCP · GKE · Vertex AI · Terraform · Monitoring · rejects out-of-scope
Stage 1 · Gemini 2.5 Flash
intent + scope classifier
rejects out-of-scope
Retrieval · ChromaDB · MoH guideline embeddings · GCP · GKE · Vertex AI · Terraform · Monitoring · RBAC-filtered
Retrieval · ChromaDB
MoH guideline embeddings
RBAC-filtered
Stage 2 · MedGemma · grounded generation · GCP · GKE · Vertex AI · Terraform · Monitoring
Stage 2 · MedGemma
grounded generation
MoH guidelines · curated + embedded corpus · GCP · GKE · Vertex AI · Terraform · Monitoring
MoH guidelines
curated + embedded corpus
Audit log · every query & response · GCP · GKE · Vertex AI · Terraform · Monitoring
Audit log
every query & response
clinical question
in-scope + domain
guideline context
embeddings
log
grounded answer + guideline refs
graceful refusal
Legend
External
Backend
Database
Security
Ready
Chapter 01 / 01
Guided chapter
Diagram guide
Explore this system
×
Inspecting compiled semantics
01
Find any node Search labels, responsibilities, kinds, and stable IDs.
/
02
Trace a route Ask how two semantic nodes connect in authored direction.
R
03
See the whole system Open Semantic Radar with a live viewport and stable nodes.
M
04
Compare semantic kinds Count roles, reveal their traffic, and compare direct authored links.
L
05
Play the guided story Walk the authored chapters and real relationships.
P
06
Enter Presentation Stage Give the live diagram the viewport without changing export.
F
E ExportT ThemeS Style0 Reset+ Zoom in- Zoom outEsc Close
Find a node
×
⌕
/
No matching nodes
Semantic passport
Authored reach
Upstream 0
Downstream 0
×
Copy link
Relations
Route probe
Choose a start node
Find start
Copy link
Clear
Pick two semantic nodes on the diagram
←
▶
Journey
→
Overview
Choose the source, then the destination. Direction matters.
Semantic lens
Compare system roles
×
Choose up to two semantic kinds. One reveals its real traffic; two compare only direct authored relationships.
Choose a kind to inspect its nodes and touching relationships.
Copy link
Clear
Semantic radar
Building overview
×
Click node Drag to pan
PATH
MAP
LENS
⌕
?
−
100%
+