Client
Industry
Duration
Delivered by
Built a Python backend integrating OpenAI GPT for real-time, domain-specific medical Q&A with context-aware prompting tailored for both clinical professionals and patients. Deployed full stack on Microsoft Azure App Service.
AbelMed needed a medical Q&A chatbot that could serve both clinical professionals and lay patients — two audiences with radically different vocabulary, risk tolerance, and information needs. Generic LLM responses were unsafe in a clinical context. The system needed domain-specific prompting, response guardrails, and the ability to clearly differentiate between clinical guidance (for professionals) and simplified explanations (for patients), while avoiding liability-triggering language.
We built a FastAPI backend with a dual-mode prompting architecture: the system detects user context (clinical vs. patient) and selects a matching prompt template that adjusts language, detail level, and safety disclaimers automatically. GPT-4 is called with a constrained system prompt that prevents speculative diagnoses and enforces source attribution. All conversations are persisted in Azure CosmosDB for audit trails. The React frontend provides a clean chat interface with session history.
