Data Characteristics for this Category
Deviation and CAPA (Corrective Action and Preventive Action) data originates primarily from internal quality management systems, Manufacturing Execution Systems (MES), and Laboratory Information Management Systems (LIMS). Data update frequency depends on event occurrence and processing status, typically real-time or near real-time. Document structures are complex, including various types such as deviation reports, Root Cause Analysis (RCA), corrective action plans, preventive action plans, and verification reports. Fields include event ID, occurrence date, discovery department, deviation description, impact assessment, root cause, action content, responsible person, planned completion date, actual completion date, status, and approver. Units are mostly dates, names, department names, and text descriptions, without complex numerical unit conversions.
Constraints Imposed by these Characteristics on "Forms and Interactions"
The highly structured and process-oriented nature of Deviation and CAPA data requires form designs that clearly reflect their lifecycle. Fields have strong interdependencies; for example, a logical dependency exists between root causes and corrective actions. This requires forms to support conditional display and dynamic loading for interactions. Text description fields (such as deviation description, root cause analysis) contain large amounts of content, necessitating support for rich text editing and long text input to prevent data truncation or submission failures due to excessive text. Responsible person and approver fields typically require integration with organizational structures or user management systems to provide user selectors. Planned completion date and actual completion date have strict format requirements, necessitating date picker controls. Status field transitions must be tightly integrated with a workflow engine to ensure that form submission triggers corresponding approval or notification processes.
Configuration Guidelines
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
UPLOAD_FILE_MAX_SIZE | 50 MB | Deviation and CAPA reports often include supporting materials like images and PDFs. The file size must accommodate common document upload requirements. |
maxContext | 4000 characters | Ensures that long text description fields (e.g., deviation description, root cause analysis) can be fully entered without truncation. |
PARSE_FILE_TIMEOUT_SECONDS | 300 seconds | Addresses parsing time for large PDF or image documents, preventing user experience issues caused by parsing timeouts. |
Chunk size | 500 characters | Ensures that after document parsing, each knowledge chunk contains sufficient context to support accurate retrieval and question answering. |
Recall count | Top 10 entries | Improves the recall rate of relevant information, especially in complex root cause analysis scenarios where multi-dimensional references are needed. |
Similarity threshold | 0.75 | Balances recall precision and generalization ability, ensuring query results are highly relevant to deviation or CAPA content. |
Common Pitfalls
- When users submit long text content, the system displays an error message indicating "input text content is too large." This occurs because the
maxContextparameter is configured too small, leading to text length restrictions on the frontend or backend. - In a workflow, after calling a sub-workflow to handle CAPA approval, nodes following the "User Selection" node in the sub-workflow do not execute. This typically happens because the user selection node within the sub-workflow does not correctly receive user or role information passed from the parent workflow after being called, preventing subsequent processes from triggering.
- After form submission, associated document parsing fails, and logs show an error when the "document parsing tool attempts to parse the input file address." This could be due to an incorrect file path, insufficient file permissions, or a
PARSE_FILE_TIMEOUT_SECONDSconfiguration that is too short, causing large file parsing to time out.
Verification Steps
- Completely fill out a deviation report form containing all complex fields and successfully submit it. Verify that all field data is correctly saved.
- Upload a typical CAPA attachment (e.g., a 20MB PDF document). Confirm that the document parsing tool functions correctly and that the parsed results are searchable in the knowledge base.
- Simulate a complete CAPA approval process, including approval operations by users with different roles. Confirm that status transitions and notification mechanisms for each node execute as expected.
The values provided are common starting points and should be measured against specific 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.