Accurate nutrient estimation from unstructured recipe text is an important yet challenging problem in dietary monitoring, due to ambiguous ingredient terminology and highly variable quantity expressions. We systematically evaluate models spanning a wide range of representational capacity, from lexical matching methods (TF-IDF with Ridge Regression), to deep semantic encoders (DeBERTa-v3), to generative reasoning with large language models (LLMs). Under the strict tolerance criteria defined by EU Regulation 1169/2011, our empirical results reveal a clear trade-off between predictive accuracy and computational efficiency. The TF-IDF baseline achieves moderate nutrient estimation performance with near-instantaneous inference, whereas the DeBERTa-v3 encoder performs poorly under task-specific data scarcity. In contrast, few-shot LLM inference (e.g., Gemini 2.5 Flash) and a hybrid LLM refinement pipeline (TF-IDF combined with Gemini 2.5 Flash) deliver the highest validation accuracy across all nutrient categories. These improvements likely arise from the ability of LLMs to leverage pre-trained world knowledge to resolve ambiguous terminology and normalize non-standard units, which remain difficult for purely lexical approaches. However, these gains come at the cost of substantially higher inference latency, highlighting a practical deployment trade-off between real-time efficiency and nutritional precision in dietary monitoring systems.
翻译:从非结构化食谱文本中准确估算营养素含量是饮食监测中重要但具有挑战性的问题,原因在于模糊的配料术语和高度可变的量化表达。我们系统评估了涵盖广泛表征能力的模型,从词汇匹配方法(结合岭回归的TF-IDF)到深度语义编码器(DeBERTa-v3),再到基于大语言模型的生成式推理。在EU Regulation 1169/2011规定的严格容差标准下,我们的实证结果揭示了预测准确性与计算效率之间的明确权衡。TF-IDF基线能在近乎瞬时推理中实现中等水平的营养素估算性能,而DeBERTa-v3编码器在任务特定数据稀缺条件下表现不佳。相比之下,少样本大语言模型推理(例如Gemini 2.5 Flash)以及混合大语言模型精炼流程(TF-IDF结合Gemini 2.5 Flash)在所有营养素类别上均达到最高验证准确率。这些改进很可能源于大语言模型利用预训练世界知识解决模糊术语并标准化非标准单位的能力,而纯词汇方法难以应对此类问题。然而,这些提升以显著增加推理延迟为代价,凸显了饮食监测系统中实时效率与营养素精度之间的实际部署权衡。