DOI: 10.3390/foods15203700 ISSN: 2304-8158

A Self-Refine-Enhanced LLM Framework for Structured Extraction of Quantitative Food Safety Information from Chinese Texts

Zhiyao Zhao, Zhenzhen Zhao, Bojian Qi, Jiabin Yu

Chinese food safety standards and scientific literature contain quantitative information relevant to food safety supervision and risk analysis. However, this information is dispersed across natural-language provisions and complex tables, making manual extraction labor-intensive and prone to omissions and incorrect associations. This study proposes a large language model (LLM)-based framework that combines few-shot prompting with Self-Refine to extract “food object–indicator/factor–numerical expression” triples. A corpus comprising 149 Chinese national food safety standards and 85 Chinese scientific articles was constructed, and the evaluation used 1031 reference triples from 27 documents. Across four runs, Qwen-Plus with Self-Refine achieved mean precision, recall, and F1 scores of 0.8690, 0.8041, and 0.8353 under strict matching and 0.8737, 0.8084, and 0.8398 under similarity-based matching. Strict-match precision and F1 increased by 0.0421 and 0.0207, respectively, while recall changed little. The F1 improvement remained positive across the tested similarity thresholds and field weights. Without additional model training, the proposed framework produces structured quantitative food safety information that can support digital archiving of food safety documents, information retrieval, and knowledge graph construction.

More from our Archive