## 2 Materials and Methods
### Enabling Document Search  
Once the collection was available, the first task was to enable the document search. This first implies indexing the content of documents by applying an off-line procedure to generate the documents' representation, which can be made available to a subsequent on-line query evaluation process that computes a list of the relevant documents for each user query. It was decided to experiment with the most up-to-date indexing methods using a latent \"semantic\" representation of documents in an embedding space the continuous bag-of-words paradigm [7]. The upper part of Figure 1 sketches the main phases of two processes: off-line document indexing via the creation of document embedding vectors and on-line query evaluation, which exploits the same components for the creation of query embeddings. In fact, in this context, both natural language queries and keyword queries are also presented in the same embedding space in order to implement the ad hoc retrieval task. It consists of retrieving documents if their embedding vectors, that is, vectors of continuous  
Figure 1: Sketch of the three processes to generate the Knowledge Hub: at the top, the off-line indexing that creates the documents’ representation consisting of the document embedding vectors and the query evaluation process; below is the knowledge that is exploited to apply the best combination of LLM, chunk definitions, and the similarity function to implement the document retrieval; at the bottom, the process to generate the knowledge graph to aid users in browsing the collection. numeric values in the latent semantic space, are close to the query vectors. Here, the concept of \"closeness\" resembles a \"semantic\" similarity. In order to avoid training a Large Language Model (LLM) from scratch to create the embedding space, which is costly, several pretrained foundation LLMs publicly available on the Hugging face library were experimented [18]. LLMs are generated by self-training a deep neural network requiring both huge computational resources and a big textual corpus, which has been provided as a training set. It should be pointed out that the term \"semantics\" is improperly used here, as LLMs identify regular patterns in texts based on heuristic statistical inference; thus, instead of \"semantics\", the term \"relatedness\" or \"co-occurrence\" would be more appropriate. During the training phase, the deep neural network learns the characteristics of a natural language so as to be able to predict missing words in a sentence, continue a sentence, or answer a query, and, finally, to retrieve relevant documents in an ad hoc retrieval task activated by a user query. Such \"semantic\" models are the most effective in the case where one wants a natural language query interaction since documents which do not contain the specific query words can be retrieved, using only synonymous terms or concepts related with the query concepts. In the context of the UNEP/MAP project, the adoption of a pretrained foundation LLM was the most feasible solution to implement since we did not have the available thesauri for expanding the meaning of terms in the documents, which are heterogeneous in both their themes and genre. We also lacked the huge computational resources needed to perform the training of an LLM from scratch. Pretrained LLMs based on the evolution of BERT (Bidirectional Encoder Representations from Transformers [19; 20]) were selected for the experiment. BERT is a state-of-the-art model by Google that uses a transformer architecture [19], i.e., a deep neural network with self-attention mechanisms, which allows keeping the context of words into account when creating their representation as embedding vectors. This allows for coping with polysemous terms, which the model represents by distinct embedding vectors. Nevertheless, the applications of BERT to deal with long documents are not straightforward.