## 4 Methodology
### LLM Layer  
The model employed in this study is GPT-3.5-turbo, accessed through the OpenAI API. It represents a widely recognized decoder-only architecture within transformer-based LLMs. The parameters were configured as temperature = 0.1 and max_tokens = 1000 to balance the accuracy and diversity of the generated results. This model increases its depth and expressive capacity by stacking multiple identical decoder layers, and each layer's structure roughly matches that shown in Figure 4. The first layer receives token sequences encoded by the word embedding layer. Each layer consists of two sub-layers: the first is a masked multi-head self-attention (MHA) layer, and the second is a feed-forward network (FFN) layer. Each sub-layer employs residual connections, followed by layer normalization [38] immediately after the addition operation of the residual connections [39; 40]. Subsequent layers take the hidden states output by the previous layer as input, process them through the MHA and FFN layers, and pass the results to the next layer. The hidden states output by the final layer are fed into a linear layer called the language modeling head. The resulting logits are then converted into a probability distribution over target vocabulary using a softmax operation. \begin{table}
\begin{tabular}{c c} \hline \hline
**Sub-Prompt** & **Sub-Prompt Example** \\ \hline Role & You are a shearer maintenance domain entity tagger and need to complete the task of tagging entities for a given text fragment. \\ \hline Task & This task requires you to identify five types of entities in the text: fault category, fault symptom, fault cause, solution, fault location, and format the output as a JSON object in the format of [“entities”: [“type”: \"Type\", “entity”: \"Entity”]]. \\ \hline Rules & \(\bullet\) & Please do not output any superfluous words other than JSON. \\  & \(\bullet\) & In the case of ambiguity, it always tends to have a longer physical span. \\  & \(\bullet\) & Do not change the original field, output redundant punctuation marks. \\  & \(\bullet\) & According to the entity definition, only the five types of entities are identified, and when there is no type, the type does not need to be output. \\ \hline Terminology & \(\bullet\) & Fault category: refers to the classification of faults according to the nature, performance, and impact of faults. \\  & \(\bullet\) & Fault phenomenon: refers to the abnormal state or behavior of the equipment or system when it fails. \\  & Terminology & \(\bullet\) & Failure cause: guide to the root cause of equipment or system failure. \\  & \(\bullet\) & Solution measures: refers to the methods and steps taken to repair, adjust, or improve the equipment or system failure. \\  & \(\bullet\) & Fault location: refers to the specific location or component of the fault in the equipment or system. \\ \hline Examples & \(\bullet\) & The traction speed of the coal mining machine is slow. The brakes have not been released. Engage the brake pressure oil source to release the brakes. \\  & \(\bullet\) & [“entities”: [[“type”: \"Fault Phenomenon”, “entity”: \"The traction speed of the coal mining machine is slow”], [“type”: \"Fault Cause”, “entity”: \"The brakes have not been released”], [“type”: \"Solution Measure”, “entity”: \"Engage the brake pressure oil source to release the brakes”]]] \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Example of internal elements of the prompt. The attention mechanism is a core design component of LLMs based on the decoder-only architecture, implemented in the masked MHA layer [40]. As shown in Figure 4, the original sentence \(S\) concatenated with the structured prompt serves as the input to the LLM, with a total length of \(L\). At this stage, the token sequence of word embeddings is represented as \(X\in\mathbb{R}^{L\times d_{in}}\), generating three embedding matrices: _query_\(Q\in\mathbb{R}^{L\times d_{q}}\), _key_\(K\in\mathbb{R}^{L\times d_{k}}\), and _value_\(V\in\mathbb{R}^{L\times d_{v}}\) through the linear projection layer.