AI writes the code. The rules, the test sets and the answer keys come from QC practice, and every result is measured against them.
Rules first
What counts as a flaw, what blocks a reduced test, what the tool must refuse to do. Written as a spec before any code.
Known-answer test sets
Synthetic records with known flaws and known outcomes. The answer key is fixed in advance, so the model never grades itself.
Measured, failures included
Every tool has a section on what it got wrong. That section is usually the most useful one.
Label scale
scriptTL-01
workflowTL-03
agentTL-02
The labels on each record follow one scale: a script is fixed code with no AI; a workflow is fixed steps wired by code, with AI at some steps; an agent chooses its next step with tools, a loop and a stop condition. Nothing here is called an agent unless it is one.
01TL-01 · script
TLCompendial
RecordTL-01
KindScript, no AI
DataPublic USP-NF pages
StatusLive fetch blocked
USP-NF changes arrive as notices of intent to revise, revision bulletins and errata. Somebody in the lab has to notice them and ask whether any touch our products. This tool lists only what is new since the last check.
What it does
It reads the three public USP-NF update pages, compares every entry against a saved baseline, and writes an Excel report of what is new. It is deterministic Python with no model in it, because nothing here needs judgment: it is a list comparison.
fixed codeblocked or plannedHow a run works.
12752
Notices of intent to reviseGeneral announcementsPublication announcementsGeneral chapter prospectuses
Run
Input
Result
What it means
6 Jul 2026
Live capture of the public pages
26 new items
real 12 notices of intent to revise, 7 general announcements, 5 publication announcements, 2 general chapter prospectuses
2 Aug 2026
Saved page copy
0 new
not evidence the copy’s content dated from 2024
1 Sep 2026
Same saved copy
0 new
not evidence identical to August’s input
usp_monitor/state/digest_2026-07-06.json
General Announcement
Call for Data: Request for Stakeholder Information Related to Pharmacopeial Forum (PF) 52(2)
26-Jun-2026
General Announcement
Proposal Status Reporting on USPNF.com
26-Jun-2026
Notice of Intent to Revise
Bemotrizinol
09-Jun-2026
Notice of Intent to Revise
Alpha Lipoic Acid
29-May-2026
Notice of Intent to Revise
Erythromycin
29-May-2026
Notice of Intent to Revise
Methyl Salicylate
29-May-2026
+ 20 more items in the same run
The first 6 of the 26 new items, copied from the run file and set as a table here.
What it got wrong
Two quiet months looked like two quiet months. They were stale input: the tool compared a 2024 copy of the page against itself and correctly found nothing. The logic was right and the result was meaningless. It came to light on 18 Oct, when the run files were rechecked for this page, not while running it.
A monitoring tool needs to check how fresh its input is, not just compare it.
Limits
USP’s site blocks the standalone script (HTTP 403 behind Cloudflare). Fetching needs a real browser, which is not built in yet.
The issue-level “New and Changed” list sits behind a paid login, so monograph-level tracking per issue stays semi-manual.
Validation documents are drafted (plan, requirements, risk assessment, functional spec, IQ/OQ protocol). The IQ/OQ has not been executed.
Next
A freshness check on every input (newest posted date must be recent, or the run fails loudly). Then match new items against a product list, which is the part a lab actually needs.
02TL-02 · agent
Deviation Review Agent
RecordTL-02
KindAgent + verifier + human gate
Data12 synthetic deviations
Built11-12 Oct 2026
Everyone in quality is asking what “a human reviewed it” has to mean when AI drafts or reviews a GMP record. TL-02 is the smallest thing that could answer that with numbers.
What it does
Reviewer agent reads one deviation investigation, the way a QA second reviewer would. It can read one file in an empty folder and nothing else, and every finding must quote the passage it rests on.
Verifier agent gets the record and the reviewer’s claims, never its reasoning, and must keep, weaken or drop each one with its own evidence.
Human sign-off: a QA reviewer accepts, rejects or edits every finding and must write a reason. A hook on the closing agent refuses to write the record unless every reason is present and appears word for word.
agenthumangateThe record cannot close until the human step is complete.
93-second narrated walkthrough. Synthetic records throughout.
What was measured
12 synthetic records for a fictional company, 26 planted flaws (15 serious), 3 clean records including one trap. Scored against a fixed answer key.
Single runs on Claude Sonnet, so indicative, not a measurement with error bars. Matching by an AI judge whose decisions are on file; it agreed with the human calls on 15 of 17 before it was corrected.
What it got wrong, and what that changed
Recall was never the problem. Precision was. It found every serious flaw and raised about one extra finding per record.
The “independent” verifier anchored. Shown a colleague’s claims, it kept 32 of 33. Made strict, it halved the noise and threw away two real flaws that had been confirmed. A lost catch is worse than visible noise, so the balanced one was kept and made the human the precision step.
It found two errors in its own test set that were missed in a line-by-line read: a bioburden result called “within limit” at double the limit, and a plate read before its incubation could have finished.
My first scorer was wrong before the agent was. It counted real catches as misses because the agent used different words.
“then recorded the intended time rather than the actual time in the batch record.”
The report itself says the operator recorded the intended value instead of the observed one, which is a data-integrity event (inaccurate, non-contemporaneous entry). […]
accepthuman sign-off
“Data-integrity event is a severe issue and should be handled more than a documentation slip”
Tamara Levine · 12 Oct 2026, 10:02 UTC
One real finding from the kept configuration, with the quoted passage it rests on and the signed reason, copied from the run files. The record is synthetic.
$ close_review --record DEV-2026-008
DENIED PreToolUse Write
finding 4: reason missing or shorter than 10 characters
no file written
$ close_review --record DEV-2026-008 # after sign-off
ALLOWED PreToolUse Write
4 of 4 findings signed; 4 human reasons found verbatim
Limits
The gate checks that a reason exists and survives word for word, not that it is a good reason.
About three hours of build and two of human review, roughly $4 of model usage at list prices. Small test set, single runs.
The published draft of EU GMP Annex 22 excludes generative models from critical GMP applications. This prototype does not change that.
Next
Two independent reviewer runs, keeping only what both raise, to attack anchoring at the root. Repeat runs for error bars. Then change-control records.
03TL-03 · workflow
Reduced-Testing Writer
RecordTL-03
KindWorkflow with AI steps
Data21 synthetic evidence packs
Built15 Oct 2026
Full monograph testing of every incoming raw-material batch costs real lab time. A justified reduced or ID-only scope for a qualified supplier saves it, but the justification means pulling specs, three batches of in-house and vendor results, investigation history and vendor status from several systems. So in many labs it simply waits.
What it does
Given one material’s evidence pack, it proposes FULL or REDUCED for every test, classifies the material as ID-only, partially reduced or full testing, and writes a report for a QA reviewer in which every sentence points to its source. If evidence is missing or contradictory, it writes no report at all, only a missing-evidence notice.
The design decision
AI reads what code cannot, proposes what a human must approve, and writes what code has already decided.
Every decision (matching, unit conversion, spec tightness, within-spec checks, eligibility, classification, halting) is tested Python on rules a reviewer can read and edit. AI is used in five places only: reading vendor certificates of analysis in different layouts, proposing name mappings for a human to approve, drafting a method-equivalence rationale for a human to decide, drafting the report text, and checking that text against the evidence. Identity and description are never reduced. A vendor or in-house result out of spec stops the whole abbreviation.
AI step (5)Python rulehumanhaltFixed order, wired by code. The AI never takes a decision.
27/27
Whole packs with AI in the loop: 9 packs, 3 repeats each, every run matched the answer key.
What was tested
Result
Note
Deterministic rules
110 tests pass
No AI in these
Whole packs, with AI in the loop
27 of 27 runs
9 packs, 3 repeats each, matched the answer key
Reading synthetic CoAs
480 of 480 fields
12 CoAs in 3 layouts; script-made, so easy
Reading real public CoAs
48 of 48 (Sonnet) 45 of 48 (Haiku)
5 documents posted publicly by vendors, kept private; labels by a QC expert
Claim checker on planted false claims
71 of 72 caught
Wrongly flagged 5 of 72 true claims
Missing or contradictory evidence
halt packs
Halted correctly, before any AI step was called
reports/P01_approve_full.md · regenerated 18 Oct 2026
SYNTHETIC DATA. PROTOTYPE ONLY. NOT VALIDATED. NOT FIT FOR USE.
Material classification is FULLY. M-class 2 tests are proposed FULL and 8 REDUCED, so the testing mode is ID_ONLY. M-counts, M-mode Next periodic review date is 2027-03-10. M-review
2. Per-test proposed scope
Test
In-house
Vendor name as printed
Mapping
Scope
T01 Description
VISUAL
Appearance
alias
FULLT01-scope
T02 Identification A (IR)
IR
Identification (IR)
proposed-approved
FULLT02-scope
T03 Assay (anhydrous basis)
TITRATION
Assay (anhydrous basis)
exact
REDUCEDT03-scope
T04 pH (5% w/v solution)
POTENTIOMETRY
pH, 5% solution
proposed-approved
REDUCEDT04-scope
T05 Water (KF)
KF
Water by KF
proposed-approved
REDUCEDT05-scope
+ 5 more tests, all REDUCED; then the three-batch comparison
Regenerated on 18 Oct 2026 from the current build, so Description now stays FULL. Run without the model: the decisions are the same Python, and the wording is the fixed template, not the AI draft. Pointers like T01-scope tie each line to its source.
Missing evidence notice (no report written)
SYNTHETIC DATA. PROTOTYPE ONLY. NOT VALIDATED.
Halt code: MISSING_COA
Detail: no CoA for in-house batch NB-2603 (vendor batch AL-5503)
The writer halts rather than write around missing or
contradictory evidence. Supply the missing item and rerun.
What it got wrong
The cheaper model stitched a result from two columns on a real CoA, reading “TEST PASS” where the page said “PASS TEST”. The verbatim check could not catch it, because each word was on the page. A column-aware check raised 5 false alarms and caught none of these, so it was dropped.
A test caught a real bug: a result of “<5” was passing a 99.0 to 101.0 range check.
The review form misled the reviewer. It matched “pH” inside “Staphylococcus”. Review notes also changed the design: the sterile-use flag now comes from a controlled material list, not a free field.
Limits
The ruleset is mine and invented for the prototype. It is not any company’s policy.
Synthetic CoAs are clean text PDFs. Real ones are scans, stamps and multi-page layouts; five real documents prove little.
The packs and the answer key were drafted with Claude and reviewed by a human, so they can share blind spots.
Next
Harder name-matching cases, scanned CoAs, and a full human review of the writer’s prose, which has only been spot-checked so far.
Questions
Who builds the tools?
AI writes the code. The rules, test sets, answer keys and every design decision come from someone with 13 years in pharma QC and QA, and every output is reviewed by a human.
Is any of this validated?
No. These are prototypes on synthetic data. For TLCompendial the validation documents are drafted and the IQ/OQ is not executed. None of them is ready for validation yet.
Can we try one?
The tools are prototypes on synthetic data. If you run a QC or QA team and want to test one against your own problem, get in touch.
Why not just use Copilot?
For drafting text, often you should. These tools are about the parts a chat assistant does not give you: fixed rules that a QA reviewer can audit, refusal when evidence is missing, and a record of what the human decided and why.
Contact
If your lab has a problem like these, or you want to try one of the tools on your own data, get in touch.