Inspiration
Clinical trials are often the best and sometimes only option for people facing tough medical battles, yet 93 percent of adult cancer patients never get into one. At the same time, 86 percent of clinical trials fall behind on signing people up, which costs drug developers up to $8 million for every single day a treatment is delayed.
We noticed two giant walls standing in the way:
- The Jargon Wall: Over 450,000 studies are sitting on registries like ClinicalTrials.gov, written in heavy medical code that leaves more than 70 percent of patients totally lost.
- Privacy Fear: People are understandably scared to hand over sensitive health records, personal diagnoses, and genetic details to third-party apps that might store or sell their personal health data.
We built TrialAgent NLP to fix this. It is an explorer that translates everyday, normal language into live clinical trial matches without ever saving a single byte of patient data.
What it does
TrialAgent NLP is a zero-database, privacy-first clinical trial explorer that takes a simple, plain-language note and guides patients straight to an informed doctor visit in seconds. For every qualifying trial, it explicitly outputs every single eligibility requirement, comprehensive study details, and direct site contact information so families can take immediate action.
- Complete Requirements, Details and Direct Contacts: For every study that fits a patient's profile, TrialAgent displays the full breakdown of every trial requirement, complete study summaries, and direct contact info for the clinic running it.
- Plain-Language Input: Users just type out what is going on in normal words (like a 62-year-old dad with Stage IV lung cancer and an EGFR deletion near Boston) without needing to look up medical billing codes.
- Human-in-the-Loop Verification Gate: Before running any search, TrialAgent shows the extracted medical details—like the condition, stage, biomarkers, and location—so the user can check, edit, or confirm them first.
- Explicit Matching: Instead of guessing behind the scenes, TrialAgent looks at the official rules and highlights every requirement that is guaranteed and explicitly matching based on the user's verified profile.
- 5 Tailored Doctor Questions: For every matched trial, TrialAgent writes five specific questions tailored to that exact study so patients walk into their next appointment ready to talk to their care team.
How we built it
We designed TrialAgent NLP around a 100 percent stateless setup with zero user logins and zero database storage, powered by this core tech stack:
- Next.js
- TypeScript
- Tailwind CSS
- FastAPI (Python)
- Gemini API
- ClinicalTrials.gov API v2
Challenges we ran into
- Messy Rules Text: The official rules for clinical trials are written as long, messy blocks of text. Teaching the system to read through complicated rules without getting confused took a lot of careful prompt setup and fallback checks.
- Preventing Guesses: Early test versions occasionally guessed that a patient met lab number requirements even if they weren't mentioned. We had to enforce a strict rule: if a data point is not explicitly in the verified note, it gets flagged for a doctor's review instead of being assumed.
- Keeping It Fast Without Saving Data: Since we do not use a database to store pre-loaded trial data, pulling live federal records and evaluating them on the fly meant optimizing our backend code to keep things lightning fast.
Accomplishments that we're proud of
- Zero-Data Privacy: Proving that helpful medical tools do not need invasive accounts, tracking cookies, or permanent databases to be useful.
- The Verification Checkpoint: Building a quick review step that puts the patient completely in control of their own profile before any search runs.
- Radical Transparency: Replacing black-box match scores with clear requirement checklists, full study details, and direct contact paths that empower better doctor-patient conversations.
What we learned
- Trust Comes From Being Honest: In medical software, being totally clear about what is verified versus what needs a doctor's chart review is much safer and more professional than giving a fake percentage score.
- Humans Need to Stay in the Loop: Even smart technology can misread medical shorthand. Giving users a quick confirmation step makes a massive difference in accuracy and confidence.
- Privacy Makes Things Simpler: Building without a database from day one eliminated huge security headaches and kept the whole user experience super clean and fast.
What's next for TrialAgent NLP
- Client-Side Lab Imports: Allowing patients to temporarily drop in their lab results right in their browser window to automatically check lab rules, still with zero server-side storage.
- Expanding Specialties: Expanding past oncology to help people find trials for rare diseases, heart conditions, and neurology.
- Multilingual Support: Helping families search and read trial summaries in Spanish, Mandarin, and other languages while still pulling accurate records from English-language registries.
Built With
- claude
- clinicaltrials.gov
- css
- fastapi
- gemini
- next.js
- python
- tailwind
- typescript