Back to Projects

HeartGuard AI

Your AI-Powered Heart Health Companion — Built for Accuracy, Privacy, and Trust

PythonFastAPILangGraphMedGemmaPostgreSQLRedisChromaDBDocker
55K+
Lines of Code
220+
Python Files
50+
API Endpoints
10
AI Agents
views
Be the first to rate

What is HeartGuard AI?

HeartGuard AI is an intelligent medical chatbot built specifically for heart health. Unlike regular chatbots that guess answers, HeartGuard actually retrieves real medical knowledge, verifies its own answers, and cites trusted sources — just like a doctor would.

Why Is This Different?

The Problem

Regular AI chatbots hallucinate — they make up medical facts that sound right but are wrong. In healthcare, that can be dangerous.

Our Approach

HeartGuard uses a Self-Correcting RAG pipeline — it searches real medical literature, then grades its own answer for accuracy before responding.

The Result

Medically grounded answers with citations, reduced hallucinations, and a system that admits when it's not sure — rather than guessing.

What Can It Do?

Smart Medical Chat

Ask any heart-health question and get a well-researched, cited answer — not a guess.

Heart Risk Prediction

Enter your vitals and get an AI-powered risk assessment with explainable results.

Drug Interaction Alerts

Check if your medications are safe together. Powered by FDA safety databases.

Patient Memory

Remembers your medical history across sessions — no need to repeat yourself.

Emergency Triage

Describes symptom urgency using the real ESI triage system used in hospitals.

HIPAA Compliant

All data is encrypted, PII is auto-scrubbed, and access is tightly controlled.

The Toughest Bug I Fixed

The "Infinite Loop" Problem: The Critic Agent was too strict — it kept rejecting answers and asking for more citations, but the Research Agent kept returning the same sources. This created an endless loop.

My Solution: I built a "Confidence Decay" mechanism. If the Critic rejects an answer twice, the system switches to a "Safe Uncertainty" mode — it honestly tells the user it couldn't find a perfect answer, rather than getting stuck forever. This made the system 100% more reliable.