Inspiration

The inspiration for Medaid comes from the critical healthcare gap in rural and underserved communities, particularly in India. Access to timely medical advice is often hindered by a shortage of doctors, geographic distance, and linguistic barriers. We saw an opportunity to use modern AI to create a reliable first point of contact for individuals in these areas, helping them understand the urgency of their symptoms and guiding them toward appropriate care. The goal was to build a tool that is not just technologically advanced but also safe, trustworthy, and contextually aware of the challenges in rural healthcare.

What it does

Medaid is an AI-driven, multimodal health triage assistant designed for rural users. It functions as a web application where a user can:

  • Describe Symptoms: Input their health concerns using free text or by uploading a medical report (like a blood test).
  • Receive an AI Assessment: The system analyzes the provided information and generates a structured triage assessment. This includes a risk level (Low, Medium, High, or Emergency), a list of possible conditions with confidence scores, a simple explanation for its reasoning, and actionable recommendations.
  • Get Local Facility Recommendations: For medium-to-high risk cases, the app finds and displays a list of nearby hospitals and clinics, using the user's pincode to provide relevant, real-time results.
  • Download a Health Passport: The user can download a PDF summary of their entire consultation for their personal records or to share with a doctor.

How we built it

Medaid is built on a modular Python backend with a Streamlit frontend. The architecture was designed with a "safety-first" philosophy.

Technical Stack: The project uses Python, Streamlit for the UI, and a MongoDB database with a local JSON fallback for data persistence. The core AI uses Google's Gemini model via the LangChain framework. Report processing is handled by OCR modules, and facility lookups use a robust system that queries the Google Maps API and falls back to OpenStreetMap if needed.

Hybrid AI & Safety Layer: The core of the system is a multi-layered AI. User input is first checked by a deterministic safety layer that scans for hardcoded emergency keywords (e.g., "severe chest pain"). If an emergency is detected, it immediately overrides the AI and flags the case as critical. For non-emergency cases, the user's symptoms, history, and any extracted lab data are sent to the Gemini LLM to generate the nuanced medical assessment.

Hyper-Local Contextualization: The system is tailored for rural India by including a knowledge base that maps local and Hindi terms (like pet dard) to standardized medical concepts, ensuring the AI understands vernacular language.

Challenges we ran into

  • Ensuring AI Safety and Reliability: Our biggest conceptual challenge was mitigating the risk of a generative AI giving incorrect or harmful advice. We solved this by designing the deterministic safety layer, which acts as a non-negotiable check on all inputs before the LLM is even involved.
  • API Integration and Configuration: We encountered several technical hurdles with API integrations, particularly the "REQUEST_DENIED" errors from the Google Maps Platform. This required a systematic debugging process to verify API enablement, billing account status, and key restrictions in the Google Cloud Console.
  • Real-Time Recommendations: Building a reliable facility recommender was challenging. We initially relied on a single API, but to make the system more robust, we engineered a fallback mechanism that switches from Google Maps to OpenStreetMap, ensuring the feature remains available even if one service fails.

Accomplishments that we're proud of

We are most proud of creating a system that is not just technologically capable but also designed with a deep sense of responsibility and user context.

The Safety-First Architecture: The hybrid model of a fast, deterministic rule-based engine combined with a powerful reasoning LLM is our biggest accomplishment. It provides a strong guarantee of safety in critical situations.

Robustness and Resilience: The system is engineered to be highly reliable. The database falls back from MongoDB to a local file, and the recommendations module falls back from Google to OpenStreetMap. This ensures the application can function even with intermittent connectivity or service failures.

Context-Aware Design: We are proud of the focus on making the AI truly useful for its target audience by integrating vernacular language support and providing location-aware recommendations relevant to rural infrastructure (e.g., Primary Health Centers).

What we learned

Modern AI is System Architecture: The most valuable work was not in training a model from scratch, but in thoughtfully architecting a complete, safe, and usable system around a powerful pre-trained foundation model.

Safety is Not an Add-on: For high-stakes applications like healthcare, safety cannot be an afterthought. Integrating a deterministic, rule-based safety layer from the beginning is a critical design principle for responsible AI.

Modularity is Key: Building the application in independent modules (database.py, recommendations.py, report_processor.py, etc.) was essential. It allowed us to debug and upgrade individual components without breaking the entire system and enabled a clean separation of concerns.

What's next for Medaid

Clinical Validation: The most important next step is to conduct a formal clinical validation study. We plan to evaluate the system's triage accuracy by comparing its recommendations against those of qualified physicians on a large set of anonymized patient cases.

Enhanced Multilingual and Voice Support: We will improve the system's ability to natively understand and respond in multiple Indian languages (like Hindi, Marathi, etc.) without relying on an intermediate translation step. This will involve fine-tuning models specifically for local dialects.

Integration with Point-of-Care Devices: We envision a future version that can directly ingest readings from common medical devices (like digital oximeters or glucometers) to further enrich the data provided to the AI and improve assessment accuracy.

Built With

Share this project:

Updates