Table of Contents
Fetching ...

An Agentic Approach to Automatic Creation of P&ID Diagrams from Natural Language Descriptions

Shreeyash Gowaikar, Srinivasan Iyengar, Sameer Segal, Shivkumar Kalyanaraman

TL;DR

This work addresses the manual, error-prone process of creating P&IDs by introducing the ACPID Copilot, a multi-step agentic system that generates P&IDs from natural language prompts. The solution produces a DEXPI XML representation, a Visio diagram, and a natural language description, with a Human-in-the-Loop for validation and provenance. It combines Plan-and-Execute Agents, a domain-specific intermediate DSL, and a deterministic translation to DEXPI XML, achieving substantial gains in soundness and completeness over zero-shot and few-shot baselines. The approach demonstrates potential for more efficient, auditable diagram generation and lays groundwork for broader automation in process engineering, while noting limitations such as prompt design sensitivity and dataset scarcity for industrial-grade validation.

Abstract

The Piping and Instrumentation Diagrams (P&IDs) are foundational to the design, construction, and operation of workflows in the engineering and process industries. However, their manual creation is often labor-intensive, error-prone, and lacks robust mechanisms for error detection and correction. While recent advancements in Generative AI, particularly Large Language Models (LLMs) and Vision-Language Models (VLMs), have demonstrated significant potential across various domains, their application in automating generation of engineering workflows remains underexplored. In this work, we introduce a novel copilot for automating the generation of P&IDs from natural language descriptions. Leveraging a multi-step agentic workflow, our copilot provides a structured and iterative approach to diagram creation directly from Natural Language prompts. We demonstrate the feasibility of the generation process by evaluating the soundness and completeness of the workflow, and show improved results compared to vanilla zero-shot and few-shot generation approaches.

An Agentic Approach to Automatic Creation of P&ID Diagrams from Natural Language Descriptions

TL;DR

This work addresses the manual, error-prone process of creating P&IDs by introducing the ACPID Copilot, a multi-step agentic system that generates P&IDs from natural language prompts. The solution produces a DEXPI XML representation, a Visio diagram, and a natural language description, with a Human-in-the-Loop for validation and provenance. It combines Plan-and-Execute Agents, a domain-specific intermediate DSL, and a deterministic translation to DEXPI XML, achieving substantial gains in soundness and completeness over zero-shot and few-shot baselines. The approach demonstrates potential for more efficient, auditable diagram generation and lays groundwork for broader automation in process engineering, while noting limitations such as prompt design sensitivity and dataset scarcity for industrial-grade validation.

Abstract

The Piping and Instrumentation Diagrams (P&IDs) are foundational to the design, construction, and operation of workflows in the engineering and process industries. However, their manual creation is often labor-intensive, error-prone, and lacks robust mechanisms for error detection and correction. While recent advancements in Generative AI, particularly Large Language Models (LLMs) and Vision-Language Models (VLMs), have demonstrated significant potential across various domains, their application in automating generation of engineering workflows remains underexplored. In this work, we introduce a novel copilot for automating the generation of P&IDs from natural language descriptions. Leveraging a multi-step agentic workflow, our copilot provides a structured and iterative approach to diagram creation directly from Natural Language prompts. We demonstrate the feasibility of the generation process by evaluating the soundness and completeness of the workflow, and show improved results compared to vanilla zero-shot and few-shot generation approaches.

Paper Structure

This paper contains 24 sections, 3 figures, 2 tables.

Figures (3)

  • Figure 1: An example of a simple P&ID sheet dexpi-pid-example. It entails Equipments (Tank, Heat Exchangers and pumps), Piping Systems, Instruments (Globe Valves, Ball Valves, Pipe Reducers, Butterfly Valve, Spring Loaded Globe Safety Valve and Swing Check Valves), Pipe Off Page Connectors and Actuating Systems.
  • Figure 2: The architectural block diagram of the ACPID Copilot
  • Figure 3: Illustrative outputs from zero-shot generation, few-shot generation, and our proposed Copilot. Errors are highlighted in red for clarity. Ellipsis indicate correct but lengthy content. The ACPID Copilot exhibits observable improvement in reliability, producing near-ground-truth examples of DEXPI XML.