This configuration is based on FastGPT v4.17.0, adapted to the compliance and data requirements of pharmaceutical preparations manufacturing scenarios.
What the data for this category looks like
Data entities link to production, quality assurance, quality control, and warehousing departments of pharmaceutical preparation enterprises. Daily documents include master production documents, batch production records, batch packaging records, cleaning records, inspection records, deviations/CAPA/changes, and batch release review forms. Data sources include approved prescription processes, material batches, MES/electronic batch records, equipment and environmental monitoring, LIMS, and quality management systems. Teams update data per batch production, each key process step, and fixed monitoring plans. Fields include material batch numbers, process parameters, test results, deviation records, and more. Deployments must comply with requirements for synchronized documents and operations under GMP.
What constraints these characteristics impose on the deployment and upgrade phase
Multi-source and heterogeneous data sources require deployments to support integration with existing enterprise tools such as MES, LIMS, and quality management systems to avoid data silos. Teams must configure near-real-time data synchronization mechanisms for high-frequency batch-by-batch and step-by-step updates, to ensure data timeliness during traceability. The system must support structured field mapping and compliant storage of unstructured documents to address complex document structures and compliance requirements, preventing data tampering. Deployments must include a fine-grained role permission system to accommodate differences in access permissions across departments, complying with data isolation requirements under GMP.
How to set the configurations
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
DB_MAX_LINK | 100–200 connections | The batch records and test data volume for pharmaceutical preparations manufacturing is large, which requires ensuring the stability of concurrent queries across multiple departments |
MONGODB_URI | Enterprise internal QMS database address, configure read-write permission credentials | Integration with structured batch data from the enterprise's existing quality management system is required to ensure the accuracy of data traceability |
REDIS_URL | Local Redis instance address, memory configuration no less than 8 GB | Cache process and test data associated with batches to reduce latency from repeated queries |
STORAGE_S3_ENDPOINT | Enterprise internal compliant object storage endpoint | Securely store compliant documents required by GMP such as batch records and test reports |
ROOT_KEY | Configure permission mapping rules according to the enterprise organizational structure | Distinguish access scopes for production, quality assurance, and other departments to comply with data isolation requirements |
Three common errors
- The symptom is that the
<think>tag in model outputs is not correctly identified, leading to context parsing failure. The cause is that parsing rules are not adjusted for the document format of pharmaceutical preparations manufacturing scenarios, and process comment content in batch records is mistakenly treated as reasoning tags. - The symptom is a timeout error with status code 504 when importing multiple batches of batch records in bulk. The cause is that the
DB_MAX_LINKparameter value is not adjusted, and insufficient concurrent connections cause database response timeout. - The symptom is that multiple logged-in users cannot access department-specific batch data. The cause is that the permission mapping rule corresponding to
ROOT_KEYis not configured, and access permission ranges for different departments are not distinguished.
How to confirm the configuration is complete
- Access the FastGPT backend, navigate to the
MONGODB_URIconfiguration item, click the test connection button, and verify connectivity with the enterprise's internal QMS database. - Import a single batch of batch production records, observe the task completion status, and check whether the document is correctly parsed and indexed.
- Configure two test accounts with different permissions, attempt to access exclusive data for the production department and quality assurance department respectively, and verify whether data isolation takes effect.
- Upload a batch test report to the storage bucket corresponding to
STORAGE_S3_ENDPOINT, retrieve the report in FastGPT, and confirm that the retrieval results are accurate.
The values given are common starting points and should be measured against the reader's own samples.