LLM-R: A Framework for Domain-Adaptive Maintenance Scheme Generation Combining Hierarchical Agents and RAG

Laifa Tao,Qixuan Huang,Xianjun Wu,Weiwei Zhang,Yunlong Wu,Bin Li,Chen Lu,Xingshuo Hai
2024-11-07
Abstract:The increasing use of smart devices has emphasized the critical role of maintenance in production activities. Interactive Electronic Technical Manuals (IETMs) are vital tools that support the maintenance of smart equipment. However, traditional IETMs face challenges such as transitioning from Graphical User Interfaces (GUIs) to natural Language User Interfaces (LUIs) and managing complex logical relationships. Additionally, they must meet the current demands for higher intelligence. This paper proposes a Maintenance Scheme Generation Method based on Large Language Models (LLM-R). The proposed method includes several key innovations: We propose the Low Rank Adaptation-Knowledge Retention (LORA-KR) loss technology to proportionally adjust mixed maintenance data for fine-tuning the LLM. This method prevents knowledge conflicts caused by mixed data, improving the model's adaptability and reasoning ability in specific maintenance domains, Besides, Hierarchical Task-Based Agent and Instruction-level Retrieval-Augmented Generation (RAG) technologies are adopted to optimize the generation steps and mitigate the phenomenon of hallucination caused by the model's Inability to access contextual information. This enhancement improves the model's flexibility and accuracy in handling known or unknown maintenance objects and maintenance scheme scenarios. To validate the proposed method's effectiveness in maintenance tasks, a maintenance scheme dataset was constructed using objects from different fields. The experimental results show that the accuracy of the maintenance schemes generated by the proposed method reached 91.59%, indicating which improvement enhances the intelligence of maintenance schemes and introduces novel technical approaches for equipment maintenance.
Machine Learning
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is the challenges faced by traditional Interactive Electronic Technical Manuals (IETMs) in maintaining complex devices in the context of the increasing popularity of smart devices. Specifically, these problems include: 1. **Transition from Graphical User Interfaces (GUIs) to Natural Language User Interfaces (LUIs)**: Traditional IETMs mainly rely on graphical interfaces and are difficult to adapt to the needs of natural language processing. 2. **Managing complex logical relationships**: Traditional IETMs are difficult to effectively process and display complex logical relationships, resulting in maintenance plans that are not comprehensive or accurate enough. 3. **The need for higher intelligence**: As the complexity of devices increases, maintenance tasks also become more complex, and traditional systems cannot meet the requirements of modern maintenance operations for intelligence. To solve the above problems, the paper proposes a method for generating maintenance plans based on large - language models (LLM - R). This method improves the intelligence level of maintenance plans through the following innovations: - **Low - Rank Adaptation - Knowledge Retention (LORA - KR) loss technique**: Fine - tune by proportionally adjusting the mixed maintenance data to prevent knowledge conflicts caused by data mixing and improve the adaptability and reasoning ability of the model in specific maintenance fields. - **Hierarchical Task - Based Agents and Instruction - level Retrieval - Augmented Generation (Instruction - level RAG) technique**: Optimize the generation steps, alleviate the hallucination phenomenon of the model due to inability to access context information, and enhance the flexibility and accuracy of the model in handling known or unknown maintenance objects and scenarios. In addition, the paper also constructs a maintenance plan data set containing objects in different fields and verifies the effectiveness of this method through experiments. The experimental results show that the accuracy rate of the maintenance plans generated by this method reaches 91.59%, indicating that it can significantly improve the intelligence level of maintenance plans and introduce new technical means for device maintenance. ### Formula Representation To ensure the correctness and readability of the formulas, the following are the Markdown - format representations of some key formulas and techniques involved in the paper: - **LORA - KR Loss Function**: \[ \mathcal{L}_{\text{LORA - KR}}=\alpha\cdot\mathcal{L}_{\text{original}}+(1 - \alpha)\cdot\mathcal{L}_{\text{mixed}} \] where \(\alpha\) is a weight parameter, and \(\mathcal{L}_{\text{original}}\) and \(\mathcal{L}_{\text{mixed}}\) are the loss functions of the original data and the mixed data respectively. - **Vector Embedding and Retrieval in RAG Technology**: \[ \text{embedding}(x)=f(x;W_q,W_k,W_v) \] \[ \text{retrieval}(q)=\arg\max_{d\in D}\text{similarity}(q,d) \] where \(f\) is an embedding function, \(W_q,W_k,W_v\) are weight matrices, and \(\text{similarity}\) is a similarity calculation function. These techniques and methods work together to enable LLM - R to generate more accurate and practical maintenance plans in complex maintenance tasks.