Production Ledger Summary and Report Generation for Process Changes and Engineering Changes: Multi-turn Dialogue and Prompt Engineering

Data sources for this category include ECN/ECR documents from PLM systems, BOM version records from ERP systems, process validation reports from MES

What This Category of Data Looks Like

Data sources for this category include ECN/ECR documents from PLM systems, BOM version records from ERP systems, process validation reports from MES systems, supplier qualification materials, on-site test data, and customer special requirement documents. Data updates are triggered irregularly with each process or engineering change, with no fixed cycle. Document structures include change application forms, assessment reports, drawing version comparisons, switch execution plans, inventory disposal lists, and customer approval receipts. Core fields include change unique identifiers, version numbers, effective dates, involved material codes, process node numbers, and approval statuses. Some fields are associated with physical inventory and production batch numbers.

Data for this category is scattered across multiple business systems and updates dynamically with each change. Multi-turn dialogue must first guide users to provide a change unique identifier to accurately locate the corresponding documents. Document structures vary across different changes, so prompts must adapt to different change type fields such as ECN and ECR, to avoid missing fields caused by fixed templates. Sensitive customer approval documents require restricted context visibility to prevent sensitive information leaks. Identification of chain impacts related to changes requires multi-turn guidance to gradually collect associated information from process, material, and inspection links, ensuring that summarized data covers all impact points. Ledger summary requires integrating fields from multiple systems, so prompts must clearly specify grouping dimensions and statistical rules to ensure report formats align with the usage habits of change management teams.

Configuration Settings

Configuration ItemRecommended ApproachRationale
chatIdBind to the unique identifier of a single change taskEnsure multi-turn dialogue context is linked to all ledger data for the corresponding change, avoiding cross-task confusion
messagesPreset initial system prompts by change type, append user input and system responses to each dialogue turnAdapt to field requirements of different change types such as ECN and ECR, gradually collect and supplement information
variablesPass core fields such as change number and effective date as context variablesQuickly locate ledger data in corresponding PLM and ERP systems, reducing repeated queries
Maximum context length8000–12000 tokenCover all associated document fragments for a single change, avoiding information loss caused by context truncation
Sensitive information filteringEnable exclusive rules for customer approval documentsPrevent leakage of sensitive customer document content, complying with confidentiality requirements of change management
Single matching document limitTop 3 entriesControl returned data volume, avoiding excessive redundant information interfering with multi-turn dialogue logic

Three Common Mistakes

  • Phenomenon: When calling a deployed ollama deepseek 32b model, the dialogue prompts that no streaming return is available. Cause: The streaming output switch is not enabled in the model configuration, or the dialogue interface does not correctly receive streaming data blocks.
  • Phenomenon: After uploading an ECR drawing or BOM version file, the dialogue cannot recognize the file content. Cause: Parsing rules for the corresponding file format are not configured, or the uploaded file size exceeds the limit.
  • Phenomenon: Different users initiate conversations using the same application key, and context data interferes with each other. Cause: An independent chatId parameter is not bound to each user session, resulting in shared dialogue context.

How to Confirm Configuration Is Successful

In FastGPT v4.17.0, configuration effectiveness can be verified through the following checks:

  • Initiate a query containing a change number, verify whether the dialogue context automatically associates with ledger data from the corresponding PLM system.
  • After uploading an ECN document, verify whether the prompt automatically extracts core fields such as change number and effective date.
  • Test multi-turn dialogue, gradually supplement process and material information related to the change, verify whether the summary report covers all supplementary content.
  • After enabling sensitive information filtering, input a fragment of a customer approval document, verify whether the returned result automatically blocks sensitive content.

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