Duc Viet Hoang, T. Nguyen
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 Vietna mese 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 adapt ability to evolving regulations, with discussions on limitations and future enhancements.
Citation format
HOANG, Duc Viet; NGUYEN, T. Development of an offline RAG chatbot for answering food hygiene and safety questions based on vietnamese legal frameworks. Journal of Research, Innovation and Technologies, 2026, 5(1): 121–135.