In Natural Language Processing (NLP), sentiment analysis is crucial for interpreting public opinion from user generated text. While models such as BERT (Bidirectional Encoder Representations from Transformers) provide strong baselines, they often struggle with evolving language and domain specific contexts. This study explores Retrieval Augmented Generation (RAG), a framework that enhances transformer models with an external knowledge base and compares it with RoBERTa using a MiniLM encoder. Experiments are conducted on two datasets: Sentiment140, which contains informal Twitter text and Amazon Food Reviews, consisting of structured long form data. To address domain mismatch, we apply domain specific fine-tuning to the retriever in the RAG framework. Results are measured through accuracy, precision, recall, and F1 score and show that fine-tuning consistently improves performance. The goal of this study is to assess whether RAG offers measurable improvements over static models and to highlight the importance of domain adaptation.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Enhancing Sentiment Analysis with Retrieval-Augmented Generation and Domain-Specific Fine-Tuning

  • M. A. Tara,
  • Aparajita Sinha,
  • Monika Agarwal

摘要

In Natural Language Processing (NLP), sentiment analysis is crucial for interpreting public opinion from user generated text. While models such as BERT (Bidirectional Encoder Representations from Transformers) provide strong baselines, they often struggle with evolving language and domain specific contexts. This study explores Retrieval Augmented Generation (RAG), a framework that enhances transformer models with an external knowledge base and compares it with RoBERTa using a MiniLM encoder. Experiments are conducted on two datasets: Sentiment140, which contains informal Twitter text and Amazon Food Reviews, consisting of structured long form data. To address domain mismatch, we apply domain specific fine-tuning to the retriever in the RAG framework. Results are measured through accuracy, precision, recall, and F1 score and show that fine-tuning consistently improves performance. The goal of this study is to assess whether RAG offers measurable improvements over static models and to highlight the importance of domain adaptation.