Inspiration

As computer science students, we have always been driven by the idea of "preventative engineering"—the concept that we should use data to stop failures before they happen. During our research into high-impact AI applications, we discovered a staggering "billion-dollar bottleneck": nearly 90% of clinical trials fail, often due to protocol design flaws that were visible in historical data but missed by human review.

We were inspired to build TrialGuard to act as a "digital safety net." We wanted to leverage Google Gemini 3.0’s reasoning capabilities to compare new protocols against decades of failed trials, turning past mistakes into a roadmap for future medical success.

What it does

How we built it

TrialGuard is a production-grade web application built with a modern, decoupled architecture designed for scale and real-time feedback.The Brain: We integrated Google Gemini 3.0 via a dedicated FastAPI service. Gemini acts as our lead clinical strategist, performing deep-tissue analysis of complex protocol PDFs. The Data Engine: We curated a specialized database of 20+ historical trials across Oncology, Cardiology, and Psychiatry. We developed a similarity-matching algorithm to cross-reference current protocols with specific failure modes, such as high placebo response or biomarker selection errors.

The Real-Time Frontend: Built with React 18 and Vite, the UI provides an interactive experience. We used Server-Sent Events (SSE) to provide live updates as the AI moves from searching historical databases to generating quantified risk scores.

Challenges we ran into

Our most significant challenge was Data Extraction & Standardization. Clinical protocols are often 50+ page PDFs with varying formats. Initially, the AI struggled to consistently extract statistical power and inclusion criteria.

We solved this by building a Multi-Step Extraction Pipeline. Instead of one large prompt, we broke the process down: one pass for Basic Info, one for Study Design, and another for Statistical Plans. We also implemented an Interactive Review step, allowing users to verify the AI's extracted data before the final analysis, ensuring the "Ground Truth" remained accurate.

Accomplishments that we're proud of

We are incredibly proud of our journey in transforming a complex concept into a production-ready, full-stack application within the intense timeline of a hackathon. By integrating a FastAPI backend with a modern React 18 frontend, we moved beyond a simple prototype to deliver a containerized system capable of handling real-world clinical workflows. One of our most significant technical milestones was engineering a multi-step extraction pipeline that successfully navigated the "PDF bottleneck." This allowed us to digest protocols exceeding 50 pages by breaking the analysis into specialized micro-extractions, ensuring high-fidelity data capture that traditional single-prompt methods often miss.

Furthermore, we achieved a high level of scientific accuracy by implementing a strict verification layer for our agentic AI. By forcing our models to ground their reasoning in molecular properties from DrugBank and historical outcomes from ClinicalTrials.gov, we effectively mitigated hallucinations and ensured every recommendation was rooted in fact.

What we learned

Building TrialGuard taught us that User Experience (UX) is just as important as the underlying AI. A risk score is useless if the researcher doesn't trust it. By building features like the Findings Timeline and the Interactive Chat Assistant, we learned how to create "Explainable AI"—where the user can ask "Why is this a high risk?" and receive a cited, evidence-based answer.

This project merged our academic focus on Data Structures with the practical realities of DevOps and Cloud Deployment, resulting in a tool that is ready for real-world impact.

What's next for TrialGuard

Moving forward, our goal is to evolve TrialGuard from a diagnostic tool into a comprehensive execution platform. We are aiming to implement Real-World Evidence (RWE) integration to match protocols with actual patient cohorts and Regulatory Automation to auto-generate submission-ready IND/NDA documentation.

However, our most ambitious next step is the development of the "Adversarial Trial Saboteur." Instead of just identifying known risks, we are building an agentic module designed to actively "stress-test" a trial’s integrity. This agent will simulate "black swan" events—from geopolitical disruptions and cold-chain supply failures to rare pharmacogenomic contraindications—forcing the protocol to prove its resilience before a single dollar is spent. By playing "devil’s advocate," TrialGuard will ensure that a study isn't just good on paper, but virtually "unbreakable" in the real world.

Built With

Share this project:

Updates

Submission history