KERL: K nowledge- E nhanced Personalized Recipe R ecommendation using L arge Language Models

Fnu Mohbat, Mohammed J. Zaki · 2025

Read KERL: K nowledge- E nhanced Personalized Recipe R ecommendation using L arge Language Models by Fnu Mohbat, Mohammed J. Zaki (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-14629.txt.

Introduction

Fnu Mohbat and Mohammed Zaki fuse in 2025 food knowledge graphs with large language models to give personal recipe advice through their system, KERL. Food data abound, yet few systems ground model answers in structured nutrition facts. Personal limits and tastes make the task harder still.

A user question is parsed for food entities, and matching subgraphs are pulled from the knowledge graph. The model then picks recipes that fit the stated constraints. Cooking steps and micro-nutrient details are generated for each pick. A new benchmark of recipe questions with personal constraints grades the system. Tests show clear gains over past approaches on fit, coherence, and nutrition detail. Code and data are public.

Catalog record

CREATORFnu Mohbat, Mohammed J. Zaki
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE55 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-14629

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

KERL: K nowledge- E nhanced Personalized Recipe R ecommendation using L arge Language Models Thanks: This paper has been accepted at the ACL 2025. Fnu Mohbat, Mohammed J. Zaki Abstract Recent advances in large language models (LLMs) and the abundance of food data have resulted in studies to improve food understanding using LLMs. Despite several recommendation systems utilizing LLMs and Knowledge Graphs (KGs), there has been limited research on integrating food related KGs with LLMs. We introduce KERL, a unified system that leverages food KGs and LLMs to provide personalized food recommendations and generates recipes with associated micro-nutritional information. Given a natural language question, KERL extracts entities, retrieves subgraphs from the KG, which are then fed into the LLM as context to select the recipes that satisfy the constraints. Next, our system generates the cooking steps and nutritional information for each recipe. To evaluate our approach, we also develop a benchmark dataset by curating recipe related questions, combined with constraints and personal preferences. Through extensive experiments, we show that our proposed KG-augmented LLM significantly outperforms existing approaches, offering a complete and coherent solution for food recommendation, recipe generation, and nutritional analysis. Our code and benchmark datasets are publicly available at https://github.com/mohbattharani/KERL . 1 Introduction The importance of food for well-being has created the need to employ machine learning to promote healthy lifestyles through food understanding. Several recipe-sharing websites have created rich resources of food data, attracting researchers to devise food computing for classification, retrieval, recipe generation, and recommendation. Food recommendation is a complex and multifaceted taks given its direct impact on human health. An effective food recommendation system should consider personal preferences, dietary constraints, and health guidelines. In recent years, several ontologies and knowledge graph methods have helped to better organize food data Dooley et al. 2018 ; Haussmann et al. 2019 ; Razzaq et al. 2023 . Subsequently, several food recommendation methods have leveraged the KGs for personalized food recommendation Chen et al. 2021 ; Shirai et al. 2021 ; Ling et al. 2022 ; Li et al. 2023 ; Kobayashi et al. 2024 . Several studies have also utilized LLMs for recipe generation H. Lee et al. 2020 ; Yin et al. 2023 ; Mohbat and Zaki 2024 and nutrition estimation Yin et al. 2023 ; Tanabe and Yanai 2024 ; Tanabe and Yanai 2025 . However, there is a lack of unified food understanding systems that not only recommend personalized recipes but also generate cooking steps and micro-nutrition information for the recommended dishes. Figure 1: KERL Overview: Given a natural language question (with constraints), the system parses entities and generates a SPARQL query to retrieve a subgraph from the KG. The question and this subgraph as context, are given as input to the recommendation model ( KERL-Recom ), which generates a list of recipe names that satisfy the constraints. The KERL-Recipe and KERL-Nutri models then generate cooking steps and micro-nutrients. Despite the success of LLMs in multiple domains Wu et al. 2023 ; Moor et al. 2023 ; Chhikara et al. 2024 ; Mohbat and Zaki 2024 , they are prone to hallucination and outdated information Xu et al. 2024b . Retrieval-augmented generation (RAG) addresses the issue by utilizing documents or KGs as external knowledge Mathur et al. 2024 ; He et al. 2024 ; Rangel et al. 2024 . Question-answering over KGs (KGQA) retrieves the relevant subgraphs from KG, uses reasoning to extract entities as answers Wang et al. 2021 , or uses semantic parsing or LLMs in a zero or few shot setting to transform questions into SQL or SPARQL queries to get answers from the KG Banerjee et al. 2023 ; Taffa and Usbeck 2023 ; Avila et al. 2024 . Despite various attempts to integrate external knowledge with LLMs in several domains, there is a lack of work on food recommendation that combines KGs and LLMs while considering both health constraints and user preferences. We propose a personalized and unified food recommendation system called KERL that uses the FoodKG Haussmann et al. 2019 as the knowledge source. The system illustrated in Fig. 1 comprises three modules: a recommendation module ( KERL-Recom ), a recipe generation module ( KERL-Recipe ), and a nutrition generation module ( KERL-Nutri ), which are trained using a low-rank adaption (LoRA) approach Hu et al. 2022 . The KERL-Recom module takes a user query, extracts entities, constructs a SPARQL query to retrieve relevant subgraphs from the KG, and inputs these subgraphs along with the query into the LLM, which returns dish names that satisfy the constraints. The KERL-Recipe modules generates recipes from the suggested titles, while the KERL-Nutri produces detailed micro-nutritional information for recommended dishes. Overall, we make the following contributions. • We propose KERL, a unified food recommendation system based on a multi-LoRA approach, with a dedicated adapter for each task, while utilizing the same base model, allowing efficient training and inference. • Our work generates comprehensive nutritional information unlike previous approaches that focus mainly on one aspect, such as calorie count. • We curated two open benchmark datasets using template questions, nutrient constraints, and personal preferences. • Through extensive experiments, we show that each module of KERL outperforms the baseline LLMs, showcasing the power of integrating KGs with LLMs. 2 Related Work Food Recommendation The initial food recommendation systems formulated recommendation as a retrieval task by mapping the recipe components such as title, ingredients, and images into a common embedding space Salvador et al. 2017 ; Chen et al. 2018 ; Wahed et al. 2024 ; Li and Zaki 2022 . Later, the focus shifted towards the use of food knowledge graphs. For example, Li and Zaki 2022 ; Gao et al. 2022 used graph neural network to learn the user-recipe interactions in KGs, and Chen et al. 2021 proposed knowledge base question answering through information retrieval by mapping questions and possible answers in a common embedding space. However, recent methods employ LLMs for food recommendations. For example, Kirk et al. 2023 investigated ChatGPT for nutrition questions, and Geng et al. 2022 ; Rostami et al. 2024 use LLMs as a language processing engine in the food recommendation system. Despite considerable efforts to leverage KGs and LLMs for developing food recommendation systems, there remains limited research on integrating food KGs to augment LLMs for more personalized food recommendation. Specifically, individual preferences, health considerations, and nutritional constraints within a unified framework have not been extensively explored. Question Answering Over KGs Question answering over knowledge graphs refers to retrieving knowledge from a KG to answer queries. Initial studies parsed entities from a natural language question and generated SPARQL queries from templates to retrieve the answers Shirai et al. 2021 ; Haussmann et al. 2019 ; Rangel et al. 2024 . Later, researchers used embeddings from LSTM or graph neural networks and framed the problem as a retrieval task Chen et al. 2021 ; Gao et al. 2022 ; He et al. 2024 . Recent methods explore the integration of KGs to improve LLMs for reasoning Luo et al. 2023 ; Sun et al. 2023 , chatbots for customer service Xu et al. 2024a , product recommendations Eppalapally et al. 2024 , and food-related tasks Qi et al. 2023 ;

Read the complete text