## 3 The Proposed Conversational System: CORES
### Workflow of CORES
#### 3.5.3 Emotion Embedding  
The third phase of CORES integrates an innovative emotional component using the RoBERTa model [41; 42]. This advanced NLP-based model identifies and processes the emotional sentiments expressed by users in their input messages. RoBERTa is chosen for emotion detection in CORES due to its superior performance in NLP tasks, particularly in emotion analysis and classification. We have specifically incorporated RoBERTa because it is fine-tuned to recognize a wide range of emotions (e.g., happiness, anger, sadness, excitement), which is crucial to accurately interpreting users' emotions. For each emotional comment \(c_{ij}\) posted by a user \(U_{j}\) on an item \(I_{i}\), the RoBERTa model extracts feature embeddings. The comment \(c_{ij}\) consists of a sequence of words \(word_{1}.word_{2}\dotsword_{M_{ij}}\). The model processes the comment and extracts the final layer embeddings to create an emotional comment embedding \(E_{c_{ij}}\) defined as:  
\[E_{c_{ij}}=Concat\Big{(}E_{word_{I_{ij}}},E_{word_{I_{ij}}},\dots,E_{word_{M_{ ij}}}\Big{)} \tag{3}\]  
where \(M_{ij}\) is the total number of words in the comment \(c_{ij}\). By following the same embedding process with RoBERTa, the embedding vectors of the corresponding comments under the same item are obtained. 3.5.4. User's Request Embedding and Preferences Modeling  
We focus on transforming a user's request \(Q\) into a contextual embedding that incorporates a user's genre, needs, preferences, and current context, facilitating the recommendation of relevant and context-specific items. This is performed with the help of GPT-4 embeddings and transformers:  
1. _Automatic tokenization of a user request to generate feature embedding_ The user's request \(Q\) is split into words \(\mathcal{Q}f_{i}\). Each feature \(Qf_{i}\) is mapped to an embedding vector \(E_{\mathcal{Q}f_{i}}\) using GTP-4 embeddings. 2. _Concatenation of feature embedding vectors to produce user's request embedding_ The embedding vectors of all features are concatenated to obtain the final embedding vector for a user's request \(E_{Q}\): \[E_{Q}=Concat\Big{(}E_{Qf_{1}},E_{Qf_{2}}.....E_{Qf_{M}}\Big{)}\] (4) where \(M\) is the total number of features in the user's request \(Q\). The embedding vector \(E_{Q}\) represents a user's request, its features, and its semantic meaning. 3. _User's preferences modeling_ CORES evaluate how closely items match the user's specific preferences by analyzing various features, historical interactions, and the user's current context. The proposed approach defines weights to these dimensions \(W_{\text{feature}}\), \(W_{\text{hist}}\), \(W_{\text{ctx}}\). The user's preference weighting vector \(W_{pref}\) is defined as: \[W_{pref}=Concat(\ W_{\text{feature}},\ W_{\text{hist}},\ W_{\text{ctx}})\] (5)  
3.5.5. Hybrid Contextual Embedding-Based Search  
We instruct CORES to recommend relevant items that match a user's preferences and context through a hybrid embedding-based matching and ranking process. CORES combines four matching measures, as follows:  
1. _Domain Embedding Matching_ The business domain similarity \(Sim\_Domain\) measures the similarity between the user's preferred genre \(E_{Q\_genore}\) and the store's selling domain \(E_{\text{dom}_{\mathcal{D}_{S_{i}}}}\) of the digital store \(DS_{i}\) using cosine similarity. The objective is to assess whether the types of items available in the store match the user's interest, calculated as follows: \[Sim\_Domain(Q,DS_{i})=\frac{E_{Q\_genore}\cdot E_{\text{dom}_{\mathcal{D}_{S_ {i}}}}}{\|E_{Q\_genore}\|\cdot\|E_{\text{dom}_{\mathcal{D}_{S_{i}}}}\|}\] (6) Stores with the highest similarity scores proceed to the next step. 2.