Inspiration Over 90% of adult cancer patients never participate in a clinical trial—not because eligible studies don't exist, but because registries like ClinicalTrials.gov are buried in dense medical jargon and overwhelming inclusion and exclusion criteria. On top of that, most existing matching platforms force patients to create accounts and hand over sensitive health information to centralized databases. We wanted to build a calm, educational tool that helps patients and families explore live clinical research in plain language without ever sacrificing their privacy.

What it does TrialAgent NLP is a privacy-first, zero-database clinical trial explorer that turns plain-language patient notes into structured, verified study matches:

Plain-Language Input: Users describe their condition, stage, biomarkers, or preferred city in their own words.

Human-in-the-Loop Verification: Before any search runs, TrialAgent shows the exact medical details pulled from the note so the user can review, edit, or confirm them—stopping silent AI mistakes before they happen.

Live Registry Search: Pulls active, recruiting studies straight from the official ClinicalTrials.gov API v2.

Honest Eligibility Breakdowns: Organizes study criteria into three clear buckets—Met, Unmet, and Unknown (such as missing lab results)—instead of giving false certainty.

Tailored Doctor Questions: Generates five context-aware questions for the patient to bring to their oncologist or research coordinator.

How we built it We built TrialAgent around a stateless, zero-persistence setup so user health data is never saved to a database or browser storage:

Frontend & Interface: Built with Next.js, TypeScript, and Tailwind CSS, featuring a clean, accessible layout deployed on Vercel.

NLP & AI Pipeline: Combined structured LLM extraction with rule-based normalization to translate everyday clinical descriptions into standardized search parameters (condition, biomarkers, stage, location) and generate tailored doctor questions.

Live Data Connection: Connected directly to the ClinicalTrials.gov REST API v2 to fetch real-time recruiting status, locations, and eligibility text rather than relying on a stale local copy.

Educational Resources: Added a built-in Learning Library linking directly to official NIH, NCI, and ClinicalTrials.gov guides alongside clear medical disclaimers.

Challenges we ran into

Balancing Accuracy with Safety: Clinical trial eligibility rules often involve tricky boolean logic, like prior treatment exclusions or specific biomarker cutoffs. Getting our parser to clearly separate a confirmed mismatch from an "unknown" missing lab value—without overpromising eligibility—took careful prompt tuning and strict guardrails.

Keeping Everything Stateless: Passing data cleanly across our three-step flow (Describe -> Check -> Explore) without writing anything to a database or logging personal health information meant designing lightweight, temporary request payloads from scratch.

Cleaning Up Registry Text: ClinicalTrials.gov records vary wildly in how their eligibility criteria are formatted, so we had to build reliable text normalization to turn walls of raw protocol text into readable summaries.

Accomplishments that we're proud of

True Privacy by Design: Building a completely database-free workflow where sensitive health notes exist only in memory during the active session.

The Verification Step: Creating an interactive "Check" screen that puts the patient in control of how the AI reads their medical details before any search goes out.

Shipping End-to-End: Launching a clean, responsive web app with live ClinicalTrials.gov integration, clear eligibility categories, and built-in patient education guides.

What we learned

Transparency Builds Trust in Healthcare AI: Patients don't want a black-box "95% match" score; showing why a requirement is met, unmet, or unknown builds real confidence and leads to much better conversations with doctors.

Human-in-the-Loop UX Catches Errors Early: Letting users verify extracted details upfront dramatically improves search accuracy and prevents silent NLP misinterpretations.

What's next for TrialAgent NLP

Distance & Travel Radius Filters: Adding location radius filtering so patients can easily find nearby trial sites or look for studies that offer travel support.

Multilingual Support: Expanding plain-language input and translated eligibility summaries to make clinical research accessible to non-English-speaking patients and families.

Printable Oncologist Summary: Generating a clean, client-side one-page PDF of matched trials and tailored questions that patients can print and bring straight to their next appointment.

Built With

  • claude
  • clinicaltrials.gov-api
  • large-language-models-(llms)
  • natural-language-processing-(nlp)
  • next.js
  • react
  • tailwind-css
  • typescript
  • vercel
Share this project:

Updates

Submission history