cs.IRMar 23, 2026

GraphRAG for Engineering Diagrams: ChatP&ID Enables LLM Interaction with P&IDs

Authors: Achmad Anggawirya Alimin, Artur M. Schweidtmann

Organizations: Process Intelligence Research Group, Department of Chemical Engineering, Delft University of Technology

Abstract

Large Language Models (LLMs) combined with Retrieval-Augmented Generation (RAG) and knowledge graphs offer new opportunities for interacting with engineering diagrams such as Piping and Instrumentation Diagrams (P&IDs). However, directly processing raw images or smart P&ID files with LLMs is often costly, inefficient, and prone to hallucinations. This work introduces ChatP&ID, an agentic framework that enables grounded and cost-effective natural-language interaction with P&IDs using Graph Retrieval-Augmented Generation (GraphRAG), a paradigm we refer to as GraphRAG for engineering diagrams. Smart P&IDs encoded in the DEXPI standard are transformed into structured knowledge graphs, which serve as the basis for graph-based retrieval and reasoning by LLM agents. This approach enables reliable querying of engineering diagrams while significantly reducing computational cost. Benchmarking across commercial LLM APIs (OpenAI, Anthropic) demonstrates that graph-based representations improve accuracy by 18% over raw image inputs and reduce token costs by 85% compared to directly ingesting smart P&ID files. While small open-source models still struggle to interpret knowledge graph formats and structured engineering data, integrating them with VectorRAG and PathRAG improves response accuracy by up to 40%. Notably, GPT-5-mini combined with ContextRAG achieves 91% accuracy at a cost of only $0.004 per task. The resulting ChatP&ID interface enables intuitive natural-language interaction with complex engineering diagrams and lays the groundwork for AI-assisted process engineering tasks such as Hazard and Operability Studies (HAZOP) and multi-agent analysis.

Figures & tables

Appendix figures & tables3 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. LLMs in Process Diagram Engineering: From Optimal PFDs to Validated P&IDs

    Jul 21, 2026Timur Zakarin, Sergei Voitov, Sergei Shumilin +1Large Language Model-Guided OptimizationWorkflow Automation

  2. Grounded and Faithful P&ID Reasoning: Constraining Vision-Language Models with Recovered Evidence Graphs

    Sep 5, 2026Prathamesh Gadekar, Sagar Srinivas Sakhinana, Venkataramana RunkanaVLM ReasoningFaithfulness in VLMs

  3. SynthPID: P&ID digitization from Topology-Preserving Synthetic Data

    Apr 15, 2026Suraj Prasad, Pinak MahapatraSynthetic Data Generation