Capability
What a clinical research AI harness could look like
- 01Work order
- 02Freeze
- 03Execute
- 04Check
- 05Programmer signs
Why this domain
Clinical programming already has the checks an agent needs
Every deliverable already has a proof
Conformance reports for SDTM, ADaM and Define-XML give a pass or fail per rule.
QC is already a diff
Independent double programming with PROC COMPARE is a byte-level oracle, budgeted at 30 to 40 percent of programming effort.
Logs are already rules
Scanning for errors, warnings, uninitialized variables and merge notes is written into most SOPs.
Specs are the contract
SAP, dataset specifications and mock shells define the work before a line of code is written.
Division of labour
Judgement stays with the programmer
The programmer decides
- What the specification means where it is silent or ambiguous
- Which derivation is scientifically correct
- Whether a finding is a real defect or an explained exception
- Whether the deliverable is fit to release, and signs for it
The harness does
- Freezes and hashes the inputs, pins the standards versions
- Submits the program to SAS or R and captures log, datasets and reports
- Runs the log rules, structural, terminology and comparison checks
- Writes the run record and blocks release until a named person signs
How one deliverable runs
Work order
One named deliverable, its dependencies, acceptance tests, QC method and a named reviewer.
Freeze and prepare
Inputs hashed with SHA-256, SDTMIG, ADaMIG, Define-XML and terminology versions pinned, environment asserted.
Execute
The approved program runs in your licensed SAS or R environment. Return code, log, datasets and reports are saved and hashed.
Check
Log rule pack, structure and transport format, terminology, validator run and PROC COMPARE where required. A finding sends the unit back for a fix and rerun.
Review and release
Findings closed or explained, a named person signs, the release gate opens. The AI assistant holds no release credentials.
Evidence
One run record for every execution and rerun
Inputs
SHA-256 of every frozen dataset, specification and macro, verified before any rerun
Standards
SDTMIG, ADaMIG, Define-XML, controlled terminology date, validator and log rule versions
Environment
SAS or R version, operating system, encoding, macro library commit
Checks
Log findings by severity, structure, terminology and comparison outcome
Assistant
Tool, model and prompt version, recorded as provenance and never as a verdict
Review
Reviewer, time, disposition and release decision
In double-programmed work the QC branch is a credential boundary, not a naming convention: the context that writes the QC program cannot read the production program or its outputs. The evidence is the comparison report, not either output.
How we would start
Retrospective parity
On one completed study the harness re-derives ADaM datasets and tables from the specs and compares them with the submitted outputs. You get an objective score: exact match rate, discrepancies, hours and cost per output. Nothing touches live work.
Live QC seat
The agent takes the independent programming side of QC on a live study. Where agent and programmer disagree, people adjudicate. Production stays human-authored and human-signed.
Production under human QC
Only when the first two phases justify it, never as the opening move.
Engagement
Scoping, pilot, enablement
A fixed-fee scoping workshop of one to two weeks maps your pipeline from SAP to TLF, your checks and standard macros, and picks the pilot study. A fixed-price pilot of six to eight weeks builds the first harness, wired to your checks, and runs the parity study and the live QC seat. You keep the harness, the parity report and the cost per output report. Enablement then trains your team to build the next harnesses themselves.
Common questions
Q01Is it validated?
The harness is qualified like any GxP-supporting tool: a documented procedure, deterministic checks and a full audit trail of every agent action, check result and approval. Submissions stay human-signed.
Q02Does the AI replace our programmers?
No. It removes the drudgery first, such as QC re-programming and validator fix cycles. Your programmers become operators and reviewers of agent output, and two of them join the pilot from day one.
Q03SAS or R?
Either. SAS stays outside the harness: the harness submits approved programs to your licensed environment and captures the result. R and pharmaverse stacks work the same way.
Next step
Want to see the parity study on your own data?
A 30 minute call with Oleg. You leave with a clear view of scope, risks and next step.
Oleg Pun
CEO, Vareger
