What this category's data looks like
Data for this category comes from multiple business documents of skincare, haircare, makeup, and special cosmetics manufacturers. These documents include formula process sheets, weighing and feeding records, emulsification or filling records, cleaning and site clearance records, semi-finished and finished product inspection documents, and label review files. Data sources cover registered and filed formulas, raw material safety materials, production equipment, ERP/MES systems, laboratory data, and packaging material version archives. Update frequency adjusts per production batch or line change. Documents include fields such as raw material names, restricted substance content, process parameters, batch numbers, and packaging material information. There is no unified fixed format, and content changes dynamically with production batches.
What constraints do these characteristics impose on the knowledge base retrieval and recall link
Data for this category is scattered across multiple systems and updates frequently per production batch or line change. This requires knowledge base retrieval to support precise filtering of redundant data by production batch and line change time, to avoid mixing data across batches. Documents contain multiple professional fields including filing compliance content, process parameters, and raw material information, with no unified format. Retrieval must balance compliance matching and recall of process details, to ensure results meet regulatory requirements. The high-frequency update feature also requires the retrieval link to support incremental synchronization, avoiding delays from full reindexing, to guarantee response speed during drafting. Additionally, the consequences of errors are directly linked to product recall and removal from shelves. Retrieval results must strictly match filed information, to prevent mismatches between formulas or label claims.
How to set the configurations
The following configurations are based on FastGPT v4.17.0.
| Configuration Item | Recommended Value | Rationale |
|---|---|---|
similarity | 0.75–0.85 | Cosmetics manufacturing documents include highly compliant filing content and process details. This range filters low-match irrelevant data while covering compliance and process-related results |
limit | Top 6–10 items | Controls context token usage, avoids exceeding model context limits, and covers process and compliance reference documents required for single-batch production |
searchMode | mixedRecall | Balances keyword matching for filing fields and semantic matching for process parameters, adapting to multiple document structures |
usingReRank | Enabled | Optimizes the ranking of recall results, prioritizing content more relevant to abnormal reports or process drafting, improving drafting efficiency |
datasetSearchUsingExtensionQuery | Enabled | Expands natural language questions during drafting to cover keywords across filing, process, and other dimensions, improving recall accuracy |
collectionIds | Bind corresponding collections by production batch | Ensures retrieval only calls documents from the current batch or post-line-change, avoiding cross-batch data interference with compliance checks |
Three common mistakes
- Phenomenon: Some formula process sheets and label review documents are stored in the knowledge base as raw text without generating question-answer pairs. Reason: Automatic question-answer pair generation configuration is not enabled for structured documents in cosmetics manufacturing, or the chunking logic does not adapt to structured fields such as raw materials and batch numbers, leading to failure to extract valid question-answer pairs after splitting.
- Phenomenon: A "upstream load is saturated" error is returned when calling knowledge base retrieval, with a request ID in a specified format. Reason: Datasets are not divided by production batch, leading to a large number of cross-batch retrieval requests occupying computing resources simultaneously, triggering upstream load limits.
- Phenomenon: As historical batch documents in the knowledge base increase, single-retrieval context token usage becomes too high, and response delay becomes noticeable. Reason: The
limitparameter is not configured to restrict the number of recalled documents per retrieval, orusingReRankis not enabled to optimize recall ranking, leading to too many irrelevant old batch documents being recalled, increasing token usage and delay.
How to confirm the configuration is correct
- Randomly select a formula process sheet from the current production batch, input the corresponding drafting question, and verify that the retrieval results only include documents from the current batch or the same line-change cycle.
- Adjust the
similarityparameter range, verify that the matching accuracy of retrieval results meets the dual requirements of compliance and process details. - Trigger an incremental update operation, confirm that the knowledge base only synchronizes newly added line-change or batch documents, with no delay from full reindexing.
- Simulate multiple concurrent retrieval requests, check if upstream load errors are triggered, confirm that concurrent restriction configurations are effective.
The values provided are common starting points and should be measured against the reader's own samples.