Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Models

Boyu Zhang, Hongyang Yang, Tianyu Zhou, Ali Babar, Xiao-Yang Liu
10/6/2023
cs.CLq-fin.STq-fin.TR

No official code found. Best implementation: AI4Finance-Foundation/FinGPT (21,297 stars, MIT, PyTorch, last commit 2026-04-24).

Abstract

Financial sentiment analysis is critical for valuation and investment decision-making. Traditional NLP models, however, are limited by their parameter size and the scope of their training datasets, which hampers their generalization capabilities and effectiveness in this field. Recently, Large Language Models (LLMs) pre-trained on extensive corpora have demonstrated superior performance across various NLP tasks due to their commendable zero-shot abilities. Yet, directly applying LLMs to financial sentiment analysis presents challenges: The discrepancy between the pre-training objective of LLMs and predicting the sentiment label can compromise their predictive performance. Furthermore, the succinct nature of financial news, often devoid of sufficient context, can significantly diminish the reliability of LLMs' sentiment analysis. To address these challenges, we introduce a retrieval-augmented LLMs framework for financial sentiment analysis. This framework includes an instruction-tuned LLMs module, which ensures LLMs behave as predictors of sentiment labels, and a retrieval-augmentation module which retrieves additional context from reliable external sources. Benchmarked against traditional models and LLMs like ChatGPT and LLaMA, our approach achieves 15\% to 48\% performance gain in accuracy and F1 score.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

FinGPT: Open-Source Financial Large Language Models! Revolutionize 🔥 We release the trained model on HuggingFace.

21,2973,020Shell, PythonFeb 11, 20236 months agoMIT
chatgptfinancefingptfintechlarge-language-models+8 more

Similar Papers

Cite this paper

@article{zhang2023enhancing,
  title  = {Enhancing Financial Sentiment Analysis via Retrieval Augmented Large Language Models},
  author = {Boyu Zhang and Hongyang Yang and Tianyu Zhou and Ali Babar and Xiao-Yang Liu},
  year   = {2023},
  eprint = {2310.04027},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2310.04027v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2310.04027.svg)](https://codeofpaper.com/paper/2310.04027)

Discussion