Quality Problem Traceability and Defect Analysis for Non-Ferrous Metal Smelting and Electrolysis: Tool Calling and Plugins

Data typically contains fields such as concentrate composition, impurity content, cell voltage, current value, laboratory indicators, and

What this type of data includes

Data typically contains fields such as concentrate composition, impurity content, cell voltage, current value, laboratory indicators, and environmental monitoring parameters. Units include volts, amperes, milligrams per liter, kilograms, and others. Data sources include concentrate and auxiliary material analysis reports, DCS systems, cell voltage and current monitoring equipment, laboratory results, and energy and environmental monitoring systems. Batch documents are generally generated per batch of raw materials, per furnace, or per cell. Key operating parameters such as cell voltage and current value are updated in real time. Daily documents are mainly structured forms, including batching lists, smelting records, electrolytic cell condition records, laboratory reports, anode and cathode quality records, and environmental protection ledgers.

What constraints these characteristics impose on the tool calling and plugins workflow

Multi-source heterogeneous data sources require plugins to adapt to different interface formats and authentication methods, and cannot be called through unified configuration. Batch-generated document structures require tool calls to be bound to batch dimensions to avoid data confusion from cross-batch retrieval. Real-time updated key parameters require tool call delays to be controlled within a reasonable range, otherwise the latest cell condition data cannot be obtained. Multiple types of physical quantity fields require plugins to automatically map semantics to prevent large models from failing to correctly parse analysis requirements due to format mismatches.

How to configure the settings

The following configurations are written based on FastGPT v4.17.0.

Configuration ItemRecommended SettingRationale
Workflow/API tool selectionautoAutomatic tool selection adapted to multi-source data, avoids missing data sources from manual specification
Workflow/API function-call configurationEnabled, maximum number of calls set to 3Balances the depth of multi-link analysis for quality traceability and response speed
Tool call timeout600 secondsAdapts to the latency requirements of multi-source data reading, avoids connection interruptions due to large data volume
Batch retrieval limitTop 8 batch recordsMatches the typical number of records per furnace or cell, avoids redundant data interfering with analysis
Context window size8000 tokenAccommodates the complete content of multiple smelting, electrolytic cell condition and laboratory reports, supports cross-link traceability

Three common configuration mistakes

  • Phenomenon: Concurrent errors occur during tool calling, with status code 429 returned. Cause: The number of concurrent tool calls is not limited, and simultaneous reading requests for multiple cell condition data exceed the interface quota.
  • Phenomenon: Empty results are returned after calling the tool, and document content cannot be read. Cause: Retrieval parameters are not configured according to batch dimensions, and cross-batch retrieval fails to match exclusive records for the corresponding furnace or cell.
  • Phenomenon: Connection error occurs when calling the large model. Cause: The tool call timeout is set too short, failing to complete complete reading of multi-source heterogeneous data, resulting in connection interruption.

How to confirm the configuration is correct

  • Initiate a single-furnace quality traceability request, check that the number of records returned in the tool call log matches the actual number of records generated for that furnace.
  • View tool call timeout logs, confirm that frequent timeout errors do not occur, and adjust the timeout time to meet business latency requirements.
  • Test the toolChoice automatic selection function, confirm that the large model can automatically call tool plugins corresponding to the data source based on the problem.
  • Verify the knowledge base retrieval results, confirm that all returned documents fall within the batch scope of the current traceability.

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