CuraMatch — AI-Powered Clinical Trial Matching Engine

Inspiration

Every year, thousands of patients miss potentially life-changing clinical trials because eligibility criteria are buried in dense medical language and trial sites may be geographically inaccessible. At the same time, nearly 80% of trials struggle to meet recruitment timelines.

We were inspired by the gap between patients actively searching for better treatment options and the complexity of trial databases. For chronic conditions like Type 2 Diabetes, there are thousands of active studies — but discovering and understanding them is overwhelming. We wanted to build a system that turns clinical trial eligibility into something transparent, explainable, and accessible.


What It Does

CuraMatch translates patient information into structured medical features, computes probabilistic eligibility scores across active U.S. trials, and returns ranked, geographically accessible matches with clear explanations.

Instead of returning a simple list of trials, CuraMatch shows:

  • A match probability score
  • A breakdown of which criteria were met or missed
  • Location-aware ranking
  • Plain-language explanations of eligibility

How We Built It

1. Data Pipeline

We pulled recruiting U.S.-based trials and cleaned eligibility text using a structured parsing pipeline. Trial data was processed and stored in a Databricks-backed Spark table. To test our scoring logic, we also built a synthetic patient data generator.

2. Structured Parsing & Rules Engine

We manually analyzed 15–20 Type 2 Diabetes trials to identify common eligibility phrasing patterns. From that analysis, we built a regex-based parser that extracts:

  • Age ranges
  • HbA1c thresholds
  • BMI limits
  • Medication requirements and exclusions
  • Geographic site data

Each trial is converted into a structured JSON representation.

We implemented a hard exclusion gate: if a patient triggers a disqualifying condition (e.g., pregnancy, Type 1 diabetes, recent cardiovascular event), the trial score is immediately set to 0.

3. Probabilistic Scoring Model

Matching uses a hybrid three-layer system:

  1. Hard Exclusions (binary gate)
  2. Structured Eligibility (75%) — rule-based scoring for age, HbA1c, BMI, medications, and geography
  3. Semantic Similarity (25%) — embeddings of patient summaries and trial eligibility text

Semantic similarity is computed using cosine similarity:

$$ \text{cosine_similarity}(A, B) = \frac{A \cdot B}{|A| |B|} $$

The similarity score is normalized to a 0–25 point range and combined with structured scoring to produce a final probabilistic match score.

4. Backend & Frontend

  • FastAPI backend with a /match endpoint returning ranked trials and explanation data
  • React-based intake form for structured patient inputs
  • Embedding generation using LLM-based models
  • Vector similarity testing to validate semantic ranking

Challenges We Faced

Parsing Unstructured Medical Language

Eligibility criteria vary wildly in phrasing. Age ranges, biomarker thresholds, and medication requirements are expressed in inconsistent formats. Designing regex patterns that generalized well required manual pattern mining and iterative refinement.

Balancing Rules and AI

A purely LLM-based approach lacked transparency, while a purely rules-based system missed nuance. The challenge was designing a hybrid model that combined deterministic clinical logic with semantic embeddings.

Explainability

Clinical decisions require trust. We had to ensure every score could be broken down into understandable components so users could see exactly why they matched or were excluded.


What We Learned

  • Clinical trial eligibility is more complex than it initially appears — edge cases are everywhere.
  • Hybrid systems (rules + embeddings) outperform single-method approaches in structured domains.
  • Explainability is not optional in healthcare — it must be designed into the architecture from the beginning.
  • Building demo-ready AI requires careful UX decisions as much as backend modeling.

What’s Next

  • Add a conversational agent that asks clarifying follow-up questions
  • Expand beyond Type 2 Diabetes to other chronic conditions
  • Improve geographic ranking using travel-time modeling

CuraMatch transforms complex clinical eligibility criteria into understandable, actionable matches — making trial discovery accessible, transparent, and scalable.

Built With

Share this project:

Updates

Submission history