ChatP&ID

ChatP&ID lets engineers ask questions about Piping and Instrumentation Diagrams (P&IDs) in natural language. Smart P&IDs are turned into knowledge graphs that large language model (LLM) agents query through retrieval tools, so that answers are grounded in the actual plant topology.

Challenge

P&IDs are the backbone of process engineering, but they are dense and large. Retrieving information from them is time-consuming and error-prone, especially across bundles of diagrams. General-purpose LLMs cannot reliably read P&ID images, and feeding complete Smart P&ID files into an LLM is expensive and still leads to hallucinations.

Our approach

ChatP&ID is a GraphRAG (graph-based retrieval-augmented generation) framework for engineering diagrams. It builds on our digitization work: the Digitization Companion (DigiCo) converts legacy P&IDs in image or PDF format into machine-readable Smart P&IDs in the DEXPI format. Using our open-source library pyDEXPI, the DEXPI P&IDs are transformed into semantically rich knowledge graphs. LLM agents then query these graphs through retrieval tools and answer questions in a chat interface.

In the study published in the AIChE Journal (2026):

  • graph representations improved accuracy by 18% compared with raw image input;
  • token costs fell by 85% compared with ingesting Smart P&ID files directly;
  • the ContextRAG approach reached 91% accuracy at about $0.004 per query (GPT-5-mini);
  • for smaller open-source models, vector retrieval improved accuracy by up to 40%.

This lays the groundwork for AI-assisted HAZOP, automated P&ID checking, and multi-agent engineering workflows.

Partners & funding

  • ChatP&ID is part of the Smart P&ID platform developed in the Digitization Companion (DigiCo).
  • The work builds on the DEXPI standard; Artur M. Schweidtmann is Vice Chair of the Scientific Advisory Board of the DEXPI Initiative.

Key publications

  • Alimin, A. A., & Schweidtmann, A. M. (2026). GraphRAG for engineering diagrams: ChatP&ID enables LLM interaction with P&IDs. AIChE Journal, 72, e70540. doi:10.1002/aic.70540
  • Alimin, A. A., Goldstein, D. P., Schulze Balhorn, L., & Schweidtmann, A. M. (2025). Talking like Piping and Instrumentation Diagrams (P&IDs). Systems and Control Transactions (Proceedings of ESCAPE 35, Ghent). doi:10.69997/sct.159477
  • Goldstein, D. P., Schulze Balhorn, L., Alimin, A. A., & Schweidtmann, A. M. (2025). pyDEXPI: A Python framework for piping and instrumentation diagrams (P&IDs) using the DEXPI information model. Systems and Control Transactions (Proceedings of ESCAPE 35, Ghent). doi:10.69997/sct.139043