What data looks like for this category
Petroleum refining production ledger data sources include DCS/APC control systems, LIMS laboratory management systems, tank area metering systems, crude oil evaluation databases, equipment management systems, and energy management systems. Data update frequencies fall into three categories: real-time, shift-based, and daily, corresponding to real-time process parameters, shift handover records, daily material balance documents, and similar materials. Daily documents include operating procedures, production plans, material balance sheets, distillate quality reports, interlock ledgers, shift handover records, and change management documents. Data fields include process temperature, material flow rate, product fractions, quality indicators, equipment operating status, and more. Units include degrees Celsius, cubic meters per hour, tons, ppm, and others.
Constraints imposed by these characteristics on tool calling and plugins
The multi-system coupled data sources for petroleum refining require that tool calling and plugins support integration with multiple heterogeneous systems such as DCS/APC and LIMS, to avoid data silos. Real-time updated process parameters require that tool calling response latency be controlled within a reasonable range. Batch ledger summary for shift-based and daily cycles requires plugins to support batch data pulling and associated integration. Diverse document types require plugins to adapt to parsing files of different formats such as operating procedures and material balance sheets. The multi-unit coupled business logic requires tool calling to handle cross-system associated queries to ensure ledger data consistency. Additionally, the high production risk nature of the business requires that tool calling include built-in result verification and failure retry mechanisms to ensure data accuracy.
Configuration Settings
| Configuration Item | Recommended Setting | Rationale |
|---|---|---|
| Workflow/API tool selection | auto or specified as "Refinery Ledger Toolset" | Tool calling for petroleum refining needs to cover multi-system data. Automatic mode adapts to dynamic scenarios, and specifying the toolset narrows the calling scope to improve accuracy. This configuration is designed based on the tool calling logic of FastGPT v4.17.0 |
| Workflow/API function-call configuration | enabled | Function calling must be forcibly enabled to integrate with heterogeneous systems, avoiding deviations in ledger data generated via plain text generation, in compliance with FastGPT v4.17.0 plugin calling specifications |
| Tool call timeout setting | 600 seconds | Real-time process data needs quick pulling, and batch ledger summary requires sufficient time. This value is set after actual measurement and calibration |
| Plugin batch query limit | Top 20 entries | The data volume of shift handover records and daily material balance sheets is moderate. 20 entries cover typical summary needs and avoid system overload |
| Tool result post-processing switch | Enabled | Multi-system data returned by tools needs unified formatting to meet ledger summary field requirements |
| Concurrent call setting | 5 concurrent | Refinery units operate in parallel. 5 concurrent calls match typical simultaneous query requirements across multiple systems, and can be adjusted based on actual measurements |
Three Common Misconfigurations
- Issue: A syntax error is triggered when executing a MySQL database connection plugin, and the console returns an "invalid SQL statement" error. Cause: The plugin is not configured to support multi-line queries, only allowing single SQL statements to execute, and cannot handle AI-generated combined insert and select statements.
- Issue: A request limit exceeded error is triggered when calling tools concurrently, with a 429 status code returned. Cause: The concurrent call setting is not adjusted, and the default concurrent count cannot match the demand for pulling process data across multiple units simultaneously.
- Issue: The field formats of ledger data returned by tool calls are inconsistent, and some fields lack units, making them unsuitable for direct use in summary reports. Cause: The tool result post-processing function is not enabled, and heterogeneous data returned by multiple systems is not uniformly formatted.
How to Verify Proper Configuration
- Manually trigger a tool call to pull a single piece of real-time DCS data, and verify that the returned fields match the system preset fields.
- After adjusting the concurrent settings, initiate multiple tool call requests simultaneously, and confirm that no request limit exceeded errors occur. Adjust the specific concurrent count based on actual business needs.
- Enable the tool result post-processing function, generate a single-shift ledger summary, and verify that the returned data has a unified format with no missing fields.
- Test the multi-line SQL query plugin, confirm that insert and select statements can be executed simultaneously with no syntax errors.
The values provided here are common starting points and should be evaluated against the reader's own samples.