This thesis explores the application of large language models to enhance process efficiency intasks related to industrial schematics, specifically focusing on the automated grouping ofmodules within Piping and Instrumentation Diagrams (P&IDs). Motivated by the often repetitiveand cumbersome nature of manually creating these logical groupings, the research investigatesthe capability of large language models to generate reasonable estimates for this complex taskgiven limited training data. The proposed methodology involves a multi-step preprocessingpipeline: digitizing P&ID images, converting them into a graph-based representation, and finallytransforming the graph into a structured text format suitable for large language model input. The study evaluates various augmentations for large language models, including temperaturescaling, in-context learning, reasoning models, and multiple generations. Performance isassessed through a combination of automated metrics and manual testing metrics. Findingsindicate that in-context learning significantly improves the grouping prediction accuracy. Theresearch demonstrates the viability of large language models for automating tasks involvingcomplex visual documents like P&IDs, emphasising the role of effective data preprocessing.