Data Engineering and Large Language Model Construction for the Food Safety Domain
Si Shen, Wenhua Zhao, Liu Liu, Dongbo Wang, Tiansheng Zheng
Key points
From the paper's conclusion- These findings indicate that domain-specific corpus and continual pre-training with fine-tuning enhance LLM expertise and reasoning, offering a viable solution for intelligent food safety supervision and risk analysis.
Abstract
Large language models (LLMs) have demonstrated remarkable capabilities in natural language processing; however, their direct application to food safety remains limited by insufficient domain knowledge, inadequate reasoning over regulatory documents, and the tendency to generate factual hallucinations. To address these challenges, this study proposes FSLLM, a domain-specific LLM designed for food safety applications. A high-quality domain corpus was constructed from diverse sources, including food safety incidents, regulatory documents, inspection reports, and industry-related materials. It initially comprised approximately 150 million tokens, of which 45,024 documents and approximately 121 million tokens were retained after decontamination. Based on the Qwen3-8B foundation model, FSLLM was developed through a two-stage training framework consisting of continual pre-training for domain knowledge adaptation and supervised fine-tuning for task alignment. Furthermore, a comprehensive benchmark covering 10 representative food safety tasks, including named entity recognition, text classification, text generation, factual verification, regulatory compliance analysis, and public health question answering, was established for systematic evaluation. Experimental results show that FSLLM outperforms the base model across multiple food safety tasks. Specifically, FSLLM achieved a Micro-F1 score of 0.5286 in named entity recognition and an accuracy of 85.21% in food safety event classification, demonstrating improvements over the base model. These findings indicate that domain-specific corpus and continual pre-training with fine-tuning enhance LLM expertise and reasoning, offering a viable solution for intelligent food safety supervision and risk analysis.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Large language models in food and nutrition science: Opportunities, challenges, and the case of FoodyLLMCurrent Research in Food Science · 2026
- Language Models and Food–Health Evidence: Challenges, Opportunities, and ImplicationsBioMedInformatics · 2026
- A Self-Refine-Enhanced LLM Framework for Structured Extraction of Quantitative Food Safety Information from Chinese Texts.Foods (Basel, Switzerland) · 2026
- FermBench: A new benchmark for measuring the capabilities of LLMs on fermentation knowledgeComputers and Education Artificial Intelligence · 2026
- Multimodal AI for Real‐Time Food Safety and Quality: From Sensors to Foundation Models, Edge Deployment, and RegulationFood Science & Nutrition · 2026
- Evaluating large language model-generated oncology nutrition responses: a conceptual framework and validation roadmapFrontiers in Digital Health · 2026