Process Document and Exception Report Drafting for Lithium-Ion Cell Manufacturing: Tool Calling and Plugins

Data sources include raw material batch ledgers, manufacturing execution systems (MES), slurry and coating testing equipment, workshop dew point

What the data for this category looks like

Data sources include raw material batch ledgers, manufacturing execution systems (MES), slurry and coating testing equipment, workshop dew point monitoring terminals, formation and grading cabinets, and laboratory testing equipment. Updates follow production batches, individual cells, or real-time triggers. Daily documents include batching records, coating and roller pressing parameter ledgers, winding/stacking process records, liquid injection operation records, formation and grading data reports, open circuit voltage (OCV) and safety test reports. Document fields include process parameter values, test result values, equipment operating status indicators, batch numbers, and unique cell identifiers.

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

Data updates in real time per batch or individual cell. This requires tool calling to pull the latest batch and cell data immediately, to avoid using expired historical data. Multiple heterogeneous data sources require tool calling configurations to support integration with different types of production equipment and system interfaces. Document fields include detailed process parameters and test results. This requires function parameters for tool calling to precisely match the field names of corresponding data sources. Drafting exception reports requires linking data across multiple processes. This requires tool calling to support pulling data by process branches, to avoid mixing irrelevant data. Electrochemical systems have extremely high requirements for data accuracy. This requires tool call results to pass basic validation before being written to process documents or exception reports.

How to set up the configuration

All configurations below are based on FastGPT v4.17.0.

Configuration ItemRecommended SettingRationale
Workflow/API tool selectionautoAdapts automatic trigger logic for multi-data-source tools, and matches the multi-process data pulling needs of lithium-ion cell manufacturing
Workflow/API function-call configurationenabledSupports precise calling of functions for specified data sources, meeting the real-time data pulling requirements for individual cell data
Tool call branch controlExecute only branches, do not output preliminary responsesAvoids redundant operations from triggering both replies and branch executions, aligning with the precise execution needs of exception report drafting
Data source connection timeout15 secondsMatches the typical response time of workshop equipment, preventing tool call failures caused by device delays
Data field mappingMap corresponding fields by process categoryMatches the document field structures of different processes such as batching, coating, formation and grading, ensuring accurate data writing
Result validation switchEnable basic numerical validationAvoids process document and report errors caused by abnormal data, aligning with the high reliability requirements of lithium-ion cell manufacturing

Three common errors

  • Phenomenon: Tool calls output both AI replies and branch execution tasks. Logs display both reply content and tool call requests. Cause: The tool call branch control item is not configured correctly, and the default dual execution logic is retained.
  • Phenomenon: Tool calls cannot be triggered when using the Qwen2.5 model. No function call options appear in the interface. Cause: The functionCall configuration item is not enabled, or the model version does not support function call formatting.
  • Phenomenon: After connecting the MySQL database plugin, returned test data fields show garbled characters. Chinese content appears as squares or out-of-order characters. Cause: The UTF-8 character set is not specified in the database connection configuration, or the plugin does not properly handle encoding conversion.

How to confirm the configuration is complete

  • Initiate a test for exception report drafting for a single cell. Verify that tool calls only execute pull tasks for the specified data source, with no redundant reply output.
  • Switch to the Qwen2.5 model. Confirm if function call configuration options appear in the interface. Initiate a test request to confirm tool calls trigger normally.
  • Connect the MySQL database plugin. Import test data containing Chinese content. Verify that Chinese content in returned results displays correctly.
  • Review tool call logs. Confirm that data field mapping matches process categories, with no missing or misaligned fields.

The values provided are common starting points and should be measured against samples for the specific operational context.