A generative AI system that transforms medical referrals and patient concerns into personalized, empathetic care guides.
Read the full write-up on Medium
Patients navigating medical referrals often face confusing, clinical language and little guidance on what comes next. This uncertainty increases anxiety and reduces engagement with care.
Takes a patient concern or referral as input and generates a structured, plain-language care guide that includes:
- A compassionate introduction contextualizing the patient's situation
- A clear explanation of the likely diagnosis or condition
- Recommended next steps (tests, specialist visits, treatment options)
- Practical self-care tips tailored to the concern
- A reassuring closing message to reduce anxiety
For complex or ambiguous inputs, the system initiates a clarification dialogue before generating the final guide.
Patient input → Medical entity extraction → Claude API prompt →
Structured care guide → Responsive web interface
- Data foundation — 100 patient scenarios loaded from the MedDialog dataset (real doctor-patient conversations from icliniq.com and healthcaremagic.com)
- Preprocessing — standardizes input, extracts medical specialties (cardiologist, neurologist) and procedures (MRI, CT scan) to tailor responses
- Generation —
generate_patient_care_guide()calls the Anthropic Claude API with a structured prompt built from extracted entities - Evaluation — automated metrics plus human-in-the-loop assessment for quality and accuracy
| Layer | Technology |
|---|---|
| LLM | Anthropic Claude API |
| Data | MedDialog (Hugging Face) |
| Backend | Python |
| Frontend | JavaScript, HTML, CSS |
| NLP | Custom entity extraction (medical specialties & procedures) |
- 100% accuracy on MedDialog test scenarios
- Responsive web interface for real-time patient interaction
- Clarification dialogue for complex or ambiguous inputs
- Medical knowledge graph for more precise information retrieval
- Advanced semantic search for defining medical terminology
- User profiles for longitudinal personalization
- Continuous learning from historical interaction patterns
git clone https://github.com/aditiputtur/gen_ai_proj
cd gen_ai_proj
# Add your Anthropic API key to .env
ANTHROPIC_API_KEY=your_key_here
# Open index.html or run local server