MeddAI: Medical Content Creator

Project Overview

MeddAI is an AI-powered web application built to generate trustworthy, citation-ready medical content for healthcare professionals, students, and the public. It uses a FastAPI backend with Python, orchestrates multiple AI agents using LangGraph, and integrates Google Gemini and OpenAI GPT-4o for content generation and validation. Perplexity AI is used for research when no external references are provided.

The platform accepts inputs like URLs, DOCX/PDF files, and YouTube videos. It performs real-time source extraction, automated medical accuracy checks, and delivers AMA-style formatted articles. A REST API interface allows seamless content requests by both technical and non-technical users.

Challenge & Solution

Validating Medical Accuracy

Problem: Risk of generating inaccurate or non-compliant content.
Solution: Implemented GPT-4o for post-generation validation, checking factual accuracy, AMA citation format, and readability. Invalid drafts are automatically flagged and returned with issue logs.

Ingesting Multiple Content Types

Problem: Required support for diverse sources like PDFs, DOCX, and videos.
Solution: Integrated Firecrawl (web), PyPDF2/python-docx (documents), and RapidAPI (YouTube) for seamless ingestion and parsing.

Dynamic Audience Adaptation

Problem: One-size-fits-all tone fails across user groups.
Solution: Language generation dynamically adjusts tone and jargon to fit doctors, students, patients, or general public based on the request context.

Creating Citation-Enforced Content

Problem: Generated content lacked scholarly reference formatting.
Solution: Google Gemini is instructed with strict prompting to embed in-text citations and meet academic formatting standards.

Tech Stack Implementation

Frontend

Any Client (React.js, Postman, etc.): Sends requests and renders article output.

Step 1

Backend

FastAPI: Handles endpoints for article generation, extraction, and health checks.
LangGraph: Orchestrates the multi-step workflow (input → research → generation → validation).

Step 2

AI Models

Google Gemini: Generates draft content.
OpenAI GPT-4o: Validates content for factual accuracy and formatting compliance.

Step 3

External APIs

Perplexity: Literature search fallback
Firecrawl: Web scraping
RapidAPI: YouTube transcription

Step 4

AI Recommendation Engine

Automatically assigns the appropriate workflow depending on input type (URL, PDF, DOCX, video).
Google Gemini handles generation with word count accuracy (±10%).
GPT-4o performs error detection and citation validation.
Perplexity is triggered when no external source is available.

Step 4

Security

Asynchronous validation and rate-limiting for abuse protection.
API keys and endpoints are protected with secure access layers.
User data is handled with HIPAA-conscious security best practices.

Step 4

Results & Value

1

Evidence-Based Articles: Drafts are verified and citation-compliant using AMA formatting.

2

Source-Aware Ingestion: Pulls from multiple file types and sources automatically.

3

Flexible for All Users: Adapts tone and technical depth for all audiences.

4

API Integration: Ready for integration into EMR systems, LMS platforms, or third-party content hubs.

Scroll to Top