Inspection and Process Record Audit for Cosmetics Manufacturing: Knowledge Base Retrieval and Recall

This category’s data is sourced from multiple types of business documents of skincare, haircare, makeup, and special cosmetics manufacturing

What this category's data looks like

This category’s data is sourced from multiple types of business documents of skincare, haircare, makeup, and special cosmetics manufacturing enterprises. These documents include formula sheets, weighing and feeding records, emulsification or filling records, cleaning and site clearance records, semi-finished and finished product inspection reports, and label review documents. Data sources cover registered and filed formulas, raw material safety materials, production equipment, ERP/MES systems, laboratory data, and packaging material version archives. Updates are triggered with each production batch or each line change. Document fields include raw material names, restricted substance content, production temperature, feeding quantity, and other relevant details, with standard production units attached.

The category’s data has a high update frequency and is batch-based. This requires retrieval and recall to support real-time synchronization of incremental data, to prevent index lag that leads to calling expired formulas or records. There are large structural differences across multiple document types. Matching rules must be configured for different document types to ensure accurate retrieval of key fields such as restricted substances in formulas and claimed content on labels. The data volume of a single batch fluctuates with production scale. Dynamic retrieval result quantity thresholds must be adapted to avoid retrieval delays caused by data overload. At the same time, data must strictly comply with filing and compliance requirements. Recall results must be associated with original filing numbers to verify consistency.

How to set the configurations

This document is written based on the configuration logic of FastGPT v4.17.0. Specific configuration items and their bases are listed below:

Configuration ItemRecommended ValueBasis for This Setting
similarity0.78–0.82Requires precise matching of compliance-related content such as formula raw materials and restricted substances, filtering out low-correlation non-production documents
limitTop 6–10 entriesThe number of business documents associated with a single production batch falls within a reasonable range, controlling the number of retrieval results to simplify the audit process
usingReRankEnabledWhen retrieving mixed multiple types of documents, reranking prioritizes content directly related to inspection and audit, improving the visibility of key information
datasetSearchUsingExtensionQueryEnabledGenerates extended retrieval terms based on original questions, covering variants of professional terms such as formula numbers and raw material names, improving recall coverage
collectionIdsBind the collection ID corresponding to the current production batchLimits the retrieval scope to documents of the current production batch, avoiding interference from cross-batch expired data on audit efficiency

Three common misconfigurations

  • Phenomenon: The number of returned results during retrieval is much lower than expected, or no matching results are found. Cause: The collectionIds are not correctly bound to the collection of the current production batch, and the retrieval scope covers expired documents from unrelated batches.
  • Phenomenon: A file upload prompt indicates exceeding the size limit, but the actually uploaded file is smaller than the configured 500MB threshold. Cause: The vector database’s chunked upload parameters are not correctly configured, or the Nginx upload limit for local deployment is not adjusted to match the FastGPT settings.
  • Phenomenon: The similarity matching degree of retrieval results is too high or too low, which cannot adapt to the accuracy requirements of compliance audits. Cause: The value range of similarity is not adjusted according to the characteristics of the category data, and default parameters for general scenarios are used.

How to verify a correct configuration

  • Run a retrieval test for a single-batch production scenario, and check whether the returned results include core documents such as the current batch’s formula and feeding records.
  • Adjust the value range of similarity to verify whether the relevance of retrieval results meets the requirements of the audit scenario.
  • Upload a single test document to confirm that the upload size limit meets business requirements, with no abnormal errors.
  • Trigger incremental data synchronization to verify whether newly uploaded production records can be quickly retrieved and recalled.

The values provided are common starting points and should be measured against samples specific to the actual deployment context.