Supplier and Process Quality Audit for Dairy Processing: Knowledge Base Retrieval and Recall

This category covers enterprises that produce liquid milk, yogurt, milk powder, and dairy ingredients. Daily documents include raw milk acceptance

What the Data for This Category Looks Like

This category covers enterprises that produce liquid milk, yogurt, milk powder, and dairy ingredients. Daily documents include raw milk acceptance records, standardized ingredient lists, pasteurization/UHT heat treatment records, CIP cleaning records, filling records, and retained sample microbial inspection reports. Data sources include raw milk testing equipment, production MES systems, homogenization and heat treatment online equipment, temperature and flow collection devices, CIP systems, and LIMS laboratory management systems. Data is updated in real time for each milk tank and each production batch. Each single record includes fields such as test values, timestamps, equipment numbers, and sample numbers. Units include mg/kg, ℃, seconds, CFU/mL, and other standard units.

Constraints Imposed on Knowledge Base Retrieval and Recall

This category’s data is updated in real time per production batch, and its fields contain a large number of precise numerical values. Retrieval must match the timestamps and parameters of the latest batch, and filter expired or irrelevant batch data. Liquid raw materials are perishable, and the production process is continuous. Key test records must be retrieved quickly, so the number of single retrieval results must be controlled to prevent context overload that affects large model responses. Temperature and time parameters in heat treatment and CIP links directly affect product safety. Retrieval must prioritize matching structured numerical fields to improve accurate recall rates. Single records have mixed fields and multiple units, so retrieval scope must be limited to the dedicated business knowledge base to avoid interference from cross-category data.

Configuration Settings

This guidance is based on FastGPT v4.17.0. Recommended configuration parameters are listed below:

Configuration ItemRecommended ValueRationale
similarity0.75–0.85Matches precise numerical values and timestamps from raw milk acceptance and heat treatment records, filters low-relevance irrelevant batch data
limitTop 8 entriesControls the context length returned by a single retrieval, adapts to real-time dairy production audit response requirements
searchModeembeddingPrioritizes matching structured test values, equipment parameters and other fields in documents to improve accurate recall rates
usingReRankEnabledRearranges retrieval results by business key fields such as antibiotic content and heat treatment duration, prioritizes returning high-priority records
datasetSearchUsingExtensionQueryEnabledAutomatically supplements associated query conditions such as batch numbers and equipment numbers to match multiple types of business records from the same batch
collectionIdsSpecified per business databaseBinds dedicated knowledge base collections for raw milk acceptance, CIP cleaning, and filling records to avoid interference from cross-category data

Three Common Mistakes

  • Phenomenon: New knowledge base entries are always mounted in the root directory, and hierarchical directories cannot be built according to production batches. Cause: The parent directory ID corresponding to collectionIds is not passed correctly, or the parent directory is not bound to a dedicated business knowledge base collection.
  • Phenomenon: Target business data can be retrieved from the knowledge base, but no valid output is generated after the associated large model call. Cause: The limit parameter value is too low, or usingReRank is not enabled, causing context truncation and failure to pass complete retrieval results.
  • Phenomenon: Retrieval time for a single document exceeds 10 seconds. Cause: The retrieval scope is not limited via collectionIds, resulting in full cross-knowledge-base scanning, or the similarity threshold is set too low, causing too many low-relevance results to be retrieved.

How to Confirm Proper Configuration

  • Check the knowledge base directory structure to confirm that new business entries are mounted to the specified parent directory.
  • Enter a raw milk batch number to initiate a simulated retrieval, verify that returned results only include relevant records for that batch, with no cross-batch irrelevant data.
  • Call the associated large model retrieval to confirm that retrieval results are fully included in the context, with no truncation or loss.
  • Test retrieval response time, adjust the similarity or limit parameters to adapt to business real-time requirements.

Note: The configuration values listed above are common starting points. They should be evaluated against the reader’s own samples.