## 4 Experimental Testing
### Theoretical Analysis
#### 4.2.5 Pre-Processing  
The pre-processing stage involves: _prompting_, _word segmentation and encoding_, and the use of _decoding hyperparameters_. Prompting  
Before being used in either the training or inference processes, the question-answer pairs in the case of training, or questions in the case of inference, are subjected to the prompt shown in Figure 8 rather than being directly entered. The rationale for this approach is to initialise an input prompt, thus enabling the _Expert-B_ and Phoenix models to activate zero-shot mode and understand the context of an ongoing conversation (i.e., between a human and an assistant-bot) that is also required to deliver not only a helpful response but also one that is polite and courteous. A chat between a curious human and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the human's questions. Human: 
 Instruction 
 Assistant: 
 Answer 
. Figure 8: Prompt used to wrap instruction used in the testing and evaluation for Phoenix and Vicuna. As the data produced by the GPT-3.5-turbo API is free of \"messy characters and stop words\", it can be directly used in the word segmentation and encoding stage. For this stage, the 'BLOOM' module forms the backbone, and thus the provided tokeniser in the 'BLOOM' module is used directly. Figure 9 displays the detailed configuration of the 'BLOOM' tokeniser. During the training process, each input is divided into three different components: \((input\_ids)\), \((attention\_mask)\), and \((label\_ids)\). Assuming that after segmentation we have a set of \((n)\) tokens of a sentence, then Equations (10) and (11) apply:  
\[ids_{i}\ =\ token\_to\_ids(token_{i}) \tag{10}\]  
\[input\_=\ [ids_{1},\ ids_{2}\ldots ids_{n}]\ \in\mathbb{R}^{n} \tag{11}\]  
Based on the rules outlined in (10) every token in a sentence will be transformed into an ID that corresponds to the 'BLOOM' tokeniser vocabulary following segmentation. During the label masking stage, the \((label\_ids)\) (14) is used to identify which tokens in the \((input\_ids)\) sequence that the model needs to learn. The answer is the part of the input sequence the model must learn to correctly respond to the question. Therefore, during masking, all tokens except for the answer's \((ids)\) to \(((IGNORE\_ID)=(-100))\) must be set. The following Equations (12) and (13) set out the conditions where the \(IN\) the answer (or) \(NOT\) in the answer apply, respectively; Equation (12) identifies the _label_ and Equation (13) identifies the _mask_. \[label_{i}= \begin{cases}ids_{i}&\text{if }ids_{i}\text{ in Answer}\\ -100&\text{otherwise}\end{cases}  \tag{12}\]  
\[mask_{i}= \begin{cases}1&\text{if }ids_{i}\text{ not in Answer}\\ 0&\text{otherwise}\end{cases}  \tag{13}\]  
As discussed in section \(A\) on masked self-attention, the attention mask (15) is used to mask the answer during training so that the model is not able to attend to it. In other words, during training, the attention mechanism can only attend to the non-masked tokens and must learn to infer the answer based on the context provided by these tokens. \[label\_ids\ =\ [label_{1},\ label_{2}\ldots label_{n}]\in\mathbb{R}^{n} \tag{14}\]  
\[attention\_mask\ =\ [mask_{1},\ mask_{2}\ldots mask_{n}]\ \in\mathbb{R}^{n} \tag{15}\]  
Decoding Hyperparameters  
To provide a basis for an unbiased comparison (of the _Expert-B_ and Phoenix models) the same decoding _hyperparameters_ were used as those employed by Vicuna [55]. In both cases a function is generated provided by 'Hugging Face' (ROOTS) where most of the configurations use the default settings such as \((top\_k)\) and \((top\_p)\), etc. However, Vicuna adjusts to the \((temperatureparameter)\) by setting it to \((0.7)\) and also sets the \((max\_new\_token)\) value to \((1024)\). Evaluation  
As previously stated in Section 4.2.3, to assess the relative quality of two answers Phoenix employs the 'GPT-3.5-turbo' API to solicit ratings for potential answers. These  
Figure 9: BLOOM tokeniser configuration.