What the data for this category looks like
SMT mounting and electronic assembly technical documents include BOM and coordinate files, line change lists, stencil and reflow oven temperature records, first article inspection reports, SPI/AOI inspection reports, maintenance records and traceability labels. Data sources include BOM, Gerber and coordinate files provided by customers, as well as MES system, solder paste and component batch ledgers, mounters, SPI/AOI equipment, and reflow oven temperature collection data. Data is updated per work order and each line change, with some equipment data synchronized in real time. Document fields include part number, reference designator, component batch, oven temperature parameters, coordinate values, etc., with units including degrees Celsius, millimeters, batch numbers, and more.
What constraints these characteristics impose on the "multi-turn dialogue and prompt engineering" link
Data for this category is updated in isolation per work order and line change node, and a single work order is associated with multiple types of professional documents. Therefore, multi-turn dialogue must bind the unique identifier of the current work order to avoid cross-workorder data confusion. Document fields are numerous and have professional attributes, so prompts must clearly limit the retrieval scope to the specific document types of the current work order to prevent the model from calling irrelevant data. Real-time updated equipment data requires that the dialogue context can synchronize the latest parameters in a timely manner. Multi-turn dialogue must break down questions step by step according to the review process, sequentially confirm core information such as part number, reference designator, and oven temperature, to ensure coherent review logic.
How to set the configurations
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
chatId | Bind the unique identifier of the current work order, such as work order number | SMT work order data is isolated per work order. Binding with chatId ensures that the dialogue context only associates documents of the current work order, avoiding cross-data confusion |
| Maximum context length | 800–1200 characters | A single core SMT technical document is usually hundreds of characters. This range can cover key documents for a single work order, avoiding context overload that affects inference efficiency |
variables | Pass parameters such as the current work order's part number, line change time, oven temperature range, etc. | Allows prompts to accurately match the specific attributes of the current work order, narrow the retrieval scope, and improve review accuracy |
| Historical conversation recall limit | Top 5 entries | Multi-turn dialogue for SMT technical document cross-review usually does not exceed 5 rounds. Recalling too many entries will increase inference delay and resource consumption |
messages | Arrange in the order of system prompt first, then user question, then historical dialogue | Aligns with large model dialogue logic, ensuring that the review rules in the system prompt have higher priority than historical context |
| Timeout setting | 600 seconds | SMT document cross-review involves comparison of multiple reports and parameter verification, requiring sufficient time to complete full document retrieval and inference |
Three common mistakes
- Symptom: Returns a 404 status code when calling the API to initiate a dialogue. Cause: The custom identifier in
variablesis not configured correctly, causing the system to fail to match the data source of the corresponding work order. - Symptom: When retrieving historical conversations, only records of the default session are returned, and the dialogue content of the current work order cannot be filtered. Cause: The current work order is not bound with
chatId, and the system default session ID is used instead, resulting in invalid context isolation. - Symptom: The dialogue-generated result does not include the first article inspection report data of the current work order. Cause: The retrieval scope is not limited to the documents of the current work order in the system prompt, and full historical data is retrieved instead.
How to confirm the configuration is correct
- Initiate a test dialogue, pass the test work order's
chatIdandvariablesparameters, and based on the FastGPT v4.17.0 configuration, check whether the returned results only include the specified document content such as the work order's BOM and line change list. - Call the historical record interface, pass the test work order's
chatId, and confirm that only the dialogue records under this work order are returned, with no other irrelevant session data. - Initiate a multi-turn dialogue, ask about part number, reference designator, and oven temperature parameters in sequence, and check whether the model can gradually associate specific content of the corresponding documents with coherent logic.
- Simulate a large document comparison scenario, initiate a query involving multiple reports, and confirm that the dialogue is not interrupted within 600 seconds and the returned results are complete.
The values provided are common starting points and should be measured against the reader's own samples.