Jurnal Teknik Informatika (JUTIF)
Vol. 7 No. 4 (2026): JUTIF Volume 7, Number 4, August 2026

Retrieval-Augmented Large Language Model Using FAISS for Stock Recommendation on LQ45 Index Based on Technical and Fundamental Analysis

Murtiyoso Murtiyoso (Magister of Computer Science, Faculty of Computer Science, Universitas Amikom Purwokerto, Indonesia)
Imam Tahyudin (Magister of Computer Science, Faculty of Computer Science, Universitas Amikom Purwokerto, Indonesia)
Berlilana Berlilana (Magister of Computer Science, Faculty of Computer Science, Universitas Amikom Purwokerto, Indonesia)



Article Info

Publish Date
14 Aug 2026

Abstract

The analysis of Indonesian stock markets is inherently complex due to market volatility, heterogeneous financial indicators, and the need to integrate both technical and fundamental information. Traditional analytical approaches often struggle to provide transparent and consistent investment recommendations, while Large Language Models (LLMs) may suffer from hallucination when applied to structured financial prediction tasks. This study proposes a Retrieval-Augmented Generation (RAG) framework based on the LLaMA model and FAISS to enhance the reliability of stock investment recommendations for LQ45-listed companies. Historical OHLCV data and fundamental financial reports are collected from Yahoo Finance and preprocessed into a structured knowledge base using embedding representations. Relevant information is retrieved using a top-k similarity search mechanism and integrated into a structured prompt engineering scheme to generate BUY, HOLD, or SELL recommendations. Experimental results demonstrate that the proposed approach achieves an F1-score of 0.76 for classification performance, with regression-based error metrics of MAE 299.38 and MAPE 10.06%. In addition, text-based evaluation using ROUGE yields a high score of 0.9906, indicating strong alignment between generated explanations and reference analyses. The findings suggest that the RAG framework significantly reduces hallucination by grounding LLM outputs in retrieved financial data, thereby improving the interpretability and robustness of AI-driven stock analysis. This research contributes to the field of informatics by providing a practical and extensible RAG-based framework for structured financial prediction tasks.

Copyrights © 2026






Journal Info

Abbrev

jurnal

Publisher

Subject

Computer Science & IT

Description

Jurnal Teknik Informatika (JUTIF) is an Indonesian national journal, publishes high-quality research papers in the broad field of Informatics, Information Systems and Computer Science, which encompasses software engineering, information system development, computer systems, computer network, ...