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
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.
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.
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.
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 1Backend
FastAPI: Handles endpoints for article generation, extraction, and health checks.
LangGraph: Orchestrates the multi-step workflow (input → research → generation → validation).
AI Models
Google Gemini: Generates draft content.
OpenAI GPT-4o: Validates content for factual accuracy and formatting compliance.
External APIs
Perplexity: Literature search fallback
Firecrawl: Web scraping
RapidAPI: YouTube transcription
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.
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.