Large Language Models for Ingredient Substitution in Food Recipes using Supervised Fine-tuning and Direct Preference Optimization
Thevin Senath, Kumuthu Athukorala, Ransika Costa, Surangika, Ranathunga, Rishemjit Kaur

TL;DR
This paper explores using large language models to improve ingredient substitution in recipes, demonstrating that fine-tuning and direct preference optimization enhance prediction accuracy for personalized culinary applications.
Contribution
It introduces a novel approach applying LLMs with fine-tuning and DPO for ingredient substitution, outperforming existing baselines on the Recipe1MSub dataset.
Findings
Mistral7-Base with fine-tuning and DPO achieved the best Hit@1 score of 22.04.
Extensive experiments identified optimal LLM, prompts, and training setups.
The approach advances personalized recipe modification using LLMs.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsCulinary Culture and Tourism · Consumer Attitudes and Food Labeling · Nutritional Studies and Diet
MethodsSparse Evolutionary Training · Direct Preference Optimization
