← Latest papers
💻 computer science

Bridging the QC–QA Cognitive Handoff: An Agentic Verification Harness for Error Detection, Specification Cross-Checking and Quality Documentation Assembly in Pharmaceutical Quality Assurance

This paper proposes and preliminarily evaluates an agentic verification harness for pharmaceutical quality assurance that combines large language models for proposal, deterministic code for calculation, and human oversight for decision-making, demonstrating a pooled sensitivity of 84.1% in detecting injected discrepancies across three simulated dossiers while emphasizing the need for further validation before claiming practical benefits.

Original authors: Anil Bhusal, Diwas Kunwar, Pushkar Niroula, Shashwot Rimal

Published 2026-11-04
📖 7 min read🧠 Deep dive

Original authors: Anil Bhusal, Diwas Kunwar, Pushkar Niroula, Shashwot Rimal

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ✨ This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Every medicine that reaches a pharmacy shelf begins its life as a promise made on paper. Before a single pill is packaged, a pharmaceutical company must prove to regulators that its product is safe, pure, and exactly what it claims to be. This proof comes in the form of a massive regulatory dossier, a collection of thousands of pages containing test results, manufacturing logs, and stability data. The journey of this data is a relay race between two teams: the quality control scientists who generate the raw numbers in the lab, and the quality assurance reviewers who must copy those numbers into the final application. For decades, this handoff has been a manual process. A human reviewer sits down, opens a lab report, finds a value, opens the final document, and checks that the numbers match. They do this for hundreds of values, ensuring that a batch number is the same in every place it appears, that a date makes sense, and that a result falls within the correct safety limits. It is a task of immense volume and high stakes. A single transcription error, a misplaced decimal point, or a forgotten result can delay the approval of a life-saving drug or, worse, allow a flawed product to reach patients.

The challenge is not that the math is difficult; the math is simple. The difficulty is the sheer number of checks required and the human tendency to make mistakes when tired or distracted. In recent years, artificial intelligence has been proposed as a solution to automate this checking. However, standard AI models are often unreliable for this specific job. They can be fluent but wrong, inventing facts that sound plausible but do not exist in the source documents. They might calculate a number incorrectly or fail to trace a value back to its original page. For a regulated industry where every claim must be backed by undeniable evidence, a system that guesses is not enough. The industry needs a tool that reads like a human but calculates like a machine, one that never makes a decision on its own but only flags potential errors for a qualified expert to review.

This is the problem a team of researchers set out to solve with a new kind of software system. They did not try to build an AI that could write the final report or decide if a drug was safe. Instead, they built a verification harness, a structured workflow that separates the roles of reading, calculating, and deciding. In their system, an artificial intelligence model acts only as a reader. It scans the documents and proposes what a number or a date might be. Once the AI makes a proposal, it immediately steps aside. A separate, deterministic computer program takes over. This program performs every calculation, checks every math problem, and compares every proposed value against the strict rules and limits defined in the regulations. If the numbers do not add up, or if a value in one document contradicts a value in another, the system flags the discrepancy. Finally, a qualified human pharmacist reviews every single flag. The human makes the final decision on whether the flag is a real error or a false alarm. The AI never decides; it only suggests. The code never guesses; it only computes. The human never guesses; they only decide.

To test whether this approach actually works, the researchers created a realistic test environment using three authentic regulatory dossiers from a single manufacturer. These were real-world documents containing hundreds of data points, covering different types of medicines like tablets and capsules. To see if the system could find errors, the team secretly introduced specific mistakes into copies of these documents. They planted 332 distinct errors across the three files, ranging from a single digit being transposed to a batch number being different in two places, or a result being reported in the wrong unit of measurement. The system was then run on these documents without being told where the errors were hidden. It had to find them on its own, relying entirely on its ability to read the pages, cross-reference the data, and apply the rules.

The results showed that the system was effective at finding the planted errors, though not perfect. Across the three different dossiers, the system successfully detected 84 percent of the injected mistakes, meaning it missed 52 of them. In the first dossier, it found 95 out of 112 errors. In the second, it found 80 out of 100. In the third, it found 105 out of 120. The system managed to find at least one error of every type it was designed to look for, including missing values, conflicting dates, and results that did not match the safety limits. This suggests that the architecture of separating the reader from the calculator is a viable way to handle the complexity of pharmaceutical data. The system did not get confused by the different layouts of the documents, although the researchers note that with only three dossiers, the statistical test for layout differences has limited power. It consistently identified that something was wrong in many cases, but for the 52 missed errors, the cause remains unknown; the researchers could not determine if they were due to reading errors, gaps in the rules, or scoring decisions.

However, the researchers are careful to state what this study did not prove. While the system found the planted errors, the study did not measure how often it might raise a false alarm. Because the researchers did not run the system on documents that were completely free of errors, they cannot say how many times the system might have flagged a correct value as a mistake. In a real-world scenario, if a system raises too many false alarms, it could overwhelm the human reviewers, making the job slower rather than faster. Furthermore, the study only ran the system once on each document. It did not test whether the system would give the same result if it ran the same document a second time, which is a key requirement for any tool used in a regulated environment. The team also noted that the density of errors they planted was much higher than what is typically found in real submissions, which might have made the errors easier to spot.

The most significant contribution of this work may not be the detection rate itself, but the blueprint it provides for how to test such systems in the future. The researchers laid out a detailed protocol for how to build a fair test, including how to create a set of documents with known errors, how to have independent experts verify those errors, and how to measure the system's performance without bias. They emphasized that for artificial intelligence to be trusted in pharmaceutical quality, it must be validated against a standard that is as rigorous as the regulations it is meant to support. The study concludes that while the system shows promise, it is not yet a finished product ready for daily use. It is a proof of concept that demonstrates a path forward: a tool that augments human intelligence by handling the heavy lifting of data comparison, while leaving the final judgment to the qualified human experts who are ultimately responsible for patient safety. The work suggests that the future of drug quality assurance lies not in replacing the human reviewer, but in giving them a sharper, more reliable pair of eyes to catch the mistakes that volume and fatigue might otherwise let slip through.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →