This document covers configuration instructions for FastGPT v4.17.0.
What this category’s data looks like
Data sources for this category include animal quarantine information, supplier batch archives, production traceability ledgers, real-time temperature collection data, metal detection results, and laboratory microbial test reports. Daily documents include quarantine certificates, slaughter and cutting records, ingredient curing logs, thermal processing parameter records, cold chain temperature logs, and microbial test sheets.
Data updates occur per production batch and daily shift. Continuous temperature control data syncs in real time. Fields include batch number, quarantine number, temperature value, test indicators, and timestamp. Common units are degrees Celsius, colony-forming units per gram (cfu/g), and batch numbers, among others.
What constraints these characteristics impose on the knowledge base retrieval and recall workflow
Retrieval must accurately match batch dimensions for data updated by batch and shift, to avoid recalling irrelevant documents across batches. Retrieval workflows must link temperature data, test results, and documents from corresponding production links to support strict raw/cooked product zoning and temperature control requirements, and must support multi-field combined retrieval. Retrieval latency must stay within a reasonable range for high-frequency synchronized real-time temperature control data, to prevent expired data from being returned and harming traceability accuracy. Retrieval results must link to matching batch numbers to meet the one-to-one correspondence requirement between quarantine certificates and production records, to stop irrelevant documents from being included. Recalled results must prioritize the latest test and quarantine data to meet biological risk rigor requirements, ensuring traceability reliability.
How to set configurations
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
similarity | 0.75–0.85 | Matches strongly associated documents such as quarantine certificates and batch records, and avoids recalling irrelevant non-batch data |
limit | Top 8 entries | Covers multiple document types for a single batch production run (quarantine, temperature, test data) while controlling context length |
searchMode | mixedRecall | Combines keyword retrieval for batch numbers and semantic similarity to accurately match associated documents from the same batch |
usingReRank | Enabled | Reorders recalled results by business relevance, and prioritizes returning core quality data such as temperature control and microbial test data |
datasetSearchUsingExtensionQuery | Enabled | Automatically expands retrieval terms related to batch numbers, and links supplier batches to production records |
collectionIds | Bind by business modules including slaughter records, cold chain data, test reports, etc. | Limits retrieval scope, and prevents mixing in knowledge base documents from non-target categories |
Three common configuration mistakes
- Phenomenon: Retrieval results do not return the quarantine certificate or cold chain temperature record corresponding to the target batch, and only return general descriptions. Cause: Did not use
collectionIdsto limit the target knowledge base collection for retrieval, so the retrieval scope covers irrelevant non-category documents. - Phenomenon: When calling the retrieval API, the returned results do not include batch records from internal enterprise documents. Cause: Did not enable the
datasetSearchUsingExtensionQueryautomatic retrieval term expansion feature, so the system cannot link batch numbers to metadata from internal documents. - Phenomenon: After restoring a project backup, knowledge base retrieval returns empty results. Cause: The backup only restored the project configuration, and did not synchronize the bound knowledge base files, or the configuration was not reconfigured to point
collectionIdsto the correct business collection.
How to confirm the configuration is correct
- Manually input a single batch number as the retrieval term, and check whether the returned results include the quarantine certificate, temperature record, and test report corresponding to that batch.
- After enabling
usingReRank, check whether the order of retrieval results prioritizes core quality-related documents such as microbial test reports and cold chain temperature records. - Call the retrieval API, and check whether the returned context only includes category-related documents within the bound collection, with no irrelevant non-target data.
- Simulate the project backup restoration process, and confirm that after reconfiguring
collectionIdsand binding the corresponding knowledge base files, the retrieval workflow can normally recall target data.
The values provided are common starting points and should be measured against the reader's own samples.