What data for this category looks like
Data for this category includes documents such as process routes, operation cards, tool lists, CNC programs, first-piece inspection records, patrol inspection forms, and measuring tool calibration records. Data sources include 3D product models, CAPP/CAM systems, machine tool collected data, tool management systems, MES, and measuring and inspection tool records. Updates trigger per work order, single-piece machining, sampling inspection, or tool replacement. Document fields include G code line numbers for CNC programs, cutting speed (revolutions per minute), feed rate (millimeters per minute), tool ID, diameter (millimeters), service life (minutes) for tool lists, clamping references, and process dimension tolerances (millimeters) for operation cards.
What constraints these characteristics impose on tool calling and plugins
The multi-source heterogeneous data structure of this category requires tool calling plugins to support interface protocols for different data sources, including APIs for CAPP systems and real-time data ports collected by machine tools. The high-frequency update feature requires plugin calls to support on-demand triggering, to avoid pulling redundant full datasets. The diverse document fields require plugins to preset specific field extraction rules, such as extracting cutting speed and feed rate from CNC programs, and matching tool parameters for the current process from tool lists. Since machining errors have serious consequences, tool calling must include built-in parameter verification logic to prevent passing tools or clamping schemes that do not meet process requirements.
Configuration settings
This configuration is formulated based on FastGPT v4.17.0.
| Configuration item | Recommended setting | Rationale |
|---|---|---|
| Workflow/API tool selection | Fixed as ["functionCall"] | Mandatorily call specified tools to complete cross-review, do not trigger automatically generated replies |
| Global variable passing settings | Pass work order ID, current tool number, processing batch | Adapt to dynamically changing processing parameters and process requirements per work order |
| Tool call trigger rule | Trigger when the number of knowledge base recall results is less than 3 | Prioritize reusing existing process documents, call tools only when no matching content is found |
| Plugin call timeout setting | 30 seconds | Adapt to the real-time response rhythm of machine tool collected data, avoid interrupting the review process due to waiting timeout |
| Workflow/API function-call configuration | Enable field format verification | Ensure extracted cutting parameters and tool dimensions comply with standard units such as millimeters, revolutions per minute |
| Specified reply trigger condition | Trigger when tool call returns an exception | Output preset exception prompt content when tools cannot obtain valid data |
Three common errors
- Phenomenon: Tool calls do not pass global variables such as the tool number associated with the work order, causing review results to not match the current machining task. Cause: Global variable passing rules are not configured correctly, only static context parameters are used.
- Phenomenon: A specified reply is set, but automatic AI replies are still triggered after tool calls. Cause: The
toolChoiceparameter is not fixed to only call tools, and the permission to automatically generate replies is retained. - Phenomenon: After calling the reranking model, GPU video memory usage quickly increases to 6-7G and multi-card occupancy occurs. Cause: The call batch of the reranking model is not limited, too many document fragments are passed in a single time causing video memory overflow.
How to confirm correct configuration
- Initiate a simulated work order request, check whether global variables are correctly passed to tool call parameters with the request.
- Trigger knowledge base recall, verify whether tools are automatically called to complete review when recall results are fewer than 3.
- View tool call logs, confirm that
functionCallparameter verification is effective, and whether specified replies are triggered in exception scenarios. - Test reranking model calls, observe whether GPU video memory usage stays within a reasonable range.
The values provided are common starting points and should be measured against the reader's own samples.