# AI-Based Learning Recommendations: Use in Higher Education +
## 4 Enhancement: Session-Based Recommendations
The structure of an entry into the session table is shown in Figure 11. When a user clicks on a learning resource in Moodle, the anonymous interaction of \(o=<v,t>\) in a session \(s\) at a time \(t\) is stored in the database. A learning resource of \(v\) is the combination of _courseid_, _cmid_, and _instancied_. A session contains the list of anonymous interactions \(o\) ordered by timestamp \(t\), that is, \(s=\{o_{1},o_{2},\cdots,o_{|s|}\}\)[42]. A set of sessions \(\{s_{1},s_{2},\cdots,s_{|S|}\}\in S\) will be filtered in the pre-processing data. Sessions in which the number of interactions is greater than 1, that is, \(|s|>1\), will be used as training data. The frequency of learning resources appearing in various sessions also needs to be determined. A series of sequences of learning resources and the next learning resource chosen by the user are generated from the input session \(s\)[22]. The data are organized into training data and evaluation data in the pre-processing data. We have followed the techniques described in [22] for the learning process of node vectors in session graphs using update functions, generating session embeddings, and making recommendation and model training. Figure 12 shows the sequence diagram for predicting the next learning resources using session-based recommendation with a GNN. When learners click to select learning resources in a session, the Moodle session-based plug-in issues a network request to the Communication Module to give a list of predictions of the next learning resources. The  
Figure 11: User interaction to a learning resource in a session is stored as a row in the table named ’Session’. session-based recommendation with the GNN module [22] will return the next learning resources. The Communication Module creates a JSON response object from the list of the prediction of the next learning resources to the session-based plug-in. The session-based plug-in refreshes the list of the next learning resources. The dataset for session-based recommendation comes directly from the user's interaction with the learning resources in Moodle. For a period of two months, we collected the interactions in a course. The dataset has, in total, 4427 interactions \((o)\), 1236 sessions \((s)\), and 235 learning resources \((V)\). Let a session \(s\) consist of the sequence of learning resources \((v_{1},v_{2},\cdots,v_{n})\in V\). We separated the series into two parts, where \((v_{1},v_{2},\cdots,v_{n-1})\in V\) is the sequence and \(v_{n}\) is the next predicted learning resource. We performed some pre-processing of the dataset, such as removing the sessions that have fewer than a certain number of interactions as we presume that they do not contribute much. We use the Session-Based Recommendation with GNN (SR-GNN) because SR-GNN outperforms all the methods experimented in [22]. For evaluation, we used Precision (P) and Mean Reciprocal Rank (MRR) [22]. \(P@20\) is widely used to predict the precision of the results. Among the top-20 items, this metric represents the proportion of correctly recommended items. Similarly, \(MRR@20\) measures the average reciprocal ranks of the items that are correctly recommended. The large value of MRR indicates that the recommendations are correct and are in the top-20 list of recommendations [22]. From the experiments, we get \(P@20=100\) and \(MRR@20=26.29\). In Figure 13, we see that 'Folien UML--Grundlagen' is on trend. Similarly, we see that a learner has hovered over 'Quiz: UML Use Cases', which can be seen by the light blue background with the hand cursor. The Recommender Component then recommends 'Zusatzfolien UML-Use Cases', 'MI-Learning: UML Use Cases', and 'Lernvideo Aufbau eines Use-Case Diagrams anhand eines Beispiels' as resources similar to the 'Quiz: UML Use Cases'. Furthermore, 'Quiz: White-Box-Testen' and 'MI-Learning Software-Engineering' have been rated five stars by the learners. Furthermore, we can see that a learner has clicked on 'Folien UML--Grundlagen', 'Zusatzfolien UML--Use cases', and 'Quiz: UML Use Cases'.