Verifiable Engineering Practices for AI Recommendations in Refining and Petrochemical Operations

    This article presents a layered engineering approach to making AI recommendations verifiable in refining and petrochemical environments, where high temperature, high pressure, continuous operation, and strong coupling make a single misoperation costly. It explains why control systems must retain final decision authority while AI acts only as an advisor, and details four layers: equipment and control, a unified industrial control abstraction layer, intelligent decision-making, and audit and traceability. Key topics include data governance with unit normalization and lineage tracking, encapsulating simulation into deterministic orchestration with fixed triggers and approval nodes, controlled dispatch with role checks and command whitelists, and a multi-role workbench for closed-loop acceptance. The article closes with practical rollout advice and common pitfalls.

    1. Why Refining Scenarios Demand Verifiable AI Recommendations

    Refining and petrochemical production is characterized by high temperature, high pressure, continuous operation, strong coupling, and long cycles. A single misoperation can cause simultaneous losses in safety, environmental compliance, and economics. This is where industrial AI differs most from consumer AI: the question is not whether an answer sounds convincing, but whether a recommendation can be verified. Before a control room operator accepts a recommendation, it must answer at least four questions: where the data comes from, which model it relies on, where its boundaries lie, and who approves its execution.

    The traditional approach treats AI as a bolt-on analytics tool disconnected from the underlying control system. This leads to three typical problems:

    • Inconsistent data definitions, such as mixing absolute and gauge pressure or misaligning sampling timestamps, which distorts the model input itself.
    • Recommendations without boundary constraints, where the model may issue commands beyond equipment capability or process limits.
    • An untraceable execution chain, with no record of who proposed, reviewed, or executed a recommendation, or how the outcome was accepted.

    Verifiability must therefore be designed into the system architecture rather than patched on afterward. The following sections describe a layered engineering approach.

    2. Overall Architecture: Connecting the Control Layer to the Intelligence Layer

    The guiding principle is “the control layer retains decision authority; the upper layer provides a controlled channel.” The architecture has four layers:

    1. Equipment and control layer: Existing or in-house control systems act as the execution endpoint, remaining compatible with installed field control devices and monitoring systems, and retaining final decision authority for real-time closed-loop control and safety interlocks.
    2. Unified industrial control abstraction layer: Hides differences between heterogeneous devices and handles point mapping, permission checks, and controlled command dispatch.
    3. Intelligent decision layer: Combines four capabilities: a data foundation, modeling and simulation, deterministic orchestration, and role-based workbenches.
    4. Audit and traceability layer: Records data lineage, model versions, approvals, and execution results across the entire chain.

    The key principle is that AI is only an advisor, while the control layer is always the decision maker. Every AI output must pass through two gates: deterministic rules and human authorization.

    3. Data Foundation: Unified Definitions and Lineage Tracking

    The first prerequisite for verifiability is trustworthy data. The data foundation must aggregate multiple sources, including historical databases, equipment ledgers, process flow diagrams, and operating procedures, and complete three governance tasks:

    • Unified definitions: For example, converting pressure to a common reference basis, normalizing temperature and flow units, and aligning sampling timestamps to a single clock source.
    • Ontology modeling: Establishing entity relationships among “equipment, measurement points, and work orders” so that every measurement point can be located to a specific device and process step.
    • Lineage tracking: Allowing any data product to be traced back to its original measurement points and transformation logic, forming reusable standardized data products.

    Example data validation logic:

    1. def normalize_pressure(value, unit, base="abs"):
    2. # Convert to an absolute pressure basis to avoid mixing gauge and absolute pressure
    3. factors = {"kPa": 1.0, "MPa": 1000.0, "bar": 100.0}
    4. v_kpa = value * factors[unit]
    5. return v_kpa + ATM_KPA if base == "abs" else v_kpa
    6. def build_lineage(record):
    7. return {
    8. "data_product_id": record["id"],
    9. "source_points": record["raw_points"],
    10. "transform": record["transform_version"],
    11. "timestamp": record["aligned_ts"],
    12. }

    4. Modeling, Simulation, and Deterministic Orchestration: Encapsulating Inference as Tools

    The goal of the model layer is not a “smarter” model but a more controllable one. An industrial world model should encapsulate inference capabilities as standard tools, while a deterministic process engine fixes three things: trigger conditions, missing-data recheck branches, and human approval nodes.

    The value of deterministic orchestration is eliminating randomness. A “one task, one ID” approach makes the same recommendation traceable, handover-ready, and reviewable across shifts. Example flow definition:

    1. task:
    2. id: "TASK-20250612-001"
    3. trigger: "column_pressure_deviation > threshold"
    4. steps:
    5. - check_data_quality: {on_missing: "request_recheck"}
    6. - run_simulation: {model_version: "wm-1.4"}
    7. - evaluate_constraints: {hard_limits: true}
    8. - human_approval: {roles: ["shift_leader", "process_engineer"]}
    9. - controlled_dispatch: {channel: "read_only_first"}
    10. audit: {log_service: enabled, trace: full}

    Here, hard_limits means equipment and process hard constraints cannot be overridden by the model, and read_only_first means the recommendation is first provided in read-only mode and only enters controlled dispatch after confirmation.

    5. Controlled Execution: Permission Checks and Command Dispatch Channels

    The controlled dispatch channel must enforce least privilege and tiered authorization. The AI service does not write directly to the control layer; it submits a “suggestion ticket” through a controlled interface, which is executed only after confirmation by an authorized role. Key points include:

    • Identity and role checks: Separating permissions for operators, shift leaders, process engineers, and instrumentation staff.
    • Command whitelist and amplitude limits: Requests outside the allowed range are rejected and trigger an alarm.
    • Dual-channel design: The suggestion channel and execution channel are separated, and the execution channel retains a human veto.
    • Full traceability: Recording the request, approval, execution, acknowledgment, and outcome comparison.

    Pseudocode:

    1. def dispatch(suggestion, operator):
    2. if not has_role(operator, suggestion.required_role):
    3. raise PermissionError("role_mismatch")
    4. if not within_limits(suggestion.setpoint, suggestion.hard_limits):
    5. raise ValueError("out_of_safe_range")
    6. ticket = audit.open(suggestion.task_id)
    7. result = control_layer.apply(suggestion, ticket=ticket.id)
    8. audit.close(ticket.id, result)
    9. return result

    6. Multi-Role Workbench: Closed-Loop Acceptance

    The workbench provides role-specific interfaces and connects “AI-assisted analysis, authorized review, controlled execution, and cross-discipline joint acceptance.” The key to the closed loop is defining acceptance criteria upfront: acceptance metrics and decision rules are defined when the task is created, automatically compared after execution, and if the criteria are not met, the task returns to the analysis stage, forming continuous improvement.

    7. Implementation Advice and Common Pitfalls

    1. Govern data before discussing models; inconsistent definitions amplify all downstream errors.
    2. Separate hard constraints from soft optimization; safety interlocks and equipment limits must never be left to model discretion.
    3. Start with read-only recommendations and gradually open controlled dispatch to build trust.
    4. Build the audit backbone around task IDs to avoid scattered recommendations that cannot be reviewed.
    5. Avoid packaging AI as a black-box conclusion; output the basis, boundaries, and uncertainty.

    In summary, verifiability for refining AI is not a single-point algorithm problem but a systems engineering effort spanning data, models, orchestration, permissions, and collaboration. Only when every recommendation is traceable, bounded, and executable can AI truly enter the production loop.