Putra, Rizqi Ari, Suhartono, Suhartono and Faisal, Muhammad (2026) Optimasi model retrieval-augmented generation menggunakan algoritma indeks HNSW lokal pada small language model untuk mitigasi halusinasi Hadis Bukhari. Journal of Information System Research (JOSH), 7 (4). pp. 953-966. ISSN 2686-228X
|
Text
28653.pdf - Published Version Available under License Creative Commons Attribution. Download (833kB) | Preview |
Abstract
Small Language Models (SLMs) offer high local computational efficiency but possess a systemic vulnerability to information hallucination. This vulnerability becomes a critical risk when the model is applied to sensitive domains demanding absolute accuracy, such as Sharia law and Islamic sacred literature. The inaccurate citation of religious texts can lead to theological misguidance. To address this issue, this study proposes a low-memory, local Retrieval-Augmented Generation (RAG) architectural solution. This system is designed by integrating the open-source Llama-3.2-1B-Instruct model with the PostgreSQL pgvector vector database. Document retrieval optimization is performed based on the HNSW (Hierarchical Navigable Small World) indexing algorithm and a 16-bit precision quantization technique (halfvec) on 7,003 chunks of the Sahih al-Bukhari Hadith corpus. The primary objective of this research is to design a high-precision hallucination mitigation system that operates independently (on-premise), while making a tangible contribution to the development of a low-cost digital theological assistant that preserves privacy and data sovereignty. Mitigation efficacy was automatically evaluated using the Ragas framework against 50 theological test queries, while database efficiency was physically tested on consumer-grade local computer hardware. Experimental results indicate that the proposed architecture is capable of significantly improving the faithfulness metric by 117.4% (from 0.4120 to 0.8960) and answer relevance by 50.0% (from 0.6120 to 0.9180), while simultaneously accelerating inference response time by up to 50.7%. On the database side, halfvec quantization successfully reduced physical table storage space by 36.2% and accelerated index construction time by 16.5% with an absolute accuracy (recall) retention rate of 1.0000. This study proves that a high-precision religious virtual assistant is highly feasible to execute independently without relying on third-party cloud computing services.
| Item Type: | Journal Article |
|---|---|
| Keywords: | hadith bukhari; hallucination mitigation; retrieval-augmented generation; small language model; vector quantization |
| Subjects: | 01 MATHEMATICAL SCIENCES > 0101 Pure Mathematics > 010101 Algebra and Number Theory |
| Divisions: | Faculty of Technology > Department of Informatics Engineering |
| Depositing User: | Dr Suhartono M.Kom |
| Date Deposited: | 03 Aug 2026 10:04 |
Downloads
Downloads per month over past year
Origin of downloads
Actions (login required)
![]() |
View Item |
Dimensions
Dimensions