GPTs for Process Control: First Principles Thinking

Article by Christopher Honig, Muxina Konarova and John D Hedengren

GenAI seems important, but it’s not always clear how to use it. A good way in is to start with what GPTs can do, then layer on your own expertise. Christopher Honig, Muxina Konarova and John D Hedengren present ideas to get you thinking

Quick read

  • GPTs enable novel engineering applications, not just task automation: Beyond replacing tasks like report writing or meeting notes, GPTs unlock new uses such as natural language-driven process control, stakeholder translation, and asynchronous HAZOPs by leveraging their strength in language and unstructured data
  • Creative use needs first principles thinking: Merging GPT capabilities (eg prediction, translation) with engineering know-how leads to innovations like AI-assisted P&IDs, control systems, and digital “plant engineers”
  • Successful adoption relies on secure, validated collaboration: Issues like hallucination and data privacy are addressed through secure intranet deployment, verified datasets and multi-agent GPT architectures – supporting safer, smarter and more collaborative AI engineering tools

THERE is considerable excitement surrounding generative pre-trained transformers (GPTs, such as ChatGPT), with fervent speculation about their potential impact across the workforce. While the computer science behind GPTs is relatively well-established, their effective integration into specialised fields like chemical engineering remains a topic of ongoing exploration.

When considering practical uses of GPTs, it’s common to envision how they could speed up or automate existing tasks, such as report writing or transcribing meetings. However, one limitation of this way of thinking, is it confines GPT applications to traditional workflows, overlooking the possibilities of entirely new capabilities enabled by GPTs. Here, we hope to instead frame the new foundational capabilities offered by GPTs and then build up to useful applications within a specific domain (process control). This first principles framework can be useful for unlocking new applications for GPT technology.

First principles framework

Firstly, it can be helpful to define some key terminology that is commonly conflated or confused around artificial intelligence (AI). Generative AI (GenAI) usually refers to a very broad set of artificial intelligence systems capable of generating new content (for example text, images, music and video). A subset of GenAI are large language models (LLMs), characterised by their ability to generate human-like text based on large text datasets. A subset of LLMs are generative pre-trained transformers (GPTs). In November 2022, with the general release of ChatGPT-3, there was a surge of interest in GPTs because many people (including ourselves) were surprised by the quality of the text outputs, compared to prior LLMs. GPTs use graphics processing units (GPUs), for example the chips made by NVIDIA, to accelerate their computation. GPTs create coherent patterns of words by predicting sequences (using self-attention mechanisms to capture dependencies and context) similar to how predictive text on your phone suggests the next word based on what you’ve typed. However, as this is still based on a machine learning approach, the intricate internal operations of text associations remain opaque; at the microscale of individual word associations within the model, no one really fully knows how they achieve these impressive linguistic capabilities.

GPTs have offered two fundamental advantages:

  • Unstructured text processing at scale
    The continuously falling cost of computers means all computational-based applications have significant potential to scale up. For GPT-based tools, this means huge unstructured text sources can be processed at high speed and low cost
  • Context-specific language
    GPTs “understand” context and the clearest example of this is the translation of idioms or cultural expressions. If you did a literal word-for-word translation of the phrase “it’s raining cats and dogs” (meaning it’s raining heavily) into German, you would sound crazy (cats and dogs are falling from the sky!?). An equivalent German idiom might be das hundewetter (or dog weather). A GPT can translate the idiom, rather than just matching the words, because it captures dependencies in the phrase (each word is compared to every other word in the input text) so it can interpret the context (here, an idiom for heavy rain)

Rather than thinking about existing “work we can replace” with a GPT, these foundational insights into GPT capabilities can help us recognise new applications of GPTs that are not a one-for-one replacement. A widely cited example is the GPT’s ability to “translate” plain-language English instructions into coding languages. This lowers barriers to software development for non-coders, enabling them to create sophisticated software by providing basic instructions, reviewing the output, and suggesting improvements without needing to learn any code. High-level coding is not traditionally taught in chemical engineering degrees, but GPT-enabled coding can help chemical engineers engage in complex software solutions, so it offers a new lower effort pathway to certain technical capabilities.

Another application of context-specific translation could be technical language across domain expertise. For example, engineers collaborating with medical professionals or legal experts. An even more significant application could be stakeholder management on major projects: think about the complexity of unpacking competing agendas between diverse stakeholders like residents, council bodies, regulators, industry representatives and commercial subcontractors. A GPT tool could be built as a neutral ground for voicing concerns, summarising them into key points and identifying opportunities for alignment or fundamental misalignment, across domain expertise and regulatory compliance. The first principles thinking and an understanding of existing challenges in chemical engineering, leads to these ideas.

Just as GPTs can predict a sequence of words, constituting written language, GPTs can also be used to identify patterns in other symbolic sequences, like engineering schematics or piping and instrumentation diagrams (P&IDs).1 A typical adult speaker has a vocabulary of 20,000–35,000 words whereas a P&ID uses only around 200 symbols. This makes the schematic a much smaller model, though it’s worth noting that written language exists in one dimension – a linear string of symbols – while engineering schematics operate in a pseudo-two-dimensional space, allowing for branching and spatial relationships.

A promising research opportunity for larger engineering consultancies is to build GPT-based P&ID predictive models – drawing on their unique access to extensive schematic libraries for training. The most obvious applications are then replacing existing workflow, like red-line drawings, P&ID autocompletion and cross-checking designs, but these kinds of predictive P&ID tools may also enable new applications that don’t currently make sense because of time or cost restrictions. For example, checking old schematics for minor efficiency gains, pre-formulating contingencies to thousands of possible scenarios, rapid conceptual design, and auto-confirmation of legacy regulatory compliance. These are simple examples, but there are probably experienced engineers reading this article who can think of significantly better applications for predictive P&ID GPT models.

HAZOPs

GPTs and natural language processing have also been discussed for risk assessment and hazard and operability studies (HAZOPs), primarily because of their ability to handle large unstructured datasets (like HAZOPs).2,3 Referencing existing approaches, a GPT could be an AI scribe in a HAZOP meeting (taking notes from discussions), it could proofread HAZOPs or act as an AI engineer (based on textual similarity to prior HAZOPs rather than model-based reasoning used by a human engineer). However, unmooring the application from pre-existing workflow, and thinking about the fundamental purposes of a HAZOP can lead to other new approaches. In a traditional HAZOP, all participants must be present and engage in the analysis simultaneously. A GPT-enabled HAZOP, however, could allow engineers to work independently, guided by a GPT tool that walks them through each node and guideword, references insights from other team members, and compiles a collective analysis. This reimagines the HAZOP process as a flexible dialogue, with the GPT model serving as a proxy for the collective insights of all participants – even when responses are contributed at different times.

Article By

Christopher Honig

Senior lecturer in the Department of Chemical and Biomolecular Engineering, University of Melbourne, Australia


Muxina Konarova

Senior lecturer in the School of Chemical Engineering, The University of Queensland, Australia


John D Hedengren

Professor in the Department of Chemical Engineering, Brigham Young University, Provo, Utah, US


Recent Editions

Catch up on the latest news, views and jobs from The Chemical Engineer. Below are the four latest issues. View a wider selection of the archive from within the Magazine section of this site.