## 3 Model-Driven Approach to QoS Estimation Using Neo4j Graph Database Aided by ChatGPT
### Approach Overview  
Figure 4 depicts the summarized workflow behind the proposed approach for model-driven QoS estimation, leveraging Neo4j and aided by ChatGPT.  
A GUI-enabled modeling tool was automatically generated within the Eclipse integrated development environment (IDE) based on our EMF meta-models: (1) the prediction problem representation [22] (illustrated in a customized, higher-level form in Figure 5), and (2) the network plan model [16]. Apart from the network infrastructure and environment details described in [16], the user also has to provide the following information required for data import and ChatGPT-aided Neo4j query generation: (1) the path of the comma-separated value (CSV) dataset file, (2) selection of the columns from the CSV files to be considered, and (3) identification of the input and output (target) variables for the selected columns. After that, Python script, relying on the PyEcore [31] library for enabling Ecore model support in the Python programming language, was used in order to extract the required parameter values from the user-created model. Furthermore, in order to construct the dataset, the CC was calculated using the previously derived expression relying on graphics hardware, as it significantly reduces the execution time thanks to loop parallelization compared to the CPU-only approach [32].  
The parameters were further leveraged in order to parametrize the prompts that were sent to the ChatGPT service using the script in Figure 3. The outputs of this Python script were the following: (1) a cypher query for CSV data import into Neo4j (structured as in Row 1 in Table 3); (2) a Neo4j procedure call for the generation of a corresponding graph database based on the provided CSV (structured as in Row 2 in Table 3); (3) a Neo4j call to the GDS library for the training of the desired QoS estimation model (Row 3 in Table 3). The patterns for each of the prompts that were used for code generation are given as follows:  
Figure 4: ChatGPT-aided classification workflow for QoS estimation using Neo4j and ChatGPT: (1) modeling; (2) network model; (3) CC value; (4) prediction problem model; (5) ChatGPT prompt; (6) cypher queries; (7) data import and graph construction; (8) GDS classification query; (9) predictions.  
Import data prompt: Generate Neo4j command for importing csv file entitled _{model.fileName}_ with following fields: _{model.input_variable1_,... _model.input_variableN_, _model.target_}.  
Graph construction prompt: Generate Neo4j query for graph construction in case of following fields: _{model.input_variable1_,... _model.input_variableN_, _model.target_}.  
Classifier train prompt: Generate Neo4j GDS classification train command for inputs: _{model.input_variables_} and output: _{model.target_} for graph _{dataset.fileName_}.  
Placeholders that were parametrized from the user-provided model instance are given in Italic font within brackets. Therefore, an example of the classification query generation process in our case study is based on the following prompt:  
Generate Neo4j GDS classification train command for inputs: _CC_, _BsId_, _Areald_, _NUIsers_, _Season_ and output _QoS_ for graph _qos_predict_.  
Based on this prompt, ChatGPT generated the following GDS classification command, as shown in Figure 6.