What Data for This Category Looks Like
Data for this category comes from design history files, device and material batch ledgers, MES systems, clean environment monitoring equipment, sterilization equipment, and inspection and calibration systems. Daily documents include production process specifications, batch production records, clean zone environment records, sterilization batch records, finished product inspection reports, software version records, adverse event and traceability materials. Data updates trigger per product batch or equipment production flow. Clean zone related records also update per fixed environmental monitoring plans. Documents contain both structured unique identifiers, batch numbers, and parameter values, plus unstructured process steps and inspection descriptions. This covers full-process inspection and record information from assembly through product release.
Constraints Imposed on Knowledge Base Retrieval and Recall
Multi-source heterogeneous data sources require retrieval systems to support integration with different ledger and device export file formats. This prevents data silos from harming retrieval completeness. Updates follow batch and environmental monitoring schedules, so knowledge bases must support incremental synchronization and scheduled refreshes. This ensures retrieval results match current production status, and avoids use of expired or non-effective records. Documents include both structured identifiers and unstructured descriptions, so retrieval must balance exact matching and semantic understanding. This prevents missing critical batch traceability information. Since errors can impact product sterility, traceability, and patient safety, retrieval and recall accuracy and relevance must be strictly controlled. This prevents irrelevant or incorrect historical records from being used for inspection audits.
Configuration Settings
The following configurations are based on the knowledge base retrieval logic of FastGPT v4.17.0.
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
similarity | 0.75–0.85 | This category of data has high confidence requirements. This range filters low-correlation results and prevents use of incorrect batch records. |
limit | Top 6–10 entries | Covers key inspection and record entries for a single batch production, while keeping context length within the model's processing limit. |
searchMode | mixedRecall | Balances exact matching for structured batch numbers and unique identifiers, with semantic retrieval for unstructured process steps and inspection descriptions. |
usingReRank | Enabled | Improves matching accuracy for long-text records, and avoids missing critical sterilization or clean environment information during initial vector recall. |
datasetSearchUsingExtensionQuery | Enabled | Supplements retrieval of associated process requirements and inspection standards, covering inspection links translated from design requirements. |
collectionIds | Configured by production workshop/sterilization batch grouping | Isolates data by production batch, prevents cross-batch records from interfering with retrieval results, and meets traceability management requirements. |
Three Common Mistakes
- Issue: API calls return an invalid knowledge base ID error, with empty response fields or a 400 status code. Cause: The
collectionIdsparameter was not passed as an array as required. A single ID was mistakenly passed as a string directly. - Issue: When uploading large PDF inspection records, upload progress stalls at 90% with an "offset out of range" error. Cause: Chunking parameters adapted for long text were not adjusted, or the file upload timeout threshold for the deployment environment was set too low, leading to interrupted large file transfers.
- Issue: Workflows cannot reference knowledge bases configured in global variables, and retrieval results are empty. Cause: The knowledge base ID was only configured in global variables, and the
collectionIdsparameter was not explicitly passed in the workflow's retrieval node to complete binding.
How to Verify Proper Configuration
- Log in to the FastGPT knowledge base management page, check the grouping configuration, and confirm that
collectionIdshave been grouped by production workshop or sterilization batch. - Initiate a test retrieval, enter the inspection keywords for the target batch, and verify that the
similarityscores of the returned results fall within the preset range and include key information for the target batch. - Upload a PDF clean zone record file larger than 100MB, confirm that the upload progress completes fully with no offset errors.
- Call the API interface, pass the
collectionIdsparameter in the correct format, and verify that the returned results only include production records within the corresponding grouping.
The values provided are common starting points and should be measured against the reader's own samples.