# LLMs in Process Diagram Engineering: From Optimal PFDs to Validated P&IDs

arXiv: https://arxiv.org/abs/2608.11220 · HTML: https://mlsanity.com/paper/2608.11220/

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 11 of its 31 references that are in the map.
- First posted on arXiv 21 Jul 2026.

## Builds on (most cited first, 11 of 11)

- [DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence](https://mlsanity.com/paper/2606.19348/) (2026)
- [Reward Design with Language Models](https://mlsanity.com/paper/2303.00001/) (2023)
- [PyGAD: An Intuitive Genetic Algorithm Python Library](https://mlsanity.com/paper/2106.06158/) (2021)
- [Toward automatic generation of control structures for process flow diagrams with large language models](https://mlsanity.com/paper/2211.05583/) (2022)
- [An Agentic Approach to Automatic Creation of P&ID Diagrams from Natural Language Descriptions](https://mlsanity.com/paper/2412.12898/) (2024)
- [SFILES 2.0: An extended text-based flowsheet representation](https://mlsanity.com/paper/2208.00778/) (2022)
- [Learning from flowsheets: A generative transformer model for autocompletion of flowsheets](https://mlsanity.com/paper/2208.00859/) (2022)
- [Multi-agent systems for chemical engineering: A review and perspective](https://mlsanity.com/paper/2508.07880/) (2025)
- [Graph-to-SFILES: Control structure prediction from process topologies using generative artificial intelligence](https://mlsanity.com/paper/2412.00508/) (2024)
- [Talking like Piping and Instrumentation Diagrams (P&IDs)](https://mlsanity.com/paper/2502.18928/) (2025)
- [A Multi-agent System for Hybrid Optimization](https://mlsanity.com/paper/2501.09563/) (2025)

## Abstract (arXiv)

Nowadays, the creation of a process flow diagram (PFD) and its subsequent transformation into a piping and instrumentation diagram (P&ID) is predominantly performed manually. Applying artificial intelligence in the task could potentially lead not only to process automation and time savings, but also to financial gains by exploring numerous diagram's topology options and reducing manual labor. This research presents P&ID Pilot - a practical end-to-end AI pipeline capable of handling flowsheet developing for both stages. The first stage focuses on PFD synthesis, whereas the second is directed toward modifying the generated PFD into P&ID. After comparing four different methods, the hybrid approach combining genetic algorithms (GA) and large language models (LLM) is shown to generate the optimal valid PFD topology, achieving the lowest loss value among all the methods, while satisfying the required outlet flow parameters without engineering-rule violations. For the second stage, the proposed LLM-based agent successfully transforms the generated PFD into a source-grounded P&ID by producing validated, executable modifications through a restricted engineering software development kit, achieving 100% execution success while maintaining compliance with domain-specific rules and reference graph structures. This unified pipeline - coupling GA/LLM-driven synthesis with an LLM-based transformation agent - offers a feasible path toward end-to-end process design automation by producing validated, deployable outputs and substantially reduces manual engineering effort.
