Q&A for Process Procedures and Technical Standards of SMT Mounting and Electronic Assembly: Multi-turn Dialogue and Prompt Engineering

Process and standard data for SMT mounting and electronic assembly comes from customer-provided BOMs, Gerber files, component coordinates, factory MES

What this category's data looks like

Process and standard data for SMT mounting and electronic assembly comes from customer-provided BOMs, Gerber files, component coordinates, factory MES systems, mounters, SPI/AOI testing equipment, reflow oven temperature records, first article confirmation records, repair traceability records, and similar sources. Data updates run in real time for each work order and each line change. Daily documents include structured component reference designator lists, line change work instructions, stencil parameter tables, furnace temperature curve records, defect detection reports, and more. Fields include component reference designators, part numbers, batch numbers, mounting angles, furnace temperature ranges, defect types, and no category-specific units are used.

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

The data has strong real-time performance and updates per work order and line change. Dialogue contexts must be strictly bound to the exclusive parameters of the current work order to avoid mixing data across work orders. Documents include structured fields and unstructured content such as furnace temperature curves and defect images. Prompt logic must distinguish between structured parameter retrieval and unstructured content parsing. Data covers components, equipment, and process dimensions. Multi-turn dialogue must progress along process steps, such as from component verification to mounting parameters and then to defect analysis. Jumping across steps can cause incorrect data matching. Frequently updated data also requires limiting the context window size to prevent expired work order data from interfering with the current session.

How to set configurations

These configurations are formulated based on FastGPT v4.17.0.

Configuration ItemRecommended ApproachRationale
chatIdBind to the current work order IDEnsure the dialogue context only associates with the process data of the current work order, avoiding interference from cross-work order information
messagesRetain only 5000–7000 characters of historical dialogue for the current work orderLimit the context window size to prevent loading redundant expired data
variablesInject part numbers and line change time parameters of the current work orderAllow prompt logic to accurately match the exclusive process configuration of the current work order
Chunk length800–1200 charactersMatch the typical length of single sections in SMT documents, avoiding information fragmentation within chunks
Similarity threshold0.75–0.85Adapt to the precise matching requirements of process parameters, filter irrelevant data with low matching degrees
Single search limitTop 3 entriesFocus on the core process parameters of the current work order, reducing information clutter in multi-turn dialogue

Three common mistakes

  • A 503 error appears when uploading files via the dialogue box, while no error occurs when uploading to the knowledge base. The phenomenon is that a 503 status code is returned on the interface when uploading process documents, and the upload process to the knowledge base works normally. The cause is that the temporary file storage configuration of the dialogue session is not bound to chatId, leading to service unavailability caused by multiple sessions preempting storage paths.
  • A "no answer found" prompt is displayed when retrieving a knowledge base image address, and normal replies can be obtained using other templates. The phenomenon is that when calling image retrieval for SPI/AOI reports, no matching results are returned, and associated content can be output normally after replacing a non-strict question-and-answer template. The cause is that the strict question-and-answer template only matches text fields, and the analysis logic for process parameters associated with images is not configured.
  • When calling the API to send questions at short consecutive intervals, subsequent requests need to wait for the completion of previous generations. The phenomenon is that multiple process questions are sent in a short period, and subsequent requests have no immediate response. The cause is that no session concurrency limit is set for the messages context, leading to multiple requests conflicting and occupying dialogue resources.

How to confirm configurations are set correctly

  • Bind the current work order chatId, upload the BOM file for the corresponding work order, initiate a part number verification query, and verify that the returned results only include component information for the current work order.
  • Upload an SPI/AOI defect report image, use the strict question-and-answer template to initiate a defect type query, and verify that the defect parameters in the image can be correctly associated.
  • Send two process questions consecutively with a 1-second interval, and verify that subsequent requests can respond immediately without waiting delays.
  • View the dialogue context log, confirm that only the historical dialogue and associated data of the current work order are loaded, with no redundant information from cross-work order sessions.

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