Development of an Offline RAG Chatbot for Answering Food Hygiene and Safety Questions Based on Vietnamese Legal Frameworks

Read full text
Authors: Duc Viet Hoang, Tat Thang Nguyen
Cited by: 0

Abstract

This paper presents the design, development, and implementation of an offline chatbot system specialized in answering food safety-related questions, relying entirely on Vietnamese legal documents.The system employs Retrieval-Augmented Generation (RAG) to ensure accurate and contextually relevant responses without internet dependency, a critical feature for low-connectivity environments.Key highlights include robust Vietnamese language support, a flexible vector database using Chroma for seamless legal content updates, and the integration of Qwen2.5:7B-Instruct-Q4_0 as the local language model, selected after comparative testing against DeepSeek-R1, Gemma3:1B, and Mistral.Embeddings are generated using BAAI/bge-small-en-v1.5.By processing Vietnamese queries and retrieving from a localized knowledge base, the chatbot delivers reliable guidance to stakeholders such as food producers, traders, and consumers.Evaluations demonstrate high accuracy in Vietnamese Q&A, stable offline operation, and adaptability to evolving regulations, with discussions on limitations and future enhancements.

Fields of Study & Subjects

Topic Modeling Artificial Intelligence in Law Natural Language Processing Techniques

Publication details

Journal / source
Journal of Research Innovation and Technologies
Volume
5
Issue
1
Pages
121–135
Publication date
12 February 2026
Language
EN