This proof of concept demonstrates an end‑to‑end workflow that ingests pharmaceutical testing documents, extracts and validates test data, checks compliance with test methods and specifications using GenAI, and enables human review.
- Document Skill – Report: Extracts numeric and textual test result data from a Test Report. One skill per test type (e.g., Water Content, Residue on Ignition).
- Document Skill – Method: Extracts the full OCR text describing the test procedure. A generic skill works across test types; for complex methods, segmentation can be added.
- Document Skill – Specification: Extracts the full OCR text containing acceptable ranges and criteria. A generic skill works across specifications; for complex layouts, add segmentation.
- Classification Skill: Classifies each page/document as one of: Test Report (by test type), Method Description, or Test Specification.
- Process Skill: Orchestrates the end‑to‑end flow: classification, data extraction, GenAI validation against Method/Specification, and human review for exceptions.
-
Ingest documents
- Upload the three document types into ABBYY Vantage: Test Report, Method Description, and Test Specification.
- For this demo, the Try‑Any‑Skill app is used to upload and run skills.
-
Classify
- The Classification Skill assigns each document to a class: specific Test Report type, Method Description, or Test Specification.
-
Extract data
- Test Report skills extract fields used by validation rules, such as measurements, sample IDs, test conditions, instruments, and operator information.
- Method and Specification skills capture the full OCR text for downstream GenAI checks.
-
Validate business rules
- Arithmetic and logical checks run on extracted fields for internal consistency (e.g., summations, averages, range checks, and threshold comparisons).
- Any failures mark the document for human review.
-
Method compliance check (GenAI)
- A ChatGPT prompt compares extracted Test Report data against the Method Description to confirm the procedure/sequence was followed.
- Deviations (e.g., instrument settings, flow rates, temperatures, steps performed) are highlighted.
-
Specification compliance check (GenAI)
- Extracted test results are compared against acceptance criteria and ranges from the Test Specification.
- Examples of flagged mismatches:
- Flow rate reported as 45 mL/min when the method/spec says 40 mL/min.
- Oven temperature reported as 110 °C when the method/spec says 120 °C.
- Calculations based on provided net weights appear inconsistent.
-
Human‑in‑the‑loop review
- A manual review step allows validation of business rule and GenAI‑flagged exceptions before release.
- Water Content
- Residue on Ignition (ROI)
The design supports adding more test types by creating additional Report skills and mapping them to the same Method/Specification validation steps.
- Extracted fields: measurements, sample identifiers, test conditions, instrument parameters, operator/date, and other report metadata.
- Validation results: pass/fail indicators with reasons for business rules, method compliance, and specification compliance.
- ABBYY Vantage environment with permissions to deploy and run Skills and Process Skills.
- GenAI/OpenAI API key configured for prompt‑based validations.
- Obtain an OpenAI API key.
- In Vantage, navigate to Configuration -> Environment Variables and click "Create Variable."
- Name: "POC-Pharma-Validation-OpenAI-Key"
- Value: [OPENAI API KEY]
- Save the new variable.
Import the pre-configured Pharmaceutical Validation workflow into Vantage. From the skill catalog screen, click the Import button, then choose Demo TR - Process Skill.zip. The following skills are added:
- Demo TR - Classification
- Demo TR - Method
- Demo TR - Purity Test Report
- Demo TR - Specifications
Note: Running the Process Skill below will incur charges from OpenAI.
The easiest way to try this workflow is to use the Try Any Skill application. From the included Samples folder, choose Purity_Analysis_Method.pdf, Specification_Report.pdf, and either the ok or error version of the Analysis Report, such as Purity_Analysis_Report_1_ok.pdf.
Next, search for and choose the process skill Demo TR - Process Skill. The test validation will run and process the files. Upon completion, click the "REVIEW" button. The first document, "Purity Test Report" displays the analysis from OpenAI in the GenAI Analysis field:
gen-ai-analysis.jsis the JavaScript code for the Gen AI Analysis custom activity.- If you'd like to change the values in the pharmaceutical files to see different GenAI analysis results, edit the Word documents in the
Word Docsfolder, save them as PDFs, then use them with theDemo TR - Process Skill.

