Skip to content
TrialMatch

Preview. You can look around and read how it works, but search isn't connected yet because the matching service isn't hosted. The code and setup steps are on GitHub.

Methodology and limitations

How TrialMatch finds studies, how it compares a profile with eligibility criteria, and where it can be wrong.

Data source

All study information comes from the official ClinicalTrials.gov API (version 2), maintained by the U.S. National Library of Medicine. Searches run live; records are cached for 24 hours and search results for 6 hours, and every page shows when the data was retrieved. If the API cannot be reached and nothing is cached, TrialMatch shows an error rather than old or simulated studies. Titles, criteria, contacts and site locations are copied from the record; nothing is filled in when a field is missing.

The profile's condition and positive biomarkers are turned into a focused and a broad ClinicalTrials.gov query, filtered by recruitment status and, when a location and travel distance are given, by distance. Candidate records are split into sections (title and conditions, summary, interventions, inclusion and exclusion criteria) and embedded with a biomedical sentence model (PubMedBERT fine-tuned on MS MARCO), stored in PostgreSQL with pgvector.

Search relevance is a weighted average of visible parts: condition match, semantic similarity, keyword (BM25) overlap, biomarker mentions, subtype and stage terms, treatment history, recruitment status and distance. A study whose title names the opposite biomarker status (for example HER2-negative for a HER2-positive profile) has its relevance reduced. Relevance measures topic match only. It is never a probability of eligibility, and studies with an identified blocker are always listed below studies without one.

How eligibility is assessed

Three layers, in this order:

  1. Deterministic rules check clear-cut requirements: age limits, sex, recruitment status, explicit biomarker requirements, named prior therapies, disease stage, ECOG score and pregnancy. Rules only give a definite answer when the criterion is unambiguous: no alternatives, exceptions, time windows, or subgroup-only conditions.
  2. Claude reads every criterion and labels it met, not met, unknown or not applicable, quoting the criterion and the profile facts it relied on. For exclusion criteria, “met” means the exclusion is present, which is a potential blocker.
  3. A validator then checks every claim: the study ID must match a retrieved record, cited criteria must exist, quotes must appear verbatim in the record, and every patient fact must exist in the profile. Unsupported claims are downgraded to unknown; if many fail, all AI output for that study is withheld. Rule results always override the model.

Each study then receives one of four categories:

Potential match:
no blockers identified; final eligibility is unverified.
Needs more information:
key requirements can't be checked yet, or the criteria were not analyzed.
Requires clinical review:
a key criterion depends on ambiguous wording or professional interpretation.
Potentially ineligible:
at least one documented criterion appears incompatible.

Missing information is always treated as unknown, never as meeting a requirement. Without Claude, TrialMatch still shows retrieved studies and rule-based checks, labels the remaining criteria “not analyzed,” and never invents an AI assessment.

Limitations

  • This is a portfolio research tool. It has not been clinically validated, and its evaluation uses fictional cases.
  • Eligibility text is free-form. About 2% of records lack clear inclusion/exclusion headings, so some criteria are left unclassified.
  • Distances use the city-level coordinates ClinicalTrials.gov publishes and are approximate.
  • Site-level recruitment status can lag behind reality. Always confirm with the study contact.
  • Language models can misread criteria. Validation reduces but does not remove this risk.

Privacy and safety

  • No account is needed and names, birthdates or record numbers are never requested. Please don't enter them.
  • Descriptions are processed in memory and not stored or logged. Server logs record only the route, status and timing.
  • Match results are kept in an anonymous session that is deleted automatically after 60 minutes, or immediately when you choose “Delete my data now.”
  • Your profile stays in this browser tab's session storage and is cleared when the tab closes. Saved studies keep only study numbers and titles.
  • Only the structured clinical facts needed for screening are sent to Anthropic's API, and only your city or postal code is sent to the geocoder (OpenStreetMap Nominatim).
  • Study text and patient descriptions are treated as untrusted data, so instructions hidden inside them are ignored.
  • TrialMatch does not claim HIPAA compliance. A real clinical deployment would need further security, privacy, legal and compliance review, including whether HIPAA applies and appropriate agreements with service providers.