What the data for this category looks like
Data related to cosmetics production ledgers comes from registered or filed formulas, raw material safety documents, weighing and emulsification equipment logs, ERP/MES systems, laboratory test reports, and packaging material version files. Daily 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 is updated per production batch or each line change. Single-batch documents include fields such as production batch number, raw material usage, process parameters, test results, and packaging material version. Most fields are linked to compliance filing requirements and production execution details.
Constraints imposed on knowledge base retrieval and recall
This category has high data update frequency and links to compliance requirements. Retrieval and recall must accurately match the current batch and latest documents after line changes, to avoid using expired filing or production data. Multiple types of documents are stored together. Retrieval logic must support cross-document-type associated recall, such as recalling feeding records and filed formulas at the same time. Many fields involve compliance checks. Content strongly related to restricted substances, formula filings, and label claims must be recalled first, to avoid irrelevant documents interfering with retrieval results. Retrieval must also support associated search for process parameters, sensory, and stability test results, to match core business needs of cosmetics production.
Configuration Settings
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
similarity | 0.75–0.85 | Matches precise fields such as cosmetics formulas and restricted substances, filters low-correlation recall results |
limit | Top 8 entries | Covers multiple types of documents involved in a single production batch, while controlling total context length |
usingReRank | Enabled | Performs secondary sorting on recall results for structured fields such as emulsification temperature and batch number, to improve accuracy |
datasetSearchUsingExtensionQuery | Enabled | Expands retrieval logic, automatically associates the matching relationship between filed formulas and actual feeding records |
collectionIds | Specified by knowledge base collections linked to production batches | Limits retrieval scope, avoids interference from cross-batch irrelevant documents |
Three Common Mistakes
- Retrieval results do not output associated knowledge base document fragments. This occurs when the configuration for knowledge base reference output is not enabled, or the knowledge base collection linked to the target production batch is not correctly bound.
- When deploying FastGPT v4.17.0 locally, no image understanding model option appears when creating a new knowledge base. This function requires pre-installing the corresponding extension component, which is not included in default offline deployments.
- A JSON format error occurs during online retrieval and parsing. This happens when format checks are not performed on non-standard content returned by external sources, or the retrieval timeout setting does not match the response rhythm of external interfaces.
How to Verify Correct Configuration
- Upload feeding records for a single cosmetics production batch and the corresponding filed formula documents, initiate a search for "whether the raw materials for this batch meet filing requirements", and check whether the returned results include fragments of the corresponding filed formula and feeding records.
- Access the FastGPT knowledge base configuration interface, confirm that target configuration items such as
usingReRankanddatasetSearchUsingExtensionQueryare enabled as set. - Simulate a retrieval request after a line change, verify that the retrieval scope is limited to the knowledge base collection linked to the current batch, preventing cross-batch documents from being recalled.
- Test a search query containing restricted substance fields, confirm that the
similarityscore of returned results falls within the preset 0.75–0.85 range.
The values provided are common starting points and should be measured against the reader's own samples.