What the data for this category looks like
Data sources for this category include registered process documents, raw material batch ledgers, production control systems (DCS), weighing systems, laboratory information management systems (LIMS), chromatography data systems, and quality management systems (QMS). Data is updated after each production batch or process step is completed. Daily documents include batch production records, material balance sheets, reaction and purification records, cleaning validation records, impurity profile reports, deviation and change approval documents. Fields include process step number, material batch number, test result values, change approval status, and more. Most individual documents combine structured and semi-structured professional process and quality content.
What constraints these characteristics impose on knowledge base retrieval and recall
Multiple scattered data sources require retrieval to support cross-system field association matching, to avoid recalling irrelevant cross-workshop or cross-supplier records. Frequently updated batch data requires retrieval to support incremental recall, to reduce resource consumption from full retrieval operations. Professional process and impurity-related documents require retrieval to adapt to semantic matching of specialized terminology, to prevent recall failure due to terminology mismatches. Business scenarios strongly tied to batches require retrieval to filter results by dimensions such as supplier and production batch, to ensure recalled content aligns directly with audit objectives. The multi-step document structure for a single batch requires retrieval to limit the number of returned results, to avoid context overflow that impacts model output.
How to configure the settings
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
similarity | 0.75–0.85 | Matches specialized terminology related to active pharmaceutical ingredient processes and impurities, filters low-relevance non-quality documents |
limit | Top 6 entries | Adapts to the retrieval volume of multi-step process records for a single batch, avoids context overflow |
searchMode | mixedRecall | Combines keyword and semantic retrieval, covers different types of professional documents such as reaction records and impurity profile reports |
usingReRank | Enabled | Re-ranks recalled results by relevance to supplier audits and quality deviation scenarios, improves retrieval accuracy |
datasetSearchUsingExtensionQuery | Enabled | Automatically expands specialized terminology queries, covers synonyms related to general production processes and impurities for active pharmaceutical ingredients |
collectionIds | Knowledge base collection IDs grouped by supplier and workshop | Narrows the retrieval scope, accurately matches the current audit's supplier and production link |
Three common configuration mistakes
- When filtering supplier-related documents using variable references, recalled results include batch records from irrelevant suppliers. This occurs because the
collectionIdsparameter is not configured correctly, and the variable is not bound to the corresponding grouped knowledge base collection, leading the retrieval scope to cover documents from non-target business areas. - Image links for impurity profiles uploaded to the knowledge base display as "input an image" in AI responses and cannot render properly. This happens because the context display configuration for knowledge base images is not enabled, and only the original link is retained without format adaptation.
- After local deployment and uploading files such as batch production records and impurity profile reports, the data processing stage returns empty results. This occurs because parsing dependencies for the corresponding document formats are not installed correctly, so structured process and quality records cannot be read.
How to confirm the configuration is applied correctly
- Initiate a quality audit query for a specific supplier, verify that recalled results only include that supplier's material batches and process records.
- Run a query containing specialized terms such as "impurity profile" and "yield", verify that returned results are sorted to prioritize quality audit scenarios.
- Upload a new batch of cleaning validation records, trigger incremental retrieval, verify that the new documents can be recalled normally.
- Check the retrieval logs for FastGPT v4.17.0, verify that the
similarityandlimitparameters take effect as configured, and the number of returned results matches expected values.
The values provided here are common starting points, and should be evaluated against your own specific samples.