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
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.
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.
Upload → Parse → Generate → Review → Engage
- Upload — Coordinator uploads a clinical trial protocol PDF
- Parse — Gemini detects diagnostic area, extracts endpoints, visits, adverse events, and drug info
- Generate — AI creates a plain-language patient summary with protocol section citations
- Review — Coordinator reviews, edits, and approves — nothing reaches patients without human sign-off
- Engage — Patient accesses summary, wellness plan, and Q&A chatbot grounded in the approved protocol
- 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
| 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 |
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
- Python 3.10+
- Node.js 18+
- Gemini API key from Google AI Studio
cd backend
pip install -r requirements.txt
export GEMINI_API_KEY=your_api_key_here
uvicorn main:app --reload --port 8000cd frontend
npm install
npm startThe frontend runs on http://localhost:3000 and the backend API on http://localhost:8000.
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
- 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
Swaraj Patil Prithvi Poojari Shubham Hadawle
MIT