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.
| Authors | Gupta, Mohit and Wei, Chialing and Czerniawski, Thomas and Eiris, Ricardo |
|---|---|
| Year | 2025 |
| Venue | Machine Learning & Knowledge Extraction |
| DOI | 10.3390/make7020039 |
| Source Database | EBSCO (Applied Science & Technology) |
| Bridge-to-GNN | Category Borderline |
| GNN Architecture | Knowledge Graph Embedding (heuristic — verify) |
| Graph Encoding | Not yet extracted from PDF |
| AEC Task | Not yet extracted from PDF |
| Cohort | Mature Applications (2024–2026) |
| Implementation Framework | NetworkX, Revit / Dynamo, Neo4j (heuristic — verify) |
|---|---|
| Primary Metric | Accuracy (heuristic — verify) |
| Primary Value | 43.5% (heuristic — verify) |
| Key Finding | framework for making P&IDs queryable with natural language (heuristic — verify) |
| Quality Assessment | 2/6 · rigor: Low · Code/Data: ✓Baseline: ✓ (heuristic — verify) |
| GNN architectures detected | Knowledge Graph Embedding (TransE/RotatE/DistMult) |
|---|---|
| Frameworks / libraries | NetworkX · Revit / Dynamo · AutoCAD · Neo4j / Cypher · OpenAI / GPT API |
| Code repositories found in text | https://github.com/mgupta70/PIDQA · https://github.com/mgupta7 · https://github.com/facebookresearch/ |
| Reported metrics + values | F1 Score: 0.998 |
| Quality (heuristic, 6-flag) | 2/6 · rigor: Low Code/Data: ✓Benchmark: —Baseline: ✓CV/Split: —Ablation: —Reproducible: — |
Part of the GML/GNN in AEC Systematic Review (PRISMA 2020) — 112 papers, 2020–2026