How myLaminin Uses AI to Build Clinical Research Software Without Compromising Compliance


Most software never gets read by a regulator. Ours does. Any record in a clinical research platform could one day sit in front of an inspector, an ethics board, or a participant who handed a study their health information and trusted us to look after it. That's why teams in this field move slowly. You build the feature, and then you spend even longer reviewing it, testing it and writing down what you did.
At myLaminin we wanted to know whether AI could change that. We were fairly sure it would make us faster. The real question was whether it could make us more careful too, because in this line of work, speed on its own is a little frightening.
I could argue that in the abstract, but it's easier to show you. So most of this post follows one real piece of work from this autumn: a set of AI-assisted features for our electronic Trial Master File, or eTMF.
A Real-World Example: Building AI-Powered eTMF Features
If you haven't met one, a Trial Master File is the official record of a study. It runs to thousands of documents, and every one of them has to be filed in the right place, checked, and ready on the day an inspector asks for it. It's exactly the kind of system where a small mistake turns into a finding.
Recently we gave ours a lot of new capability. It now suggests where a document belongs in the TMF Reference Model and gives each one a first quality check. We added bulk upload and certified copies. And when a reviewer rejects a document, they now choose a coded reason, which gives us quality metrics we simply didn't have before.
It took three weeks to go from the first design note to an approved merge. The work was finished alongside 270 new tests across six suites.
How AI Supports the Clinical Software Development Lifecycle
AI is part of our engineers' everyday routine now. We use coding assistants to find our way around the codebase, draft changes, write tests and work out what else a change is going to touch. I used to spend the first few hours of any job just reading. These days I start with a decent map of what has to change and why.
In practice it shows up at four points: before we start, while we build, when we think we're finished, and right before release. The eTMF work hit all four.
Before we start, the assistant searches what we already have, so a new feature reuses something proven instead of reinventing it. Certified copies need an electronic signature, and my first instinct was to start designing one. The search came back with the obvious point I'd missed: we already had a signing service, a re-authentication step and a tamper-evident audit trail, all tested and used every day. So certified copies sign through the same service as everything else, and there's still only one way to sign anything on our platform. That's how it should be.
While we build, it drafts code and tests against standards we've written down for security, access control and the handling of regulated data. One of those rules is that anything sending content to an AI model has to fail closed by default. For the filing suggestions, that means they only run for a trial that has opted in to AI features. If the system can't tell whether a trial has opted in, it treats that as a no, and the person uploading must manually establish how this file should be catalogued using the ordinary form.
When we think we're done, a second AI that played no part in writing the change reviews it cold. This is where it got uncomfortable. The review found that the identity check we collect for a normal signature could, during a short retry window, also be accepted for a certification. In plain terms, one sign-in might have produced two signatures. I wrote that code, and I hadn't seen it. Certification now asks for its own proof, and the fix was in before any colleague was asked to look at the work.
Before release, a person decides. A second engineer went through the combined change, approved it and merged it on 05 Oct 2026. Nothing reaches a customer on an AI's say-so.

Built for Compliance, Not Just Speed
Going faster is worth nothing here if you can't trust what comes out. So we aim the AI at the places where a mistake costs the most: who can see or change a record, whether an electronic signature holds up, and whether every action leaves a complete audit trail.
Our reviews check each change against ICH E6(R3) Good Clinical Practice and 21 CFR Part 11, and they ask the questions an auditor would ask. Is this action attributed to the right person? Can this record be changed without a trace? Does this role have access it shouldn't? They sound like checklist questions. On the eTMF work, every one of them turned up something real.
Take attribution. Our audit trail records whether the person filing a document followed the AI's suggestion, changed it, or ignored it. The review found a case where someone who had already picked the location by hand, before any suggestion loaded, would have been logged as accepting the AI's choice. Nothing would have crashed. The record would just have been wrong about who made the decision, and in a regulated system that matters a great deal. Now the AI only gets the credit if its suggestion was actually on screen when the choice was made.
Tampering (any changes to the audit records after being recorded) was simpler to get right. A certified copy's signature is tied to a fingerprint of the exact file, and the system can go back to the stored file at any time and compare the two. Change a single byte and the certification shows as broken.
Access was the subtle one. An early draft decided whether AI was allowed by looking at the subscription of whoever was uploading. That meant a document from a trial that had never opted in could still have been sent to a model, purely because of who happened to file it. The review caught it, and now the trial's own setting is the only thing that counts.
What makes all of this workable is that the AI can read the rules themselves. Regulations and guidelines run to hundreds of pages. Until recently someone, or a whole team, had to read them, interpret them and carry all of it in their heads through every design decision. Much of that knowledge ended up as summaries and checklists, always a step removed from the source. Now the assistant can keep the full guideline open next to the change and point to the exact clause a feature has to satisfy. We still do the interpreting. We just start from the regulation as it's written, every time.
Certified copies show how that plays out. ICH E6(R3) describes a certified copy as one that has been verified, by a dated signature or a validated process, to hold the same information as the original. Part 11 says a signed record has to show what the signature means. We built straight from those two sentences. You first declare that a document is a copy and say where the original is kept.
Certifying it is then a full electronic signature with its own meaning, "Certified copy", which can't be used for anything else. Upload a new version and the certification doesn't carry over.
We're just as strict about evidence. If the AI says something works, there has to be a test or a check behind it that actually ran. If it only reasoned its way there, it has to say so. The eTMF merge request is a good example. It lists every test suite that ran and its result, and then it has a section headed "Not verified", which says plainly that nothing in that run had touched the live AI service or the live signing service, and that nobody had tried it in a browser yet. I'd much rather read that than a wall of green ticks I can't interpret.
The AI proposes and checks. Our engineers decide.

When the Feature Itself Is AI
Everything so far has been about using AI to build software. The eTMF filing assistant is AI inside the software, and that raises the stakes. It reads a document as it's being uploaded and suggests where it should go.
So we didn't start with code. We started by answering five questions in writing, and each answer became something the software enforces.
What leaves the platform? For filing suggestions, a short sample of the document. Never the file itself.
What does the provider keep? No document content. The feature checks that the AI provider isn't logging it, and if it can't confirm that, it sends nothing.
What do we store? Never the model's free text. A suggested description is screened for names and other identifiers, and we keep only its fingerprint.
Who decides? A person, always. Suggestions are offered but never pre-selected, and the quality check advises a reviewer without approving or blocking anything.
Who can turn it on? Each trial, by opting in. We also have a single off switch that doesn't need a release.
Building it was mostly about not giving the model room to improvise. For details like dates, site and country, it can only answer with a date or a value from a fixed list, and then our own code checks the answer anyway. If a date isn't written in the document, it's thrown out. The same goes for a site the document doesn't name. A file name on its own is never treated as evidence of anything.
Then we tested it the unglamorous way, with documents where we already knew the right answer and live calls to the model. The first-pass quality check ran more than 260 times against our library of test documents. It caught every defect we'd planted, in two separate runs, and flagged every document we had misfiled on purpose. It also cried wolf. On 10 of 80 documents it mistook an empty "Participant name" field for a real identifier. One rule change brought that down to 1 of 91.
Detail extraction was measured on 196 documents. Whenever it offered a document date, it was right: 109 times out of 109. Country is the more interesting result. It only offered an answer on 28 of 77 documents, and all 28 were correct. That's deliberate. I'd take silence over a guess.
We also agreed on the release bar before we saw any results. The right location has to be the first suggestion at least 85% of the time, and in the top three at least 95% of the time. On our synthetic set the assistant scored 34 of 36 and 36 of 36. That looks great, and I don't fully trust it, because the same people wrote the test and the hints. The run on real documents is the one that decides.
Sometimes the answer is no. We evaluated an AI agent that drafts a study's visit schedule from its protocol, writing 20 synthetic protocols with answer keys and running the agent 27 times. It found every visit and every form, and 97% of the fields. It also got the screening window wrong 14 times out of 14, and the testing turned up five other faults that needed fixing first. In a demo it would have looked brilliant. So it waited.
For Developers: Find, Test, Challenge
This part is for the engineers. Our automated pull request review is the most ambitious piece of the workflow, and it rests on one rule: an AI's opinion isn't a finding. Every pull request goes through three steps before its author hears a word.
First, find. A reviewer agent reads the whole change along with the code around it, and something only counts as a finding if the agent can spell out a concrete failure: this input, this state, this wrong result. On the eTMF work, the new quality metrics report how often documents pass review the first time. The reviewer described exactly this: a document is rejected, a corrected version is uploaded and approved, and the metric says 50% passed first time. The true number is zero. The correction had been counted as a separate document.
Second, test. The suspect code runs in an isolated copy of the branch, with a script written to trigger the failure, and each finding is labelled as observed or only reasoned, with the exact command beside it. This step paid for itself when a colleague's multi-site work was merged into the eTMF branch. The two changes didn't conflict on a single line, and the diff read fine. Then we ran it. Six test suites failed, and every batch save in the site file came back with an error. The fix went in with the failing run and the passing run side by side.
Third, challenge. A fresh agent gets the code but none of the first reviewer's reasoning. It's told to assume the finding is wrong and prove it, which means reproducing the failure on its own. If a fix is proposed, it goes after the fix the same way, hunting for whatever the fix broke. On the AI filing work it threw out two findings because it couldn't make either of them happen. It cuts the other way too: on a different change, it caught four serious defects that the fixes themselves had introduced.
Only what survives all three steps gets reported. The reasoning is simple. Whoever reached a conclusion can't see its blind spots, so the challenger never shares a context with the reviewer. Developers trust the result because it arrives with proof and has already been argued with.
Where the Time Actually Goes
People assume the time AI saves just disappears into shipping more. It doesn't. It goes into the careful work that always used to get squeezed: more testing, deeper review, and more attention on the cases that matter to research teams and their participants.
On the eTMF work, that meant 72 tests for certified copies alone, each one uploading, certifying and downloading a file from start to finish. It meant an evaluation set with an answer key for every AI feature. And it meant three independent review passes over the AI filing work before I asked a human to approve it.
Behind every study on our platform are real people hoping for real answers. They deserve software built with urgency and with care, and AI is helping us deliver both.
Interested in seeing the myLaminin platform in action?
Book a demo with our team today.
_________________________________

Colin Spetz (article author) is one of myLaminin's Lead Software Engineers.




Comments