AI trial matching that a clinician will sign
Any model can rank trials. A production system has to survive a nurse disagreeing with it, a privacy officer auditing it, and a payer batching ten thousand patients through it.
Clinical trial matching is a search problem wearing a compliance costume. The ranking model is the part everyone demos, but three other things decide whether it reaches your patients: strip identity before the model call, give a nurse the final say, and keep a record showing why each trial appeared.
What this class of system demands
4 things that decide this
- 01Strip identity before the model call, never after. Age ranges, ZIP prefixes and fake patient IDs keep health data out of your request.
- 02The model ranks and a nurse decides for you. Trial eligibility is a medical call, so automate the search and leave the judgement alone.
- 03Log every action. TrialTriage tracks 23 action types, so you can show why a trial was suggested months later.
- 04If you work with insurers, they work in batches, not one patient at a time. Build your queues into the first version, not a later tidy-up.
- IntakeStructured patient facts.
- De-identifyBefore anything leaves.
- RetrieveTrials, guidelines, drug data.
- RankModel proposes, with reasons.
- ReviewA nurse adjusts and signs.
- AuditEvery step reconstructable.
Steps two and five are what separate a production system from a demo. Both are cheap to skip and expensive to retrofit.
The four problems every build hits
These show up on every trial-matching project regardless of cancer type, sponsor or country.
Eligibility criteria are prose, not data
Trial protocols get written for humans. Turning free-text inclusion and exclusion criteria into something checkable is most of the work, and it's where you win or lose accuracy.
The corpus moves under you
Trials open, close and amend constantly. If your system indexes once and never reconciles, it will confidently recommend a study that stopped recruiting in March.
Absence is not exclusion
A missing biomarker result isn't a negative one. Treat unknown as ineligible and you quietly remove patients who qualify, and nobody notices because the output still looks reasonable.
Explanation is a requirement
A clinician won't sign a ranking they can't interrogate. Each recommendation has to carry the criteria it matched and the source it came from, or review becomes rubber-stamping.
Human in the loop is a design, not a disclaimer
Most systems claiming clinician oversight present a ranked list and a confirm button. That's not review, it's consent theatre, and your reviewer's attention drifts within a fortnight.
Real review means your nurse can reorder, reject with a reason, and see which criterion drove each match. Those rejections are the most valuable data your system will ever produce, so capture them from day one.
- Let your reviewer disagree in a structured way. A free-text note is unusable feedback.
- Show the matched criterion beside the rank, not behind a click.
- Measure how often your reviewer changes the order. A rate near zero means nobody's really reading.

Systems where AI ranks and a human decides
A matching demo against a production system
Both return a ranked list of trials, but only one of them is fit to deploy.
Patient data
The pilot
Sent to the model as it arrives.
What production requires
De-identified before the call is made.
The decision
The pilot
The ranking is the answer.
What production requires
A clinician reviews, adjusts and finalises.
Trial freshness
The pilot
Indexed once at build time.
What production requires
Reconciled on a schedule, with closures honoured.
Explaining a result
The pilot
The model said so.
What production requires
Matched criteria and source shown per trial.
Volume
The pilot
One patient at a time.
What production requires
Batch upload with queued parallel processing.
Six months later
The pilot
Nobody can reconstruct a recommendation.
What production requires
Audit trail covers every tracked action.
The stack this work runs on
Retrieval and models
- Fireworks AI
- NCCN guideline integration
- Drug efficacy datasets
- Ranked recommendations
Platform
- NestJS
- PostgreSQL
- Redis job queues
- BullMQ
- Socket.IO
- Docker
Safeguards
- Field-level PHI encryption
- Automated PHI masking
- TOTP multi-factor auth
- Audit trail
- Paubox HIPAA email
What sponsors and providers ask us
01Does patient data have to reach the model at all?+
No, and it shouldn't. You can reduce structured facts to age ranges, ZIP prefixes and a pseudo-identifier before any inference call, which is how we built TrialTriage. The model needs the clinical shape of the patient, never their identity.
02How accurate is AI trial matching?+
Your accuracy depends on how you encoded the eligibility criteria, not on which model you picked. Protocols are written as prose, so parsing the inclusion and exclusion rules sets the ceiling. That's where your evaluation effort belongs before launch.
03Who is accountable when a match is wrong?+
The clinician who signed it, which is exactly why we design the review step rather than bolt it on. If your system lets a recommendation reach a patient without a named human approving it, you've moved liability somewhere nobody agreed to.
04Can insurers process eligibility in bulk?+
Yes, through batch upload with queued parallel processing and progress reported to you in real time. TrialTriage handles insurer CSV batches this way. If you design for batch late, you'll usually end up rebuilding the core, since single-patient assumptions spread everywhere.
05What happens when a trial closes recruitment?+
Your index has to reconcile against the source on a schedule, and closures must win over cached data. A stale recommendation is worse than no recommendation, because it costs your clinician time and costs your platform credibility on the first occurrence.
Go deeper
- Healthcare hub →The industry hub this page belongs to.
- TrialTriage →The full build: four user roles, 23 audit action types, insurer batches.
- RAG development →Grounding answers in your own corpus, with sources.
- How do you build HIPAA-compliant AI? →Where protected health information can and cannot go.
- Human in the loop →What the term has to mean to be worth anything.

