QnA Chatbot with Mistral 7B and RAG method: Traffic Law Case Study
DOI:
https://doi.org/10.24843/LKJITI.2024.v15.i03.p06Keywords:
Mistral 7B, Retrieval-Augmented Generation, Fine-Tuning, AI, BERTScoreAbstract
Mistral 7B is a language model designed to achieve high efficiency and performance in handling Natural Language Processing (NLP). This research will evaluate the model's effectiveness in legal data processing using the Retrieval-Augmented Generation (RAG) method, focusing on road traffic and transportation law No 22/2009. The system was built using the LangChain framework, followed by fine-tuning the model and evaluated using BERTScore. Results showed that the fine-tuned Mistral 7B achieved an F1 score of 0.9151, higher than the version without fine-tuning (0.8804) and GPT-4 (0.8364). To improve accuracy, the model utilizes specific keywords that make it easier to find relevant data. Fine-tuning was shown to enhance precision, while the use of key elements in questions helped the model focus more on important information. The results are expected to support the development of artificial intelligence (AI) in Indonesia's legal system and provide practical guidance for applying AI technology in other areas of law.Downloads
Published
2025-10-12
How to Cite
[1]
Muhammad Roiful Anam, Agus Subhan Akbar, and Heru Saputro, “QnA Chatbot with Mistral 7B and RAG method: Traffic Law Case Study”, LKJITI, vol. 15, no. 03, pp. 207–218, Oct. 2025.
Issue
Section
Articles
License
Copyright (c) 2025 Lontar Komputer : Jurnal Ilmiah Teknologi Informasi

This work is licensed under a Creative Commons Attribution 4.0 International License.
