A Large Language Model–Guided Q‐Learning Method for Food Safety Sampling Decision‐Making

Food safety sampling is a critical measure for safeguarding public health; however, current regulatory practices are challenged by fragmented risk signals, constrained inspection resources, and suboptimal inspection efficiency. To address these issues, this paper proposes a food safety sampling decision-making method based on large language models (LLM)-guided Q-learning. First, we leverage LLMs to extract and analyze key elements from unstructured online food safety public opinion data. This is integrated with clustering analysis and the entropy weight method to achieve quantitative risk assessment and grading. Subsequently, a food category-region risk score matrix is constructed, and the allocation of sampling frequency is formalized as a sequential decision-making problem under resource constraints. Q-learning is then introduced to learn optimal sampling strategies, using LLM-generated structured heuristic values as prior guidance, thereby reducing ineffective exploration and enhancing training efficiency. Experimental results, based on data from 30 provincial administrative regions, 457 municipalities/counties, and 25 food categories, generated 4690 risk evaluation records as effective inputs for decision-making. The results demonstrate that the derived sampling strategies align with risk priors, allocating higher sampling intensity to high-risk food category-region combinations while maintaining coverage balance across food categories and regions. Compared to the baseline without heuristic guidance, LLM guidance significantly reduces convergence iterations while maintaining steady-state rewards. This indicates that the proposed method accelerates policy learning without compromising long-term returns. In conclusion, this study validates that the proposed method achieves a closed-loop integration of risk assessment and decision optimization, providing a data-driven methodology for intelligent food safety regulation.

Authors

Institutions

Publication Details

Journal
Journal of Food Science
Published
2026-10-28
DOI
https://doi.org/10.1111/1750-3841.71578
Primary Topic
Food Safety and Hygiene
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A Large Language Model–Guided Q‐Learning Method for Food Safety Sampling Decision‐Making

程瑞鹏, Zhiyao Zhao, Shuwen Chen, Jiabin Yu et al.
4 links
Journal of Food Science
Food Safety and Hygiene
article

A Large Language Model–Guided Q‐Learning Method for Food Safety Sampling Decision‐Making

程瑞鹏, Zhiyao Zhao, Shuwen Chen, Jiabin Yu, Xiaoyu Cui, Xin Zhang
article en

Abstract

Food safety sampling is a critical measure for safeguarding public health; however, current regulatory practices are challenged by fragmented risk signals, constrained inspection resources, and suboptimal inspection efficiency. To address these issues, this paper proposes a food safety sampling decision-making method based on large language models (LLM)-guided Q-learning. First, we leverage LLMs to extract and analyze key elements from unstructured online food safety public opinion data. This is integrated with clustering analysis and the entropy weight method to achieve quantitative risk assessment and grading. Subsequently, a food category-region risk score matrix is constructed, and the allocation of sampling frequency is formalized as a sequential decision-making problem under resource constraints. Q-learning is then introduced to learn optimal sampling strategies, using LLM-generated structured heuristic values as prior guidance, thereby reducing ineffective exploration and enhancing training efficiency. Experimental results, based on data from 30 provincial administrative regions, 457 municipalities/counties, and 25 food categories, generated 4690 risk evaluation records as effective inputs for decision-making. The results demonstrate that the derived sampling strategies align with risk priors, allocating higher sampling intensity to high-risk food category-region combinations while maintaining coverage balance across food categories and regions. Compared to the baseline without heuristic guidance, LLM guidance significantly reduces convergence iterations while maintaining steady-state rewards. This indicates that the proposed method accelerates policy learning without compromising long-term returns. In conclusion, this study validates that the proposed method achieves a closed-loop integration of risk assessment and decision optimization, providing a data-driven methodology for intelligent food safety regulation.

Journal of Food ScienceVol. 91(11)
Beijing Technology and Business University (CN)
Beijing Nova Program, National Key Research and Development Program of China
Openalex Percentile: Top 16%
Food Safety and Hygiene
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon