Drafting Process Documents and Exception Reports for SMT Mounting and Electronic Assembly: Multi-turn Dialogue and Prompt Engineering

Daily documents for SMT mounting and electronic assembly include BOM and coordinate files, line change sheets, stencil and reflow oven temperature

What this category's data looks like

Daily documents for SMT mounting and electronic assembly include BOM and coordinate files, line change sheets, stencil and reflow oven temperature records, first article inspections, SPI/AOI reports, repair records, and traceability labels. Data sources include BOM, Gerber, and coordinate files provided by customers, as well as MES system data, solder paste and component batch data, placement machines, SPI/AOI equipment, and reflow oven temperature records. Data is updated in real time per work order and each line change. Fields include part number, reference designator, component batch, reflow oven temperature parameters, defect type, and others. Some fields have units such as millimeters and degrees Celsius.

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

This category has numerous data fields and requires strong real-time performance. Multi-turn dialogue must strictly match the exclusive data of the current work order to avoid mixing data across work orders. Frequent updates require dynamic variables to be bound to the latest data source in real time. Cached old data must not be used. Drafting process documents and exception reports requires combining fields from multiple types of documents. Prompt engineering must clearly specify extraction rules to ensure output includes key information such as correct part numbers and reference designators. Additionally, exception analysis scenarios require quick access to real-time data such as SPI/AOI reports. Conversation context should not retain excessive historical content to avoid interfering with judgments for the current work order.

How to set up configurations

This document is compatible with FastGPT v4.17.0.

Configuration ItemRecommended ApproachRationale
variablesBind the BOM, line change sheet, reflow oven temperature record, and SPI/AOI report fields of the current work orderSMT work orders have numerous data fields that require real-time matching. Passing data via variables avoids repeated retrieval and ensures data accuracy
messagesRetain the most recent 3 rounds of user and AI interaction contentContext for line change and exception scenarios is closely linked. Excessive historical content will interfere with judgments for the current work order. Controlling length improves model response efficiency
chatIdBind the unique identifier of the current work orderDistinguish conversation contexts across different work orders, avoid mixing data across work orders, and ensure each round of dialogue only associates data for the current work order
Maximum context length800–1200 charactersSingle-round input length for SMT process documents and exception reports is moderate. Excessive length increases model load, while insufficient length loses key information
Variable replacement trigger timingUnified replacement before dialogue generationEnsures dynamic variables such as signature time use the current date provided by the system, avoiding generating outdated time values
Multi-turn dialogue retry threshold2 timesException report analysis requires multiple confirmations of defect data. Retries correct errors in field extraction and avoid missing key information in single-round generated content

Three common mistakes

  • Phenomenon: The signature time in the prompt engineering uses a fixed value or outdated time instead of the system's current date. Cause: The system time variable in variables is not correctly bound, or the variable replacement timing is set after dialogue generation.
  • Phenomenon: The second AI dialogue node in the workflow outputs the reply content from the previous node. Cause: Non-target input from preceding nodes is not filtered in the dialogue configuration, or the messages parameter does not only pass valid context for the current dialogue.
  • Phenomenon: HTTP requests are not triggered, and AI offline answers are used directly. Cause: The output of the HTTP request node is not passed as variables for the current dialogue, or the dialogue configuration does not enable the online retrieval trigger condition.

How to confirm the configuration is complete

  • Launch a test dialogue, input a process drafting request that includes part numbers and reference designators, and check whether the output contains the bound variables field data.
  • View the dialogue log to confirm that chatId matches the current work order identifier, with no residual cross-workorder context.
  • Trigger signature time generation, and check that the output time matches the system's current date.
  • Test the exception report analysis scenario to confirm that the dialogue calls relevant data fields from SPI/AOI reports.

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