Source-linked AI summary
Enhancing Stock Market Information Retrieval with Retrieval-Augmented Generation
Huan Phong Thai, Thu Anh Ngoc Le, Nhu Huynh Thi Le, Nhan Huu Tran, Lenh Cong Phan Pham, Hong Nhung Nguyen
TL;DR
Dynamic stock-market information makes contextually accurate financial responses challenging for traditional NLP systems. This paper explores a RAG system for stock-market information and reports high ROUGE scores alongside low latency. The authors conclude it is a viable approach for financial information retrieval.
Problem
Traditional NLP systems can struggle to provide contextually accurate, relevant, and explainable outputs for dynamic financial data, while LLMs also face hallucination, knowledge-update, and domain-expertise challenges.
Source: §1 · pp. 2–3Method
The study explores a RAG system for stock-market information, using retrieval and generation for responses about VnExpress stock-market news and evaluating generated text with ROUGE and response latency.
Source: §1 · p. 4, §5.1 · pp. 14–15Results
The authors report high ROUGE-1 (0.9555 F-measure), ROUGE-2 (0.9314), and ROUGE-L (0.9436) scores, and describe latency as acceptable.
Source: §5.2 · p. 16, §6 · p. 17Takeaways & Limitations
The authors conclude that their RAG model is a viable approach for stock-market information retrieval, with high similarity to reference texts and acceptable response time.
Source: §5.2 · pp. 15–16, §6 · p. 17
Abstract
from arXiv · showhide
Natural Language Processing (NLP) has been widely applied in financial domains, enabling automated analysis and retrieval of stock market information. However, traditional NLP-based systems often struggle with maintaining contextual accuracy and generating relevant responses in dynamic financial environments. To address these challenges, Retrieval-Augmented Generation (RAG) models have emerged as a powerful solution, combining retrieval-based methods with generative capabilities to enhance response quality. In this study, we present a Retrieval-Augmented Generation (RAG) system designed to generate responses related to stock market information. The system integrates retrieval-based and generative approaches to enhance the accuracy and relevance of financial text generation. To evaluate its effectiveness, we employ the ROUGE metric, specifically ROUGE-1, ROUGE-2, and ROUGE-L, to measure lexical and structural similarity between generated and reference texts. Experimental results on a dataset of 100 stock market-related queries demonstrate high ROUGE scores, indicating strong alignment with reference documents. Additionally, we assess latency to evaluate the system responsiveness, achieving an average response time of 1.16 seconds. These findings confirm that our RAG model is capable of providing accurate and timely stock market insights, making it a promising approach for financial information retrieval.
1. Introduction
The paper frames stock-market information retrieval as difficult because financial data are dynamic and traditional NLP may not provide contextually accurate, relevant, and explainable outputs. It proposes exploring RAG for stock-market news, combining retrieval with generation to address these challenges.
1. Introduction
- RAG combines retrieval-based and generative models to enhance the accuracy and reliability of generated content.The introduction describes retrieved factual information as a way to alleviate hallucination to some extent and says external databases can be updated to incorporate current information.Source: §1 · pp. 2, 4
- LLMs can hallucinate, may require expensive retraining or fine-tuning to update knowledge, and often lack expertise in specialized domains.Specialized systems also require substantial dataset collection and model training, while training data can pose quality, security, and processing challenges.Source: §1 · pp. 2–3
- Dynamic financial data challenge traditional NLP systems to provide real-time, contextually accurate, and explainable outputs.Stock markets are influenced by economic indicators, corporate reports, geopolitical events, and investor sentiment.Source: §1 · p. 3
- The study explores RAG for processing stock-market information, focusing on retrieval and response generation for VnExpress stock-market news.It proposes leveraging external financial knowledge sources to support decision-making, reduce misinformation, and provide more comprehensive market summaries.Source: §1 · p. 4
2. Related Work
Related work covers NLP for stock prediction and trading, general RAG architectures and applications, and emerging RAG uses in finance. The cited work spans sentiment analysis, retrieval-based generation, and financial reasoning.
2.1. NLP in Stock Market
- LSTM and machine-learning studies use news, social-media sentiment, and historical prices for stock prediction, with reported improvements in prediction accuracy and a mean square error of 0.062 in one study.A Tadawul chatbot is also described as providing personalized investment recommendations using real-time market data and user preferences.Source: §2.1 · p. 5
2.2. Retrieval-Augmented Generation (RAG) in NLP
- RAG retrieves external documents or facts to condition language-model responses, and its architecture pairs a retriever with a generator.The retriever is described as using an encoder, approximate-nearest-neighbor indexing, and a key-value datastore; generator types include default and retrieval-augmented models.Source: §2.2 · pp. 5–6
2.3. RAG in Financial and Stock Market Applications
- Prior work applies financial RAG to sentiment analysis, financial reasoning, multimodal trend analysis, and risk assessment.The cited work includes market data, news, and technical charts, as well as audit-report analysis for financial risk evaluations.Source: §2.3 · pp. 6–7
3. Data Preparation
The paper collects stock-market news articles from VnExpress and organizes them into market-relevant categories. It then preprocesses Vietnamese text through normalization, segmentation, and stop-word removal before retrieval and generation.
3.1. Data Collection
- The dataset comprises 30 VnExpress stock-market news articles covering trading volume, price fluctuations, corporate performance, and macroeconomic factors.The categories include market trends and index performance, corporate stocks and sectors, foreign investment and liquidity, and regulatory and corporate actions.Source: §3.1 · pp. 7–8
- The collected articles are categorized to support analysis of stock-market trends and themes and development of the RAG system.Table 1 is identified as reporting the number of main documents by category, but the supplied caption provides no values.Source: §3.1 · p. 8, Table 1 · p. 8
3.2. Data Preprocessing
- Vietnamese preprocessing uses Underthesea word segmentation, text normalization, lowercasing, URL and special-character removal, and stop-word removal.The cleaned text is stored for retrieval and RAG; the paper says removing stop words focuses embeddings on content-bearing words and benefits semantic similarity searches and document retrieval.Source: §3.2 · p. 9
4. Proposed Methodology
The proposed RAG system processes queries through text embedding, information retrieval, and response generation, augmenting LLM responses with external knowledge.
4. Proposed Methodology
- The proposed RAG architecture processes queries through three components: text embedding, information retrieval, and response generation.Figure 3 illustrates this workflow.Source: §4 · pp. 9–10, Figure 3 · p. 10
4.1. Text Embedding
- VnExpress news is tokenized with Jieba, embedded with multilingual LaBSE suited to Vietnamese, and stored in FAISS for nearest-neighbor retrieval.Source: §4.1 · pp. 10–11
4.2. Information Retrieval
- FAISS uses L2 distance to retrieve top-k query neighbors, then BM25 re-ranks candidates to combine semantic similarity with keyword relevance.Source: §4.2 · pp. 11, 13
4.3. Information Generation
- Gemini-1.5-Flash receives a prompt containing the query and retrieved texts, then grounds responses in those texts; it was selected for real-time performance and long-context processing.Source: §4.3 · p. 13
5. Experimental Result
The evaluation combines ROUGE measures of generated-reference overlap with response latency. Across 100 generated responses, the system reports high similarity scores and an acceptable response timeframe.
5.1. Evaluation Metrics
- The study uses ROUGE as its primary evaluation metric for RAG responses: ROUGE-1 measures unigram overlap, ROUGE-2 bigram overlap, and ROUGE-L the longest common subsequence between generated and reference text.Source: §5.1 · p. 14
5.2. Retrieval-Augmented Generation (RAG) Results
- The ROUGE evaluation uses 100 generated responses derived from stock market-related documents.Source: §5.2 · p. 15
- ROUGE-1 scored 0.9555 (F-measure), ROUGE-2 scored 0.9314, and ROUGE-L scored 0.9436.The authors interpret these scores as reflecting keyword capture, bigram retention, and sentence structure and fluency, respectively.Source: Table 2 · p. 15, §5.2 · p. 16
- Latency results suggest responses arrive within an acceptable timeframe, balancing quality and efficiency.Latency is measured from query submission until response generation; the reported statistics cover 100 queries.Source: §5.1 · p. 15, §5.2 · p. 16, Table 3 · p. 16
6. Conclusion
The study reports high ROUGE scores and acceptable latency for its stock-market RAG system, concluding it is viable for handling stock-market queries. Future work targets complex queries, external knowledge, and computational efficiency.
6. Conclusion
- High ROUGE-1, ROUGE-2, and ROUGE-L scores and acceptable latency support the system's viability for stock-market queries.The authors describe the responses as accurate, coherent, and fluent, and latency as acceptable for real-time financial applications.Source: §6 · p. 17
- The authors describe the system as accurately retrieving and synthesizing financial data while maintaining response coherence and fluency.Source: §6 · p. 17
- Future work will address complex financial queries, external knowledge sources, and computational efficiency to reduce latency.Source: §6 · p. 17
CRediT authorship contribution statement
The contribution statement assigns conceptualization, implementation, writing, supervision, and validation roles across the author team.
CRediT authorship contribution statement
- Thai Phong Huan contributed to conceptualization, methodology, software, and drafting and revising the paper.Source: CRediT authorship contribution statement · p. 17
- Le Thi Anh Thu, Nhan Huu Tran, and Lenh Cong Phan pham contributed to methodology, software, and review.Source: CRediT authorship contribution statement · p. 17
- Hong Nhung Nguyen contributed supervision, methodology, and validation.Source: CRediT authorship contribution statement · p. 17