scription

Analisis Teknik Embedding Model NV-Embed pada Large Language Models Berbasis Retrieval-Augmented Generation

No 8
Year 2024
Creators Tengku Muhammad Rafi Rahardiansyah; S.Kom., M.Kom., Ph.D. Rizal Setya Perdana; S.Kom., M.Kom., Ph.D. Tirana Noor Fatyanosa
URI http://repository.ub.ac.id/id/eprint/236965
Date 2024-12-27
Keywords NV-Embed, embedding, Retrieval-Augmented Generation, Large
Language Models, NLP.
Type thesis

Abstract

Large Language Models (LLMs) based on Retrieval-Augmented Generation (RAG) pose challenges in generating accurate embeddings to enhance retrieval and text generation performance. NV-Embed is a novel embedding model designed to address the limitations of previous embedding models through a latent attention approach and contrastive instruction-tuning training. This research implemented NV-Embed using PyTorch. PDF documents were processed through pre-processing, tokenization, and vectorization stages. The processed and stored documents in the vector database were utilized as references to enrich responses by combining the information available in the LLM with additional information retrieved from the PDF documents through the RAG pipeline. The NV-Embed embedding technique was evaluated using precision, recall, and F1-score metrics for retrieval, as well as BLEU and ROUGE for text generation. The results demonstrated that NV-Embed excelled in retrieval tasks, achieving a precision of 0.906, recall of 0.994, and F1-score of 0.948. In text generation tasks, NV-Embed achieved a BLEU score of 0.899, and the ROUGE metrics also showed excellent results, with ROUGE-1 at 0.955, ROUGE-2 at 0.951, and ROUGE-L at 0.955. The analysis of NV-Embed’s performance revealed that the latent attention approach significantly improved embedding quality in capturing semantic relationships between words. This research contributes significantly to the development of embedding models in RAG-based LLMs and opens opportunities for further exploration.