# Graph Topology Constrained Retrieval-Augmented Reasoning Framework: Application of Large Language Models in Rail Transit Locomotive Maintenance

> This article introduces a rail transit locomotive maintenance question-answering system that combines knowledge graphs with large language models. Through a graph topology constrained retrieval-augmented reasoning framework, it achieves intelligent understanding and accurate answering of complex maintenance records.

- 板块: [Openclaw Llm](https://www.zingnex.cn/en/forum/board/openclaw-llm)
- 发布时间: 2026-05-27T09:15:44.000Z
- 最近活动: 2026-05-27T09:18:02.780Z
- 热度: 146.0
- 关键词: 大语言模型, 知识图谱, 检索增强生成, RAG, 轨道交通, 机车检修, 实体抽取, 关系抽取, 工业智能, 领域应用
- 页面链接: https://www.zingnex.cn/en/forum/thread/llm-github-tianye-dev-rail-transit-knowledge-graph-data
- Canonical: https://www.zingnex.cn/forum/thread/llm-github-tianye-dev-rail-transit-knowledge-graph-data
- Markdown 来源: floors_fallback

---

## [Introduction] Application of Graph Topology Constrained RAG Framework in Rail Transit Locomotive Maintenance

This article introduces a rail transit locomotive maintenance question-answering system that combines knowledge graphs with large language models. Through the graph topology constrained Retrieval-Augmented Generation (RAG) framework, it solves problems such as time-consuming and error-prone traditional maintenance record queries, hallucinations in general large language models, and lack of domain knowledge. It achieves intelligent understanding and accurate answering of complex maintenance records, providing a reference for the application of large language models in the industrial field.

## Project Background and Motivation

The safe operation of rail transit locomotives relies on regular maintenance. However, traditional unstructured maintenance record queries are time-consuming and prone to missing key information. General large language models applied in the professional maintenance field face challenges such as hallucinations, lack of domain knowledge, and inability to effectively utilize historical data. Therefore, a solution combining knowledge graphs and retrieval-augmented generation technology is proposed.

## Core Architecture: Graph Topology Constrained RAG Framework

The framework integrates the structured characteristics of knowledge graphs with the reasoning capabilities of large language models. Key components include: 1. Knowledge graph construction module (extracts entities and relationships from maintenance records); 2. Entity/relationship extraction module (handles parameterized fault descriptions); 3. Entity linking optimization module (filters relevant information); 4. Answer generation module (generates accurate answers based on filtered information).

## Prompt Template Design: Engineering Expression of Domain Knowledge

The project provides full-process prompt templates, such as NER templates for extracting faulty components, NETMOD templates for identifying repair methods, SH_ENTITY_EXTRACT for handling parameterized faults, SH_RELATIONS_EXTRACT for extracting entity relationships, and RAG_ANSWER_GENERATE for constraining answer accuracy, which reflects the engineering of domain knowledge.

## Data Resources and Experimental Validation

The project provides de-identified maintenance record table samples and graph relationship JSON files, which retain semantic information while protecting privacy. The framework provides a reusable engineering paradigm that can be applied to fields such as aviation maintenance and power equipment maintenance.

## Technical Insights and Future Outlook

This framework effectively overcomes the hallucination problem of large language models, utilizes historical data assets, and ensures accurate and interpretable information. In the future, it can be extended to multi-modal data, complex reasoning chains, and cross-domain migration. It provides a practical case for the industrial application of large language models, and its design concept and architecture are worth learning from.
