Supplier and Process Quality Audit for Foundry (Sand Casting, Precision Casting, Die Casting): Multi-turn Dialogue and Prompt Engineering

This category’s data originates from ERP material master data, melting furnace temperature measuring instruments, spectrometers, MES furnace batch

What this category's data looks like

This category’s data originates from ERP material master data, melting furnace temperature measuring instruments, spectrometers, MES furnace batch records, mold management systems, customer drawings and technical specifications. Update frequency follows per furnace batch, per batch, or daily schedule. Daily documents include foundry process cards, batching lists, furnace batch records, mold history records, first article inspection records, material test reports, and nonconforming product review forms. Data fields include furnace batch number, mold cycle number, alloy batching values, temperature readings, pouring duration, and composition test results, stored in structured records and archived document formats.

What constraints these characteristics impose on multi-turn dialogue and prompt engineering

The high-frequency update requirement for category data means multi-turn dialogue context must be bound to specific furnace batch or batch identifiers to avoid calling expired historical data. Multi-source heterogeneous data sources require prompts to guide dialogue to gradually clarify query dimensions, such as first confirming the furnace batch number before retrieving the corresponding batching list. Diverse document types require prompts to clearly specify field ranges, such as only extracting exclusive fields like alloy batching ratios, without generalized material information. At the same time, the serious consequences of quality issues require parameter verification to be added during dialogue, such as verifying whether the input furnace batch number exists in the uploaded furnace batch records to prevent invalid queries.

How to set configurations

The following configurations are formulated based on FastGPT v4.17.0.

Configuration ItemRecommended SettingRationale
variablesBind furnace batch number and mold cycle number as required variablesAccurately locate single furnace batch/single batch foundry data, avoid cross-batch confusion
messagesRetain the last 15 rounds of dialogue contextAdapt to high-frequency updated furnace batch data, prevent calling expired information
chatIdBind workshop/furnace station number as session identifierDistinguish session data from different production units, avoid cross-workshop query conflicts
Maximum context length7000–11000 charactersAdapt to content loading of long documents such as foundry process cards and furnace batch records
Single recall limitTop 5 resultsBalance data completeness and query efficiency, reduce redundant information interference
Question optimizationEnable calibration based on actual measurementsAdapt to foundry professional terminology, optimize semantic matching effects of user questions

Three common mistakes

  • Symptom: Dialogue returns empty knowledge base, but uploaded document content is visible on the page. Cause: The uploaded foundry documents are not associated with the binding variables of the current session, resulting in the recall range not matching the data of the corresponding furnace batch or batch.
  • Symptom: Uploaded XLSX-format furnace batch records cannot be correctly recognized by dialogue. Cause: No structured parsing rules for XLSX files are configured, resulting in failure to extract key field information such as alloy batching and furnace batch parameters.
  • Symptom: Defect image queries uploaded by users cannot be correctly processed in dialogue. Cause: No calling logic for image information is clearly specified in the prompt, resulting in failure to read defect descriptions or test results in the image.

How to confirm the configuration is complete

  • Manually input an uploaded furnace batch number, initiate a query related to alloy batching ratios, and verify whether accurate data for the corresponding furnace batch is returned.
  • Upload a test XLSX furnace batch record, initiate a query related to pouring temperature, and verify whether the corresponding values in the document can be correctly extracted.
  • Initiate two consecutive queries for different furnace batches, and verify whether the dialogue context can correctly bind the information of the corresponding furnace batch to avoid confusion.
  • Input a question containing foundry professional terminology, such as "Furnace batch parameters corresponding to shrinkage cavity defects", and verify whether the corresponding knowledge base content can be correctly matched.

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