arXiv:2607.23273cs.IRcs.AI2026-07

用统计方法提升LLM生成食材数据的准确性,避免隐性错误。

Statistically Supported LLM Ingredient and Recipe Data Collection in Computational Nutrition

论文配图:Statistically Supported LLM Ingredient and Recipe Data Collection in Computational Nutrition
图 1 · 摘自论文原文
  • 通过重复查询构建答案分布,用鲁棒估计和置信度评分确保数据可靠。
  • 在30个食材参考集上,营养标志准确率达98.4%,误差降低21.8个百分点。
  • 适合需要高精度营养数据库的研究者与自动化系统开发者。

计算营养学需要精确的食材数据,但现有数据库不完整、不一致,且为人工阅读设计而非机器推理。大语言模型(LLM)可填补空白,但单次输出不可靠,易引入无声错误。本文提出一种质量控制的LLM数据采集流程,结合稳健统计估计、领域特定不变量检查及网络抓取回退机制。对233份食谱的堆叠定律拟合显示,独特食材增长呈亚线性且集中在早期:100份食谱时独特食材与食谱比为1.74,5000份时降至0.19。每项食材属性的多次查询视为模型诱导答案分布的样本,采用鲁棒点估计与归一化置信度评分,覆盖数值、布尔、多选、开放类别及可选整数类型。不变量层确保每条记录在营养与逻辑上自洽;微小数值不一致通过线性规划最小化最坏百分比偏差修复,保留语义零值;严重违规则升级至基于网页证据的修复,失败时才进入人工审核。在30个食材的精选参考集上,该流程实现98.4%的营养标志精确匹配,营养比例中位绝对百分比误差从基准的31.9%降至10.1%,降幅21.8个百分点,每食材API成本约1美元。本工作将LLM辅助数据库构建转化为可控的数据工程流程,使不确定性可操作而非被丢弃。

原文摘要 · Abstract (English)

Computational nutrition needs precise ingredient data, but current databases are incomplete, inconsistent, and built for human reference rather than automated reasoning. LLMs could help fill these gaps, but single-pass outputs are unreliable and can introduce silent errors into downstream computation. We present a quality-controlled LLM pipeline for ingredient data acquisition that combines robust statistical estimation, domain-specific invariant checks, and a web-fetch fallback. An illustrative Heap's Law fit to 233 recipes suggests that unique-ingredient growth is sub-linear and front-loaded: the projected ratio of unique ingredients to recipes falls from 1.74 at 100 recipes to 0.19 at 5,000. For each ingredient attribute, repeated LLM queries are treated as samples from a model-induced answer distribution, and we apply robust point estimators and normalised confidence scores across numerical, Boolean, multiple-choice, open categorical, and optional integer types. An invariant guard layer enforces nutritional and logical self-consistency within each ingredient record. Minor numeric inconsistencies are reconciled via a linear program that minimises worst-case percentage deviation while preserving semantic zeros, and major violations are escalated to web-evidence-grounded repair, then human review only if that fails. On a curated 30-ingredient reference set, the pipeline achieves 98.4% exact match on nutrient flags and cuts median absolute percentage error on nutrient ratios from 31.9% for the median-aggregated baseline to 10.1%, a reduction of 21.8 percentage points, at an API cost of about $1 per ingredient. This frames LLM-assisted database construction as a controlled data-engineering workflow that makes uncertainty operational rather than discarding it.

计算营养数据质量大模型应用统计验证

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。