SMT Placement and Electronic Assembly Process Specification and Technical Standard Q&A: Tool Calling and Plugins

The data for this category primarily comes from BOMs, Gerber files, and component coordinate tables provided by customers. It also includes equipment

What this category of data looks like

The data for this category primarily comes from BOMs, Gerber files, and component coordinate tables provided by customers. It also includes equipment data from factory MES systems, placement machines, SPI/AOI inspection equipment, reflow oven temperature recorders, and similar devices. Daily maintained documents cover changeover sheets, stencil parameter records, first article confirmation reports, solder paste and component batch ledgers, maintenance records, and traceability labels. Data updates take effect in real time alongside work order circulation and changeover operations. Process parameters and component information within a single work order are gradually synchronized and updated across production stages.

What constraints these characteristics impose on tool calling and plugins

The scattered and real-time updated nature of data for this category requires tool calling to support integration with multiple types of heterogeneous data sources. These include structured files uploaded by customers and real-time data streams from production equipment. Reliance solely on static documents must be avoided. Documents contain structured parameters such as furnace temperature curves and component coordinates, plus unstructured inspection reports. Tools must support both field value reading and text parsing. Data updates in real time alongside work orders and changeovers. Tool calling context scope must be limited to prevent loading expired work order data. At the same time, process errors can trigger batch failures. Tool calling must include parameter verification logic to intercept abnormal configurations related to wrong materials and dry joints in advance.

How to set the configurations

Configuration ItemRecommended SettingRationale
Workflow/API tool selectionautoAdapt to dynamic process requirements of SMT work orders, automatically match corresponding functional plugins
Plugin call trigger ruleTriggered by user questions, limited to 1 time per single conversationAvoid repeated calls that occupy resources, align with the business logic of single work order processing
Context window size8000–12000 tokenAdapt to the content length of multiple documents such as BOMs, changeover sheets, and furnace temperature records, calibrated based on actual measurements
Plugin parameter verification switchEnabledVerify the legality of fields such as component bit numbers and furnace temperature parameters in advance, avoid production risks
Data source synchronization interval30 secondsMatch the update rhythm of real-time production data, ensure the timeliness of called data
Plugin return result filteringTop 3 matching resultsFocus on core process parameters, avoid redundant information interfering with the Q&A process

Three common mistakes

  • Phenomenon: Custom plugin calls fail to locate functions related to robotic arm control or process verification, or prompt invalid plugin configuration. Cause: The dedicated plugin resource library for SMT scenarios is not bound, or the plugin configuration file adapted to the electronic assembly process is not uploaded.
  • Phenomenon: An error is returned after tool calling, prompting that tool messages must follow preceding calls. Cause: functionCall and tool messages are not arranged in sequence in the conversation flow, or preceding call records are lost due to context window overflow.
  • Phenomenon: An error is prompted when deploying custom code plugins, indicating missing dependency libraries, and code modules fail to load normally. Cause: Corresponding Python dependency packages are not installed in the platform's plugin operating environment, or dependency package versions do not match the production environment.

How to confirm that the configuration is complete

  • Initiate a test query, submit "What are the stencil parameters for the current work order", verify whether the plugin calls the corresponding data source and returns correct content.
  • Simulate a query with abnormal parameters, such as submitting "Use expired batch solder paste", verify whether the plugin triggers the parameter verification logic and returns a prompt.
  • Call the API interface to initiate the same query, verify that the returned results are consistent with online conversations, and adjust API call parameters to match the online configuration.
  • View the plugin operation logs of FastGPT v4.17.0, confirm that the data source synchronization interval matches the set value, and there are no abnormal error messages.

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