PIDQA—Question Answering on Piping and Instrumentation Diagrams
This paper introduces a novel framework enabling natural language question answering on Piping and Instrumentation Diagrams (P&IDs), addressing a critical gap between engineering design documentation and intuitive information retrieval. Our approach transforms static P&IDs into queryable knowledge bases through a three-stage pipeline. First, we recognize entities in a P&ID image and organize their relationships to form a base entity graph. Second, this entity graph is converted into a Labeled Property Graph (LPG), enriched with semantic attributes for nodes and edges. Third, a Large Language Model (LLM)-based information retrieval system translates a user query into a graph query language (Cypher) and retrieves the answer by executing it on LPG. For our experiments, we augmented a publicly available P&ID image dataset with our novel PIDQA dataset, which comprises 64,000 question–answer pairs spanning four categories: (I) simple counting, (II) spatial counting, (III) spatial connections, and (IV) value-based questions. Our experiments (using gpt-3.5-turbo) demonstrate that grounding the LLM with dynamic few-shot sampling robustly elevates accuracy by 10.6–43.5% over schema contextualization alone, even under high lexical diversity conditions (e.g., paraphrasing, ambiguity). By reducing barriers in retrieving P&ID data, this work advances human–AI collaboration for industrial workflows in design validation and safety audits.
Authors
- Chialing Wei (ORCID: https://orcid.org/0000-0001-8191-9091)
- Ricardo Eiris (ORCID: https://orcid.org/0000-0001-6904-5352)
- Thomas Czerniawski (ORCID: https://orcid.org/0000-0002-7310-6522)
- Mohit Gupta (ORCID: https://orcid.org/0000-0002-0677-4811)
Institutions
- Arizona State University (US)
Publication Details
- Journal
- Machine Learning and Knowledge Extraction
- Published
- 2025-04-21
- DOI
- https://doi.org/10.3390/make7020039
- Citations
- 1
- Primary Topic
- Natural Language Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 2.48