Data Characteristics in This Category
Supplier audit data in pharmacovigilance primarily comes from audit reports. Pharmaceutical companies generate these reports during regular or ad-hoc audits of external suppliers, such as CROs, CMOs, and PV service providers. These reports are typically collections of PDF, Word, or Excel documents. They include audit plans, audit findings, Corrective and Preventive Action (CAPA) plans, execution records, and close-out reports.
Data update frequency is irregular. It depends on supplier risk levels, contractual agreements, or regulatory requirements (e.g., annually, biennially). Document structures are highly standardized, adhering to international guidelines like ICH GCP and GVP, or internal SOPs. Fields include, but are not limited to, audit date, audit scope, auditee, auditor, finding category (critical, major, minor), specific finding description, cited regulatory clauses, CAPA owner, completion date, and verification results. Time fields are usually in date format. Quantity fields, such as the number of findings, are integers.
Constraints Imposed by These Characteristics on Workflow Orchestration
The unstructured and semi-structured nature of supplier audit reports challenges document parsing and information extraction in workflow orchestration. The uncertain update frequency of reports means workflows should not have overly frequent scheduled triggers. Event-driven or manual triggers are more suitable.
Documents contain extensive text descriptions (e.g., finding descriptions, CAPA details). This requires workflows to have robust natural language processing capabilities to identify entities, classify findings, and associate regulatory clauses. The standardized nature of fields facilitates structured storage and subsequent analysis after information extraction.
Audit reports also contain sensitive information. Workflows must strictly adhere to data security and privacy protection requirements during data processing and storage. Examples include anonymizing specific fields or restricting access permissions. Tracking CAPA execution progress requires the workflow to periodically check external systems or document statuses to update the closure status of audit findings.
Configuration Settings
| Configuration Item | Suggested Value | Rationale |
|---|---|---|
Chunk size | 500–800 characters | Paragraphs in audit reports are highly logical. This range avoids semantic breaks or information dilution from overly long or short segments. |
Recall count | Top 10 entries | Ensures sufficient contextual information is recalled, covering audit findings, associated regulations, and CAPAs. |
Similarity threshold | 0.75 | Balances recall precision and completeness, filtering out irrelevant audit clauses or findings. |
maxContext | 4000 token | Ensures the model can process detailed descriptions of audit findings, regulatory citations, and CAPA plans. |
PARSE_FILE_TIMEOUT_SECONDS | 600 seconds | Handles parsing time for large audit reports, such as those containing hundreds of scanned pages. |
Loop Termination Condition | AllCAPAStatus Is“DisabledDisabled” | Drives workflow iteration and termination based on the actual closed-loop status of CAPAs in the audit report. |
Three Common Pitfalls
- A workflow previews normally but fails to run in a non-login window after publishing. This often occurs because the non-login environment lacks necessary permissions or environment variable configurations.
- During tool invocation, critical information from user queries (e.g., specific supplier name, audit number) is not accurately mapped to the tool's
qparameter. This leads to tool execution failure or irrelevant results. - A loop body fails to terminate as expected, resulting in an infinite loop or premature termination. This is typically due to inaccurate loop condition settings, which do not sufficiently account for the diversity of CAPA status fields in audit reports or update delays.
How to Confirm Proper Configuration
- Upload typical audit report samples. Check if the workflow accurately parses document content and extracts key fields such as audit findings, CAPA descriptions, and regulatory citations.
- Simulate different types of queries, such as "Did supplier XX have critical findings in the most recent audit?". Verify if the workflow can retrieve correct information through tool invocation.
- After deploying the workflow, monitor its running status via the logging system. Check for timeout errors, API call failures, or data parsing exceptions.
- Set up an audit scenario with multi-stage CAPAs. Observe if the loop body in the workflow correctly iterates and eventually terminates based on CAPA status updates.
The values given are common starting points and should be measured against the reader's own samples.
Question material comes from public community discussions. Configuration values are common starting points and should be measured against your own samples. Verified on 2026-09-21.