Automated P&ID Compliance Checking via LLM-Based Code Generation

Heejun Youn1,2, Miyoung Uhm1,2, Juho Han1,2, Justin S. Lee2, H. David Jeong3, Ghang Lee1,2,4
1 Yonsei University, Seoul, Republic of Korea
2 Yonsei University, Seoul, South Korea
3 Texas A&M University, Texas, United States of America.
4 Technical University of Munich, Munich, Germany
DOI: 10.35490/EC3.2026.260
Abstract: Manual P&ID review is time-consuming, while existing image-based or hard-coded automation methods lack efficiency. We propose a hybrid framework that extracts P&ID data from DXF files and converts natural language rules into FOL-based Python verification modules. By restricting the LLM to code generation, the framework ensures deterministic rule verification via formal logic. Evaluated on four industrial drawings (140 objects, 587 checks), our approach achieves a 97.5% F1-score, compared to 55.9% for the image-based LLM baseline. This enables non-experts to automate design, conditional, and engineering rules, advancing QA in digital twin environments.
Keywords: compliance checking, Digital Twin, Large Language Model(LLM), P&ID, rule set

Presentation video

Successfully submitted

Your submission has been received. We will review your details and contact you soon.