Puertas i Prats, EloiCastanyer Bibiloni, Francesc Josep2025-05-202025-05-202025-01-17https://hdl.handle.net/2445/221134Treballs finals del Màster de Fonaments de Ciència de Dades, Facultat de matemàtiques, Universitat de Barcelona. Any: 2025. Tutor: Eloi Puertas i PratsThis thesis explores the application of Retrieval-Augmented Generation (RAG) systems to optimize question answering tasks, addressing limitations of Large Language Models (LLMs) in scalability, efficiency, and domain adaptability. A theoretical foundation is established, highlighting RAG’s role in integrating external knowledge to enhance language models. A RAG pipeline is implemented and evaluated through experiments analyzing embedding models, similarity metrics, retrieval parameters (k), and re-ranking using cross-encoders. Results demonstrate that re-ranking improves retrieval accuracy, even with noisy, large-scale datasets, and highlight trade-offs between retrieval scope and generative performance. This study underscores RAG’s potential as a scalable alternative to finetuning, enabling efficient adaptation to dynamic datasets. Future research could explore advanced RAG variants and hybrid methods for broader applications. The corresponding code notebook can be found on the following GitHub repository, https://github.com/XiscoCasta/LLM-adaptation-techniques.-Evaluating-RAG-models40 p.application/pdfengcc-by-nc-nd (c) Francesc Josep Castanyer Bibiloni, 2025codi: GPL (c) Francesc Josep Castanyer Bibiloni, 2025http://creativecommons.org/licenses/by-nc-nd/3.0/es/http://www.gnu.org/licenses/gpl-3.0.ca.htmlTractament del llenguatge natural (Informàtica)Intel·ligència artificialXarxes neuronals (Informàtica)Treballs de fi de màsterNatural language processing (Computer science)Artificial intelligenceNeural networks (Computer science)Master's thesisLLM Adaptation Techniques. Evaluating RAG Strategiesinfo:eu-repo/semantics/masterThesisinfo:eu-repo/semantics/openAccess