As part of a 5-person team, I helped build MEDAI, a Clinical Decision Support system powered by RAG (Retrieval-Augmented Generation), focused on depression and suicide risk screening in adults, grounded entirely in the official USPSTF June 2023 clinical guideline.
The goal was to help healthcare professionals access reliable, evidence-based screening guidance quickly and safely — without the AI ever fabricating information that isn't actually in the source material.
Key things I/we built:
A knowledge base of 1,806 evidence chunks extracted from the official USPSTF guideline, each anchored to its original source page.
A hybrid retrieval pipeline combining dense semantic search (ChromaDB) with sparse keyword search (BM25), merged via Reciprocal Rank Fusion.
A cross-encoder reranking layer for precision-tuned results, with population-aware boosting for specific groups (perinatal, older adults).
Deterministic safety gates that run before any LLM call: crisis-language detection routes users directly to the 988 Suicide & Crisis Lifeline (US) and Egypt's crisis hotline (08008880700); medication/dosage questions are refused and redirected to a licensed prescriber.
A citation verification system: every generated claim is checked verbatim against the original source text before being shown to the user — if it doesn't match, it's scrubbed from the response.
A confidence gate (threshold 0.76): when the system isn't confident enough in an answer, it declines rather than guessing.
A fully deployed web application (Frontend on Vercel + FastAPI backend), live and publicly testable.
Results: 94% pass rate on a 16-query evaluation benchmark, 9/9 on safety gate accuracy, 100% of citations verified, zero hallucinations.
Built as part of an AI Hackathon organized by Orange Digital Center Egypt, CREATIVA, and Instant Software Solutions, in partnership with ITIDA and TIEC.