Submitted:
08 October 2026
Posted:
10 October 2026
You are already at the latest version
Abstract
Multi-plant automotive-component data contain inconsistent field names, device codes, quality codes, and unstructured production logs. This study presents an LLM-driven method for manufacturing semantic standardization and knowledge-graph reasoning. Equipment signals, production beats, quality inspections, maintenance work orders, VIN/OCR results, shutdown events, and process files are integrated to construct cross-factory semantic mapping tasks. Sentence-BERT and GPT-4o-mini perform field alignment and context correction; BERT-CRF supports entity extraction, while GraphSAGE and R-GCN infer typed anomaly relations. KG-RAG and an LLM Agent are further used for quality tracing and case retrieval. Experiments cover 4 plants, 9 production lines, 156 field categories, 780,000 production records, and 120,000 maintenance and quality texts. Under leave-one-factory-out evaluation, Sentence-BERT plus GPT-4o-mini achieves 94.1% field-matching accuracy and 94.6% precision. The 94.1% accuracy is 21.3 percentage points above rule-based mapping at 72.8%, corresponding to a 29.3% relative improvement. GraphSAGE-R-GCN obtains Hits@10 of 0.876 on the mixed split and 0.842 under factory holdout. The complete KG-RAG-Agent system reaches retrieval P@20 of 0.842, R@20 of 0.816, and 92.1% answer accuracy, while reducing mean anomaly-tracing time from 2.8 h to 54 min. These results show that semantic constraints and typed graph reasoning support cross-factory anomaly transfer and evidence-grounded knowledge reuse.
Keywords:
automotive manufacturing
; multi-plant data governance
; LLM
; knowledge graph
; GraphSAGE
; R-GCN
; Sentence-BERT
; RAG
; production anomaly reasoning
; quality traceability
1. Introduction
The data for the manufacture of multi-plant automobile components are usually derived from MES, SCADA, PLC, OCR, Quality Inspection System and Maintenance Work Order System. Different factories use different naming conventions for equipment fields, process parameters, fault codes, and maintenance records, resulting in semantic disconnection when tracking the same anomaly across factories, reuse of case studies, and transfer models.Manufacturing knowledge charts organize devices, processes, components, batches, defects, and maintenance measures into computable relational structures. The need for semantic modeling of manufacturing data for cross-system analysis has also been demonstrated by the study on the generation of Knowledge Graph for Industry 4.0[1]. At the same time, LLMs can be used to perform tasks such as entity recognition, relation extraction, and semantic completion. In order to solve these problems, a multi-plant semantic standardization task for automobile manufacturing is proposed, which combines Sentence-BERT and LLM calibration, and further builds the manufacturing knowledge graph, and integrates GraphSAGE, R-GCN, RAG, and LLM agent to realize the production anomaly inference, quality tracing and similar case retrieval.
2. Modeling the Multi-Factory Semantic Standardization Task for Automotive Manufacturing
The Multi-Factory Semantic Standardization Task uses MES, SCADA, PLC, Siemens S7-1500 Controller, Keyence SR-2000 OCR Reader and Quality Inspection Terminal as input. The data objects include 4 plants, 9 production lines, 156 different equipment fields, 780,000 production records, and 120,000 maintenance and quality control texts. Research on manufacturing knowledge charts shows that the production line data needs to be represented by entities, relationships, and attributes; the combination of LLMs and knowledge graphs can increase the ability of heterogeneous semantic completion and relational reasoning [2]. Cross-factory field mapping is defined as a semantic retrieval task with contextual constraints:
where denotes the standard semantic labels of the original field m, Y denotes the set of standard fields, denotes the BERT-generated vector of the original field, denotes the Sentence-BERT-generated vector of the standard field, Cm and Cn denote the sets of process context words, qmn denotes the LLM correction confidence, δmn denotes conflict items related to units, sampling frequency, or equipment hierarchy, and λ1 through λ4 denote weight coefficients.After normalization of the Quality Code, Equipment ID, and Repair Text in the same semantic space, the system converts the anomaly log into an entity representing the device, the process, the batch, the defect, and the repair action, and provides the GraphSAGE and the R-GCN inputs[3].
3. LLM-Enhanced Manufacturing Knowledge Graph Construction and Production Anomaly Inference Method
3.1. Multi-Source Manufacturing Data Integration and Semantic Preprocessing
OPC UA 1.04, REST API, and JDBC are used in the Multi-source Manufacturing Data Collection Layer to uniformly collect production line operational data, inspection results, and maintenance text.PLC-side data comes from Siemens S7-1500 and Mitsubishi iQ-R controllers, with a sampling interval of 100 ms to 1 s; OCR-side data comes from the Keyence SR-2000 and Cognex In-Sight 2800, and the results of the character recognition are indexed by batch number, component number, and workstation numbers.When the data flow enters Kafka 3.7, Flink 1.18 performs out of sequence correction and window aggregation based on event time; PostgreSQL 15 stores structured records, whereas MinIO stores process files and image slices. Manufacturing Knowledge Graph Framework needs a stable input of data entities. Ontology constraints in an industrial maintenance scenario also require logging text to be normalized, noise filtered, and context binding prior to entering an LLM [4].
Here, ρu represents the semantic completeness score of the record at u, Au represents the number of attributes associated with the record, ηa represents the task weight of the a th attribute, vua represents the attribute value, τua represents the attribute timestamp, represents the reference time of the same event window, and κ represents the time decay coefficient.The preprocessing module sends records where ρu < 0.65 to the LLM completion queue and converts high-confidence records into standard fields, entity candidates, and event fragments, ensuring consistent input granularity for subsequent field correction and anomaly relationship inference.
3.2. Field Semantic Alignment Method Based on Sentence-BERT and LLM Correction
The field semantic alignment module takes the first 156 categories of equipment fields, quality fields, and process parameter fields as input. First, it links the field name, the cell, the sampling rate, the device level, the workstation context, and the history of the defect tag into a semantic description text. Then, using Sentence-BERT (all-mpnet-base-v2), it generates a 768-dimensional vector and achieves the Top 5 standard field candidate recall [5]. The study of LLM-assisted KM shows that the generation model can correct entity semantics, relationship boundaries, and lack of context. Thus, GPT-class LLMs do not directly substitute for vector matching, but rather validate the process context of candidate fields. Instead, they are used to verify the process context of the candidate fields.The system maps the fields of "mold _ temp", "tooling _ temperature" and "mold temperature feedback" to the same standard field while retaining unit conversions, sampling windows, and equipment IDs. The study of LLMs and knowledge graphs shows that external structure constraints can reduce semantic drift in language models. [6] Once the results of field alignment are entered into a standard field repository, the system provides a uniform attribute entry point to extract the anomaly entity and construct the graph relation, so as to reduce the ambiguity of the field in cross-plant quality tracing.
3.3. Anomaly Entity Extraction and Missing Information Completion for Production Logs
Following the establishment of the standard field library, the Production Log Processing Module segmented 120,000 Maintenance Work Orders, Quality Texts, and Line Stoppage Records into Event Segments. Subsequently, it used BERT-Base-Multilingual-Cased in combination with CRF to identify six entities: devices, workstations, faults, causes, measures, and outcomes [7]. As a result, GPT-4o-mini only executes completion for low trust entities, missing workstations, and unclear fault causes, without directly overwriting sequence labeling output.
Here, Γr represents the composite confidence of the r th candidate entity, represents the NER model’s output score, represents the LLM’s semantic correction score, br represents the binding strength between the entity and the standard field library, gr represents the penalty term for conflicts at the unit, timestamp, or device levels, ω1 to ω4 represent weight coefficients, and σ(·) represents the Sigmoid normalization function.The system writes an Γr ≥ 0.78 entity to the candidate graph node, and sends the entity from 0.55 to 0.78 to the context complete queue. The LLM-assisted KM can decrease the loss of relation due to incomplete entity boundary, and the completed abnormal entity provides a structural input to associate the failure chain with corrective action [8].
3.4. Construction of a Manufacturing Knowledge Graph for Anomaly Reasoning
The standard field and the abnormal entity are introduced into the building module of manufacturing knowledge graph. The system uses Neo4j 5.20 to store an attribute chart, which includes devices, processes, parts, batches, defects, corrective actions, and quality outcomes that serve as core node types.The diagram of the manufacturing knowledge diagram for abnormal reasoning is illustrated in Figure 1. Relationships between nodes no longer remain static archival links but form computable chains centered on the "anomaly occurrence location — process impact path — batch quality outcome — repair feedback loop." The study on the production line knowledge graph shows that a stable schema is needed to realize the cross-system semantic organization, and the LLM-enhanced ontology engineering can enhance the automatization of entity relation modeling [9].
In the relationship-building phase, the co-occurrence of the same batch, the proximity to the same device, the shared process constraints, and the maintenance feedback are transformed into typed edges. Relation types are found _ in, processed _ by, cause, repaired _ by, influence, and similar _ to. GPT-class LLMs only participate in the verification of low confidence relationships and limit the extent of relation generation in conjunction with process document fragments to avoid overinterpreting anomalous causes.The resulting graph consists of about 186,000 entity nodes and 943,000 relationship edges. Node attributes include plant ID, production line ID, time window, data source, and reliability score, which can be used to complete the production abnormal relation and trace the quality.
3.5. Production Anomaly Relationship Inference Model Integrating GraphSAGE and R-GCN
After assigning graph nodes, the reasoning model treats device, process, batch, defect, and repair nodes as heterogeneous inputs. GraphSAGE aggregates local neighborhood states, whereas R-GCN distinguishes typed relations such as cause, influence, and repaired_by. Knowledge-graph reasoning converts data-driven anomaly signals into traceable causal chains [10]. To preserve node state, relation type, and edge attributes, the representation update is defined as:
where denotes the representation vector of node i at layer t, L denotes the set of relationship types, denotes the set of neighbors connected to node i via relationship𝓁, α𝓁 denotes the relationship weight, and denote trainable matrices, denotes edge attribute encoding, || denotes vector concatenation, and σ denotes a nonlinear activation function. Training uses 1:5 negative sampling, 256 hidden dimensions, AdamW, a 0.001 learning rate, batch size 4096, 100 epochs, early stopping with patience 10, and random seed 42. For ablation, GraphSAGE-only removes relation-specific propagation, R-GCN-only removes GraphSAGE pre-aggregation, and the rule-path baseline ranks candidate edges by co-occurrence support and process-constraint confidence. All variants share identical folds and negative samples and are evaluated with precision, recall, F1, MRR, and Hits@K.
4. Experimental Design and Results Analysis
4.1. Experimental Dataset Construction and Parameter Settings
The experimental data come from a Magna-Class multi-plant automotive exterior-component scenario with 4 plants, 9 production lines, 156 field categories, 780,000 production records, and 120,000 maintenance and quality texts. Experiments use Ubuntu 22.04, Python 3.10, PyTorch 2.3, Neo4j 5.20, Intel Xeon Gold 6338 CPUs, 256 GB RAM, and an RTX 6000 Ada GPU. Evaluation follows four-round leave-one-factory-out splitting. In each round, one plant is reserved for testing; its field aliases, device IDs, batches, documents, and graph nodes do not enter training. The other three plants are split 8:2 by event time for training and validation. Sentence-BERT uses Top-5 candidates; GPT-4o-mini uses temperature 0 and a fixed prompt. Graph training uses 186,000 nodes, 943,000 edges, seed 42, and Section 3.5 settings. Results are macro-averaged over four held-out plants. Accuracy, macro-precision, macro-recall, macro-F1, MRR, Hits@K, retrieval P@K/R@K, and cross-factory consistency are defined below. N, C, Q, rq, , and Gq denote sample count, class count, query count, correct-candidate rank, retrieved Top-K set, and gold evidence set.
Here, TPc, FPc, FNc denote true-positive, false-positive, and false-negative decisions for class or relation c; Pc, Rc are its precision and recall. rq is the rank of the correct candidate for query q. is the Top-K retrieved evidence set and Gq is the annotated relevant-evidence set. CFC denotes cross-factory consistency, calculated as the proportion of comparable cross-factory field instances assigned to the same canonical semantic label.
4.2. Accuracy Testing for Multi-Factory Field Semantic Matching
Field semantic matching results are presented in Table 1 as macro-averages from four leave-one-factory-out folds. Rule-based mapping reaches 72.8% accuracy and 73.5% precision and remains sensitive to short, cross-language, and device-mixed fields. Sentence-BERT all-mpnet-base-v2 with GPT-4o-mini correction reaches 94.1% accuracy, 94.6% precision, 93.5% recall, and 94.0% F1. Thus, 21.3 denotes an absolute accuracy gain of 21.3 percentage points over 72.8%, while the relative accuracy improvement is 29.3%; the precision gain is 21.1 percentage points, or 28.7% relative to the 73.5% baseline. Held-out accuracies for Plants A-D are 92.8%, 93.7%, 94.6%, and 95.3%, respectively, with 95.6% cross-factory semantic consistency. The limited spread across held-out plants indicates that semantic alignment is preserved when plant-specific aliases and recurring terminology are excluded from training.
4.3. Testing the Performance of Entity Extraction in Unstructured Maintenance and Quality Logs
Entity extraction results from 120,000 maintenance and quality texts showed a higher consistency after stabilization of the standard fields. As illustrated in Figure 2, the average F1 score of BERT-CRF was 89.7% across the five entities: Equipment, Workstation, Fault, Maintenance, and Quality Outcome. This was increased to 93.8 percent when GPT-4o-mini was added for refinement. In particular, the F1 score of the defect entity was raised from 88.6% to 94.2%, and that of the maintenance activity entity from 87.9% to 92.7%. The number of candidate nodes whose confidence was higher than 0.78 was 86.4% and that of low confidence nodes was 6.7%, which showed that the quality of input was significantly improved.
4.4. Knowledge Graph Anomaly Relationship Inference Performance Testing
Knowledge-graph relation inference is evaluated with classification and ranking metrics under identical negative samples. On the mixed record-level split, GraphSAGE-R-GCN reaches precision 0.861, recall 0.836, F1 0.848, MRR 0.642, and Hits@10 0.876. The cause relation retains the highest mixed-split Hits@10 at 0.891. Table 2 reports the stricter leave-one-factory-out ablation. The complete model obtains precision 0.843, recall 0.818, F1 0.830, MRR 0.617, and Hits@10 0.842; held-out Hits@10 values for Plants A-D are 0.823, 0.838, 0.846, and 0.861. GraphSAGE-only reaches F1 0.759 and Hits@10 0.771, whereas R-GCN-only reaches F1 0.788 and Hits@10 0.814. The rule-path baseline reaches F1 0.637 and Hits@10 0.571. The component ablations show that neighborhood aggregation and typed relation propagation provide complementary contributions to anomaly-edge ranking across unseen factories.
4.5. Cross-Factory Quality Anomaly Traceability and Similar Case Retrieval Performance Testing
Cross-factory tracing and retrieval results are shown in Figure 3 .All six strategies use the same per-fold reference corpus, 600 held-out anomaly queries, and Top-20 cutoff. BM25 keyword retrieval obtains P@20/R@20 of 0.611/0.552, Sentence-BERT vector retrieval 0.694/0.645, graph retrieval 0.754/0.709, RAG without an agent 0.781/0.747, agent-based retrieval 0.806/0.778, and KG-RAG-Agent 0.842/0.816. Relative to vector retrieval, the complete system increases R@20 by 17.1 percentage points, or 26.5% relatively. Final-answer factual accuracy is 86.3%, 89.5%, and 92.1% for RAG, agent-based retrieval, and KG-RAG-Agent, while evidence consistency is 87.1%, 90.2%, and 92.4%. Figure 3 further shows that mean tracing time falls from 2.8 h to 54 min, with 88.9% evidence-fragment hit rate, 91.7% graph-path integrity, 89.6% defect-equipment-maintenance closure, and 6.1% manual-review error. P@K and R@K denote retrieved relevant evidence divided by K and by the total relevant evidence, respectively.
5. Conclusions
The integration of LLM semantic correction, manufacturing knowledge graphs, and GraphSAGE-R-GCN reasoning supports cross-factory anomaly analysis under plant-level holdout. Sentence-BERT plus GPT-4o-mini reaches 94.1% field-matching accuracy, an absolute gain of 21.3 percentage points over rule mapping, while GraphSAGE-R-GCN obtains 0.842 Hits@10 on unseen factories. Under identical corpora and queries, KG-RAG-Agent reaches P@20 0.842, R@20 0.816, and 92.1% final-answer accuracy. The separation of semantic matching, graph prediction, retrieval, and generation metrics identifies the contribution of each component to quality tracing and case reuse across factories.
References
- Wu, P.; Tu, H.; Mou, X.; et al. An intelligent energy management method for the manufacturing systems using the knowledge graph and large language model[J]. J. Intell. Manuf. 2026, 37(3), 1125–1144. [Google Scholar] [CrossRef]
- Yahya, M.; Ali, A.; Mehmood, Q.; et al. A benchmark dataset with Knowledge Graph generation for Industry 4.0 production lines[J]. Semant. Web 2024, 15(2), 461–479. [Google Scholar] [CrossRef]
- Zhu, X.; Xie, Y.; Liu, Y.; et al. Knowledge graph-guided retrieval augmented generation[C]//Proceedings of the 2025 Conference of the Nations of the Americas Chapter of the Association for Computational Linguistics: Human Language Technologies. Long. Pap. 2025, Volume 1, 8912–8924. [Google Scholar] [CrossRef]
- Wang, P.; Karigiannis, J.; Gao, R. X. Ontology-integrated tuning of large language model for intelligent maintenance. CIRP Ann. 2024, 73(1), 361–364. [Google Scholar] [CrossRef]
- Dehal, R. S.; Sharma, M.; Rajabi, E. Knowledge graphs and their reciprocal relationship with large language models. Mach. Learn. Knowl. Extr. 2025, 7(2), 38. [Google Scholar] [CrossRef]
- Ibrahim, N.; Aboulela, S.; Ibrahim, A.; et al. A survey on augmenting knowledge graphs (KGs) with large language models (LLMs): models, evaluation metrics, benchmarks, and challenges. Discov. Artif. Intell. 2024, 4(1), 76. [Google Scholar] [CrossRef]
- Meyers, B.; Vangheluwe, H.; Lietaert, P.; et al. Towards a knowledge graph framework for ad hoc analysis in manufacturing. J. Intell. Manuf. 2024, 35(8), 3731–3752. [Google Scholar] [CrossRef]
- Meyer, L. P.; Stadler, C.; Frey, J.; et al. Llm-assisted knowledge graph engineering: Experiments with chatgpt[C]//Working conference on artificial intelligence development for a resilient and sustainable tomorrow; Springer Fachmedien Wiesbaden: Wiesbaden, 2023; pp. 103–115. [Google Scholar] [CrossRef]
- Val-Calvo, M.; Aranguren, M. E.; Mulero-Hernández, J.; et al. OntoGenix: Leveraging Large Language Models for enhanced ontology engineering from datasets. Inf. Process. Manag. 2025, 62(3), 104042. [Google Scholar] [CrossRef]
- Klein, P.; Malburg, L.; Bergmann, R. Combining informed data-driven anomaly detection with knowledge graphs for root cause analysis in predictive maintenance. Eng. Appl. Artif. Intell. 2025, 145, 110152. [Google Scholar] [CrossRef]
Figure 1.
Schema and Relationship Path Diagram of the Manufacturing Knowledge Graph for Anomaly Inference.
Figure 1.
Schema and Relationship Path Diagram of the Manufacturing Knowledge Graph for Anomaly Inference.

Figure 2.
Entity extraction results from unstructured maintenance and quality logs.

Figure 3.
Cross-Factory Quality Anomaly Traceability and Similar Case Retrieval Performance.

Table 1.
Test Results for Multi-Factory Field Semantic Matching Accuracy.
| Method | Accuracy/% | Precision/% | Recall/% | F1/% | Cross-Factory Consistency/% |
|---|---|---|---|---|---|
| Rule-based Mapping | 72.8 | 73.5 | 71.9 | 72.7 | 76.4 |
| TF-IDF + Cosine | 78.6 | 79.1 | 77.8 | 78.4 | 81.2 |
| BERT-base Matching | 86.3 | 86.8 | 85.4 | 86.1 | 88.7 |
| Sentence-BERT all-mpnet-base-v2 | 90.5 | 91.0 | 89.8 | 90.4 | 92.3 |
| Sentence-BERT + GPT-4o-mini Correction | 94.1 | 94.6 | 93.5 | 94.0 | 95.6 |
Table 2.
Ablation Results for Knowledge-Graph Anomaly Relationship Prediction under Factory Holdout.
Table 2.
Ablation Results for Knowledge-Graph Anomaly Relationship Prediction under Factory Holdout.
| Method | Precision | Recall | F1 | MRR | Hits@10 |
|---|---|---|---|---|---|
| Rule-path | 0.654 | 0.621 | 0.637 | 0.388 | 0.571 |
| TransE | 0.706 | 0.674 | 0.690 | 0.452 | 0.667 |
| DistMult | 0.722 | 0.695 | 0.708 | 0.478 | 0.699 |
| GraphSAGE | 0.773 | 0.746 | 0.759 | 0.537 | 0.771 |
| R-GCN | 0.801 | 0.776 | 0.788 | 0.579 | 0.814 |
| GraphSAGE + R-GCN | 0.843 | 0.818 | 0.830 | 0.617 | 0.842 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.