KERL: Knowledge-Enhanced Personalized Recipe Recommendation using Large Language Models
Fnu Mohbat, Mohammed J Zaki
TL;DR
KERL presents a unified Knowledge Graph augmented framework that couples FoodKG with a large language model to deliver personalized recipe recommendations, accompanied by generated cooking steps and micro-nutritional profiles. It deploys three task-specific LoRA adapters on a shared Phi-3-mini backbone to enable efficient training and inference across recommendation, recipe generation, and nutrition generation, leveraging retrieval-augmented generation over KG subgraphs. The authors introduce large-scale KGQA and nutrition/recipe benchmarks derived from FoodKG and demonstrate substantial performance gains over open-source LLMs across all three tasks. The work advances practical meal planning by providing coherent, nutritionally aware recommendations and steps, with publicly available code and datasets for reproducibility and further research.
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.
