## 3 Materials and Methods
### Implementation of Key Technologies
#### 3.2.4 Expert Models with Few-Shot Contextual Learning  
In the construction process of the expert model group, considering the limited computing resources on the server side, the background knowledge of the model is enhanced by carrying out upsampling context learning for each expert model. At the same time, the chain of thought (CoT) [44] is used to guide the model to reason, so as to further achieve the balance between computational efficiency and reasoning quality. As shown in Figure 4, in the model inference phase, the problem-solving process is decomposed into an interpretable chain process of knowledge retrieval \(\rightarrow\) logical derivation \(\rightarrow\) decision generation. Specifically, when given a sequence of correlated behaviors \(X=\{x_{1},x_{2},\ldots,x_{n}\}\), the routing gate network first activates the relevant expert model, and triggers the following process in the expert model by generating the task description and transmitting the corresponding user intention:  
Firstly, the problem is decomposed, different expert models are triggered according to the input data, and the task description of the response is generated. For example, the requirements analysis task could be described as: original requirements analysis \(\rightarrow\) business rule mapping \(\rightarrow\) architecture impact assessment \(\rightarrow\) use case modeling. Secondly, by retrieving Top-K relevant knowledge \(C=\{c_{1},c_{2},\ldots,c_{k}\}\) to extract the logical reasoning path in the solution for knowledge injection. After retrieving the relevant outcomes from the knowledge base, it is further injected into the lifting template, and few-shot context learning [45] is used for the LLM to achieve efficient model optimization without parameter training. Specifically, by constructing a structured prompt template (Equation (7)), including task description, retrieved relevant knowledge, user intention, etc., the task instructions are constructed through the above templates, and the displayed requirements of the expert model are divided into logical reasoning and answering. See Appendix A.2 for detailed prompt template settings.  
Figure 4: Construction process of expert model based on few-shot context learning.  
\[Prompt=[Role]\oplus[c_{1}]\oplus\ldots\oplus[c_{k}]\oplus[Query] \tag{7}\]  
Few-shot context learning is used to guide the optimization of the expert model, which has the following advantages: first, it can optimize the output of the model without parameter update. Compared with the traditional fine-tuning that needs to update millions of parameters, context learning only needs to adjust the example selection strategy in the prompt template, which greatly reduces the consumption of computing resources. Secondly, it can integrate dynamic knowledge, inject domain knowledge through a real-time retrieval mechanism, avoid solidifying vertical domain data to model parameters, and greatly improve the effectiveness of a single expert model. Finally, it has strong interpretability, and the visual reasoning path and retrieval basis of the thinking chain form a double explanation mechanism.