What Data for This Category Looks Like
Data for this category comes from DCS/APC control systems, LIMS laboratory information management systems, tank farm metering systems, crude oil evaluation databases, equipment management systems, and energy management systems. Daily documents include operating procedures, production plans, material balance reports, distillate outlet quality reports, interlock ledgers, shift handover records, and change management documents. Data update frequencies cover real-time, per-shift, and daily. Fields include material quantity, temperature, concentration, equipment operating parameters, and more. Corresponding units include tons, cubic meters, degrees Celsius, ppm, and others.
Constraints Imposed on Tool Calling and Plugins by These Characteristics
Multiple heterogeneous data sources and varied update schedules require tool calling plugins to support different synchronization logic: real-time pulling of DCS real-time data, daily synchronization of tank farm metering reports, and per-shift updates of shift handover records. Diverse daily document types with distinct structural differences require plugins to support parsing refinery-specific formats such as material balance reports and distillate outlet quality reports, and extract corresponding fields for automatic filling of quotations and bid documents. Bid documents must incorporate crude oil properties and coordinated data from multiple unit loads. The context for tool calling must include the latest shift process parameters to avoid using expired data that reduces quotation accuracy. The coupled nature of multiple units in the refining process also requires tool calling to support cross-unit material data linkage verification, ensuring logical validity of bid data.
Configuration Settings
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
| Workflow/API tool selection | auto | Adapt to tool calling requirements across different refinery scenarios, automatically select appropriate plugins to perform data pulling and document generation |
| Workflow/API function-call configuration | enabled | Enable explicit function calls to ensure tool calling parameters comply with refinery business field specifications, such as matching units for material quantities and quality indicators |
| Single tool call timeout | 300 seconds | Refinery data pulling involves cross-system interactions. 300 seconds covers cross-system data synchronization delays and prevents timeout interruptions |
| Tool call retry count | 2 times | Address call failures caused by temporary fluctuations in DCS or tank farm systems. Retrying 2 times improves call success rates while avoiding excessive system resource consumption |
| Maximum context window token count | 16384 token | Accommodate content from multiple documents including material balance reports and distillate outlet quality reports for multiple units, meeting the need for multi-dimensional data reference in bid documents |
Three Common Configuration Errors
- Phenomenon: A 500 status code is returned during tool calling, and the interface displays "tool call failed". Cause: The plugin does not adapt to refinery-specific field verification, and the units of pulled material balance data do not match, resulting in plugin parsing failure.
- Phenomenon: The complete request body of each AI call cannot be viewed. Cause: Request log storage in debug mode is not enabled, or the log level is not configured to detailed mode.
- Phenomenon: The search plugin fails to return valid results, and industry information cannot be obtained in domestic environments. Cause: A replacement search plugin available in domestic environments is not configured, or the network access permissions of the plugin are not adjusted.
How to Confirm Proper Configuration
- Initiate a simulated bid document generation request, check the tool calling logs, and confirm that the pulled crude oil evaluation and tank farm metering data match the preset business baseline data.
- Enable debug mode, check the request body of each AI call, and confirm that it includes field parameters required for refinery business such as material quantities and quality indicators.
- Test the availability of the search plugin, and confirm that relevant industry information can be normally obtained in domestic environments.
- Trigger a simulated scenario of tool call failure, and confirm that the retry mechanism is properly triggered and the call is completed after retries.
The values provided here are common starting points and should be measured against the reader's own samples.
This page is written based on FastGPT v4.17.0.