Skip to content

Swaraj-Patil/TrialCompanion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TrialCompanion AI

Gemini-powered platform that transforms dense clinical trial protocols into plain-language patient summaries, wellness plans, and protocol-grounded Q&A.

  • Built at MIT Frontier Hackathon 2026

The Problem

Clinical trial patients receive jargon-heavy protocols averaging 50+ pages. Patients frequently misunderstand visit schedules, adverse event reporting, and treatment details. Research coordinators spend hours manually explaining protocols and fielding repetitive questions. No existing tool uses AI to bridge the gap between complex trial data and patient understanding.

Our Solution

TrialCompanion AI lets coordinators upload a protocol PDF — the AI parses its regulatory structure, detects the diagnostic area, and generates patient-facing content with citations to specific protocol sections. Every AI output goes through human approval before reaching patients.

How It Works

Upload → Parse → Generate → Review → Engage
  1. Upload — Coordinator uploads a clinical trial protocol PDF
  2. Parse — Gemini detects diagnostic area, extracts endpoints, visits, adverse events, and drug info
  3. Generate — AI creates a plain-language patient summary with protocol section citations
  4. Review — Coordinator reviews, edits, and approves — nothing reaches patients without human sign-off
  5. Engage — Patient accesses summary, wellness plan, and Q&A chatbot grounded in the approved protocol

Core Features

  • Smart Protocol Parser — Auto-detects diagnostic area (oncology, cardiovascular, etc.) and extracts structured data from protocol PDFs
  • Plain-Language Summary — Generates jargon-free patient explanations citing specific protocol sections
  • Human Approval Gate — Coordinator review screen with approve/edit/flag controls
  • Protocol-Grounded Q&A — Patients ask questions in plain language; AI answers strictly from the approved protocol
  • Trial Wellness Plan — Personalized visit schedules, dietary guidance, and symptom tracking derived from the protocol
  • Comprehension Check — Auto-generated quiz measuring patient understanding with scores on the coordinator dashboard

Tech Stack

Layer Technology
AI Model Gemini 2.5 Pro (parsing, summaries, Q&A), Gemini Flash (quiz generation)
Backend Python, FastAPI
Frontend React, Tailwind CSS, shadcn/ui
Deployment Google Cloud Run

Project Structure

trialcompanion/
├── backend/
│   ├── main.py              # FastAPI app with /upload, /generate, /ask endpoints
│   ├── prompts.py           # System prompts for Gemini (parser, summary, Q&A)
│   ├── parser.py            # Protocol PDF parsing logic
│   └── requirements.txt
├── frontend/
│   ├── src/
│   │   ├── pages/
│   │   │   ├── Upload.jsx           # Protocol upload screen
│   │   │   ├── CoordinatorReview.jsx # Review and approve AI output
│   │   │   ├── PatientSummary.jsx    # Patient-facing summary + Q&A
│   │   │   └── Dashboard.jsx         # Comprehension scores + metrics
│   │   ├── components/
│   │   └── App.jsx
│   └── package.json
└── README.md

Getting Started

Prerequisites

Backend Setup

cd backend
pip install -r requirements.txt
export GEMINI_API_KEY=your_api_key_here
uvicorn main:app --reload --port 8000

Frontend Setup

cd frontend
npm install
npm start

The frontend runs on http://localhost:3000 and the backend API on http://localhost:8000.

Demo Protocol

We demo with a real oncology Phase 2 immunotherapy trial protocol sourced from ClinicalTrials.gov (NCT05132127).

Sample Q&A interactions:

  • "Can I exercise during treatment?" → AI responds citing Section 6.3
  • "What side effects should I watch for?" → AI lists adverse events from Section 8.2
  • "How often do I need to come in?" → AI provides visit schedule from Section 5.1

Design with Ethics

  • Human-in-the-loop — All AI-generated content requires coordinator approval before patient access
  • Protocol-only grounding — AI never gives medical advice or information beyond the uploaded protocol
  • Blinding preservation — System never reveals treatment assignments or unblinded data
  • Transparent citations — Every AI statement references the specific protocol section it draws from
  • Comprehension tracking — Quiz scores and engagement metrics help coordinators identify patients who need additional support

Team

Swaraj Patil Prithvi Poojari Shubham Hadawle

License

MIT

About

Gemini-powered platform that transforms dense clinical trial protocols into plain-language patient summaries, wellness plans, and protocol-grounded Q&A. Built at MIT Frontier Hackathon 2026

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors