Inspection and Process Record Audit for Foundry (Sand Casting, Precision Casting, Die Casting): Knowledge Base Retrieval and Recall

Data for this category comes from ERP material master data, melting furnaces and thermometers, spectrometers, MES heat records, mold management

What this category of data looks like

Data for this category comes from ERP material master data, melting furnaces and thermometers, spectrometers, MES heat records, mold management systems, and customer drawings. Daily documents include foundry process cards, batching lists, heat records, mold histories, first article inspection records, material reports, and nonconforming product review forms. Updates run per heat, per batch, or daily. Each individual document holds structured fields and corresponding values and units, such as alloy element content, furnace temperature, pouring time, mold usage count, and nonconforming type.

Constraints on knowledge base retrieval and recall

Frequently updated production data means retrieval and recall must cover the latest heat and batch records. This avoids referencing expired parameters. Many structured fields are closely linked. For example, a heat number ties to batching lists, furnace temperature records, and material reports. Retrieval must accurately recall related documents using associated fields. Each individual document includes clear values and units. Retrieval must preserve field semantics to avoid confusing unit descriptions for different parameters. As production scale grows, excessive recall results will exceed context length limits. Strictly control retrieval scope and count.

The following configurations are based on FastGPT v4.17.0.

How to set configurations

Configuration ItemRecommended SettingRationale
similarity0.75–0.85Foundry inspection parameters require high semantic matching, to filter low-related historical production records
limitTop 3–5 entriesDocuments related to a single heat typically do not exceed 5, to avoid exceeding context length limits
searchModemixedRecallBalance precise matching of structured fields such as heat number and mold number, and recall of parameter semantics
usingReRankEnabledReorder recall results by business relevance, to prioritize documents matching the heat number and mold number
datasetSearchUsingExtensionQueryEnabledExpand queries to cover synonyms, such as matching "return charge" to "scrap material" and "recycled material"
collectionIdsKnowledge base collections specified by the production departmentOnly recall documents related to foundry inspection, exclude unrelated administrative or non-production documents

Three common configuration mistakes

  • Symptom: After completing configuration, clicking test triggers an error, but the workflow runs normally after referencing documents. Cause: The test interface fails to properly load the associated configuration for the model and knowledge base. Runtime context parameters override abnormal configurations from the test phase.
  • Symptom: The simple knowledge base application in the workspace only returns 1 referenced document each time. Cause: The limit parameter is incorrectly set to 1, and the recall upper limit is not adjusted based on the number of foundry-related documents.
  • Symptom: After importing a specified JSON knowledge base, the knowledge base option is empty in the workflow. Cause: The collectionIds parameter is not specified, or the collection ID configuration is incorrect, so the imported knowledge base collection cannot be matched.

How to verify the configuration is complete

  • Trigger a query that includes a heat number or inspection parameter, check if the number of returned referenced documents falls within the set limit range.
  • Enter a search term that includes a specific heat number, confirm that the recalled documents include related content such as batching lists and furnace temperature records for that heat.
  • Test a highly similar non-target search term, confirm that the similarity threshold filters out low-related documents.
  • Check if the knowledge base option in the workflow automatically loads the specified collection, without requiring manual selection.

The values given are common starting points and should be measured against the reader's own samples.