What this category of data looks like
Data for this category comes from raw material qualification certificates, ERP/MES systems, weighing equipment, baking/frying production lines, laboratory testing equipment, and food traceability ledgers from bread, pastry, biscuit, instant noodle, and frozen pastry factories. Daily documents include formulas and feeding lists, production records, baking/steaming curves, metal detection records, cleaning and disinfection records, and factory inspection reports. Fields include allergen labels, batch numbers, feeding quantities, baking temperature and duration, test values, and more. Data updates per batch, per shift, or daily. Product line changes occur frequently, and documents for formula and cleaning switches are updated at high frequency.
Constraints Imposed on Knowledge Base Retrieval and Recall
The frequent product line changes, multi-source heterogeneous data, and high-timeliness update requirements of this category create multiple constraints for knowledge base retrieval and recall. Frequent product line changes require retrieval to quickly filter matching documents by production line and batch, to avoid mixing cross-batch formulas. Documents from multiple sources have inconsistent field formats, such as varying feeding quantity units. Retrieval must automatically match field semantics to handle this. High update frequency requires the retrieval link to support incremental synchronization, so the latest cleaning, disinfection, and production records can be recalled promptly. Strict requirements for allergen and foreign matter control also mean retrieval results must accurately match keywords, reducing interference from irrelevant content.
Configuration Settings
This configuration follows the retrieval parameter logic for FastGPT v4.17.0, with details as follows:
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
similarity | 0.75–0.85 | Meets the accuracy requirement for matching allergen and formula keywords, prevents low-relevance cleaning records from being included |
limit | Top 10 entries | Covers multiple types of documents required for single-batch production, while controlling context length |
searchMode | mixedRecall | Combines keyword and semantic retrieval, adapts to heterogeneous data with multiple field formats |
usingReRank | Enabled, rerank the top 20 recalled results | Filters interference from old production line documents during line changes, improves accuracy |
datasetSearchUsingExtensionQuery | Enabled | Automatically expands synonymous retrieval for keywords such as allergens and production line numbers, improves recall coverage |
collectionIds | Configured by production line/batch group, single collection file size no more than 500 MB | Limits retrieval scope, prevents irrelevant cross-production line documents from being recalled, and reduces storage pressure from single-file uploads |
Three Common Misconfigurations
- Symptom: When uploading knowledge base files to a Docker-deployed FastGPT instance, the interface shows an upload failure with no additional error details. Cause: Single-batch documents were not split, and the total file size for a single collection exceeded the container’s mounted storage limit.
- Symptom: After running daily scheduled batch retrievals, server memory usage rises continuously until an OOM trigger occurs. Cause: The
limitparameter was not configured, so no cap was placed on the number of results returned per retrieval. This leads to large volumes of redundant documents being loaded. - Symptom: Irrelevant frying parameter documents are returned when searching for allergen keywords. Cause: The
similaritythreshold was not set, or the threshold was set too high. This prevents accurately matched allergen documents from being prioritized in retrieval results.
How to Verify Proper Configuration
- Upload single-batch formula and production record documents, and confirm they import successfully into the collection for the corresponding production line, with no upload failure prompts.
- Enter the keyword phrase "XX production line XX batch allergen", and confirm retrieval results first return the allergen label documents for the matching batch, with a proportion of irrelevant documents that meets expectations.
- Run 10 consecutive retrieval operations, and observe server load metrics. Confirm there is no continuous upward trend in usage.
- Review the knowledge base permission configuration, and confirm only authorized production audit personnel can access the document collections for the corresponding production line.
The values provided here are common starting points, and should be evaluated against the reader's own samples.