This final bachelor’s thesis focuses on the design, implementation and evaluation of a Retrieval-Augmented Generation system operating in a local environment, using open source models available on the HuggingFace platform.
The main objective has been to ensure data privacy and security by not relying on cloud services, while maintaining a competitive performance in terms of retrieval and generation of information from PDF documents. Throughout the project, it has been possible to implement a system that allows the ingestion of documents and the subsequent generation of answers to queries about them. Different embedding models and Large Language Models have been evaluated to identify the most efficient combinations for question and answer tasks. Experiments have shown that, depending on the type of document and the nature of the queries, the models offer higher or lower accuracy in retrieving relevant contexts. In addition, a multilingual evaluation of the system has been carried out in three languages: English, Spanish and Catalan. The results reflect the system's ability to generate accurate responses in all three languages, demonstrating its versatility. However, areas for improvement have also been identified, such as the optimization of the information retrieval process in different documents.
In conclusion, the developed system has not only met the proposed objectives, but has also shown to be a viable approach for information retrieval and generation in a controlled and secure environment, opening new opportunities for its future development in practical applications where privacy and security are key factors.