Agada: Your Digital Antidote

Digital Medical Representative – An AI Agent for Healthcare Professionals


Inspiration

Healthcare professionals in India operate in fast-paced, high-stakes environments where timely and accurate medical information is critical. While basic drug information is widely available, essential insights—such as drug interactions, reimbursement likelihood, and Indian market–specific context—remain fragmented across multiple sources or locked inside static databases.

We were inspired to build Agada, a Digital Medical Representative that goes beyond simple search. Instead of returning isolated facts, Agada understands, verifies, and synthesizes medical data to deliver actionable insights tailored to Indian healthcare workflows. Our goal is to bridge the gap between static pharmaceutical datasets and the dynamic, safety-critical nature of real-world medical decision-making.


What It Does

Agada is an intelligent medical assistant designed to support doctors and pharmacists with reliable, safety-first information.

  1. Comprehensive Medical Uses
    Aggregates indications from multiple trusted medical sources to present a complete and clinically relevant view of what a drug treats.

  2. Critical Warnings and Precautions
    Explicitly extracts contraindications, pregnancy warnings, and drug–drug interactions, ensuring patient safety is always prioritized.

  3. Smart Reimbursement Estimation
    Instead of relying on static reimbursement tables, Agada uses a heuristic-based approach. It analyzes a drug’s classification (generic vs. branded) and price point to estimate eligibility tiers under Indian government schemes such as Ayushman Bharat and CGHS, closely simulating real-world insurance desk decision logic.

  4. Hybrid Retrieval Strategy
    Prioritizes verified local datasets (CSV) and seamlessly falls back to strictly curated web sources (such as 1mg, Apollo, and MedlinePlus) when local data is unavailable.

  5. Safe Answer Synthesis
    Uses Llama 3 (via Groq) to read multiple medical sources and generate concise, source-grounded summaries without hallucinating facts.


How We Built It

Agada is built using a Hybrid Retrieval-Augmented Generation (RAG) architecture to ensure accuracy, speed, and reliability.

Technology Stack

  • Backend: Python, FastAPI
  • Large Language Model: Llama 3.3 70B (via Groq API) for low-latency inference
  • Search Engine: DuckDuckGo Search with strict medical-domain filtering
  • Frontend: HTML with a responsive, medical-grade UI
  • Data: Custom Indian Medicine Dataset (CSV) combined with real-time web retrieval

Architecture Flow

  1. Intent Recognition
    The agent analyzes the user’s query to determine the required clinical and contextual information.

  2. Local Knowledge Base First
    Queries a curated knowledge_base.json and CSV dataset containing verified Indian medicine data.

  3. Smart Web Search
    If required information is missing, a controlled web retrieval process is triggered with an exponential backoff mechanism to handle rate limits gracefully.

  4. LLM Synthesis
    Retrieved content is passed to the LLM using a strict system prompt to extract structured, source-grounded medical data.

  5. Smart Merge
    Reliable static data (price, manufacturer) is merged with dynamic web-derived insights (warnings, precautions) to form a comprehensive response.


Challenges We Ran Into

  1. Web Rate Limits
    Reliable medical sources frequently trigger search rate limits. This was addressed using a robust exponential backoff retry strategy to handle 202 rate-limit errors.

  2. Data Consistency
    Combining structured CSV data with unstructured web content required careful trust boundaries. Static fields are sourced from datasets, while descriptive clinical fields rely on web extraction.

  3. Hallucination Risks
    To prevent fabricated medical facts, strict source-grounding rules were enforced, allowing the model to extract only information present in retrieved snippets.


Accomplishments

  • Sub-Second Latency achieved through Groq’s LPU-based inference
  • Robust Error Handling via self-healing web retrieval logic
  • Safety-First Design ensuring warnings and precautions are never skipped
  • Seamless User Experience hiding backend complexity behind a clean interface

What We Learned

  • Hybrid systems outperform purely static or purely web-based approaches
  • Low latency is essential for trust in clinical settings
  • Medical AI must prioritize contraindications and safety logic by design

What’s Next for Agada

  • Multilingual support Hindi, Telugu, Tamil and other Indian Languages for broader accessibility
  • Prescription OCR for instant digitization and analysis
  • Real-time pharmacy stock integration
  • Voice-based interaction for hands-free clinical use

Built With

Share this project:

Updates