用大模型实现菜谱中食材智能替换,提升个性化烹饪体验。
Large Language Models for Ingredient Substitution in Food Recipes using Supervised Fine-tuning and Direct Preference Optimization
- 基于微调与直接偏好优化,构建食材替换系统。
- 最佳模型在数据集上达22.04的命中率(Hit@1)。
- 适合对美食创意生成和个性化菜谱感兴趣的读者。
本文针对菜谱个性化中的食材替换问题,利用大语言模型(LLM)构建了一个可预测上下文相关替代食材的系统。由于该任务在大模型应用上研究较少,我们进行了大量实验以确定最优的LLM、提示设计及微调方案。进一步测试了多任务学习、两阶段微调以及直接偏好优化(DPO)等方法。实验基于公开的Recipe1MSub数据集进行,结果显示,在经过微调和DPO优化后,Mistral7-Base模型表现最佳,其Hit@1得分达到22.04,显著优于该数据集上的现有强基线。本研究为基于大模型的个性化与创意烹饪提供了重要进展。
原文摘要 · Abstract (English)
In this paper, we address the challenge of recipe personalization through ingredient substitution. We make use of Large Language Models (LLMs) to build an ingredient substitution system designed to predict plausible substitute ingredients within a given recipe context. Given that the use of LLMs for this task has been barely done, we carry out an extensive set of experiments to determine the best LLM, prompt, and the fine-tuning setups. We further experiment with methods such as multi-task learning, two-stage fine-tuning, and Direct Preference Optimization (DPO). The experiments are conducted using the publicly available Recipe1MSub corpus. The best results are produced by the Mistral7-Base LLM after fine-tuning and DPO. This result outperforms the strong baseline available for the same corpus with a Hit@1 score of 22.04. Thus we believe that this research represents a significant step towards enabling personalized and creative culinary experiences by utilizing LLM-based ingredient substitution.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。