DietQA: A Comprehensive Framework for Personalized Multi-Diet Recipe Retrieval Using Knowledge Graphs, Retrieval-Augmented Generation, and Large Language Models
Abstract
1. Introduction
- KG-QA for Multi-Diet Reasoning and Substitution: Formulates diet-aware recipe search as knowledge-graph question answering with full Boolean constraints across ingredients, nutrients and diet tags, plus diet-aware ingredient substitution to recover feasible results even if direct matches fail; the study quantifies coverage and substitution lift across increasing diet complexity.
- Hybrid Symbolic–Neural Pipeline with Explanations: Combines Cypher-based constraint enforcement and KG reasoning with RAG-style LLM generation to produce grounded, explainable answers; introduces a hard vs. soft constraints model (strict compliance requirements vs. preference-guided ranking) and supports post-retrieval analytics for transparent rationale.
- Language-Adaptable Architecture for Cross-Cultural Use: Keeps retrieval/reasoning language-agnostic and uses a multilingual LLM at entity extraction and the interface, so porting to new locales mainly requires local corpora, nutrient databases, and diet taxonomies, not algorithmic changes.
- Usability-Centred Chat and GUI Design: Delivers a conversational UI enhanced with visual pills, tag clouds, sliders, and filter panels for immediate refinement; achieves strong usability outcomes in a mobile-friendly, accessible interface.
- Scalable, Performant System Implementation: Provides a modular client–server stack on Neo4j with bounded traversals and caching; offers a complexity model showing per-query cost scales with the candidate set and empirical sub-second latencies with negligible substitution overhead.
2. Related Work
2.1. Recipe Web Scraping, Semantic Extraction, and Database Storage
2.2. AI in Recipe Recommendation and Personalized Nutrition
2.3. Knowledge Graphs and Food Ontologies
2.4. RAG, Food-Specific LLMs and Conversational Diet Assistants
3. Methodology
3.1. System Overview
3.2. Knowledge Graph and Dictionary Construction
3.3. Natural Language Understanding and Query Parsing
3.3.1. Intent and Entity Extraction via LLM
- Intent set: (e.g., include_ingredient, display_recipe)
- Entity set: (dishes, ingredients, diets)
- Exact and fuzzy string matching against the predefined tags dictionary to resolve lexical variants and synonyms (e.g., “veggie” to “vegetarian”).
- Grammar-based rules to normalize the entity values to predefined grammatical number and case. Case handling is particularly important in Greek, where word forms vary significantly due to inflectional morphology.
3.3.2. Knowledge Graph Query Construction
- Aligned diets: Dietary patterns fully satisfied by the original recipe.
- Conflicting ingredients: Components that conflict with the specified dietary constraints.
- Suggested substitutes: Compatible alternatives derived from substitution relationships.
- Conditional ingredients: Composite foods whose dietary compliance depends on the properties of their constituent ingredients.
3.4. Retrieval-Augmented Generation (RAG)
3.4.1. Cypher Query Execution
3.4.2. Post-Retrieval Analysis and Nutritional Clustering of Recipes
3.4.3. Retrieval-Augmented Response Generation
3.5. User Decision and Adaptive Flow
3.6. DietQA System Pipeline Algorithm
Algorithm 1. DietQA System Pseudocode |
Input: q (query), u (user profile) |
Output: R (ranked recipes) OR A (factual answer) |
session ← InitializeSession(u) |
profile ← LoadUserProfile(u) |
dictionary ← LoadDictionary() |
repeat |
hardConstraints ← ∅ |
repeat |
if hardConstraints = ∅ then |
//Extract and Normalize |
intent, entities ← LLM_ExtractIntentEntities(q) |
entities ← NormalizeAndValidate(entities, dictionary) |
// Build Query |
hardConstraints ← MapToConstraints(intent, entities, profile) |
softPreferences ← MapToPreferences(profile) |
cypherQuery ← BuildQuery(intent, hardConstraints) |
end if |
// Execute |
results ← ExecuteQuery(cypherQuery) |
if results.type = “recipes” then |
R ← results.recipes |
//Analyze and Rank |
stats ← ComputeStats(R) |
clusters ← ClusterByNutrition(R) |
for each item in [clusters, R] do |
scores[item] ← ScoreItem(item, profile) |
end for |
rankedClusters ← Sort(clusters, scores) |
rankedRecipes ← Sort(R, scores) |
// Display and Interact |
repeat |
Display(rankedRecipes, stats) |
action ← GetUserAction() |
switch action.type |
case “display_recipes”: |
ShowRecipeCards(rankedRecipes, profile) |
case “soft_filter”: |
rankedRecipes ← Rerank(rankedRecipes, action.data) |
case “hard_filter”: |
hardConstraints ← Update(hardConstraints, action.data) |
break |
case “new_query”: |
q ← action.query |
hardConstraints ← ∅ |
break |
end switch |
until action.type ∈ {“hard_filter”, “new_query”, “exit”} |
else // factual answer |
A ← GenerateAnswer(results.answer, profile) |
Display(A) |
end if |
until hardConstraints ≠ ∅ or results.type = “factual” |
until UserExit() |
return {lastResults: R OR A, profile: profile} |
3.7. Computational Complexity and Scalability
- : total recipes in the KG
- : selectivity of indexed predicates
- : candidates after property filtering (e.g., dish, course, numeric thresholds)
- : number of requested diet labels in the query
- : average ingredients per recipe
- : include/exclude tokens
- : ingredient category tokens (e.g., “meat”)
- : taxonomy depth for IS_A (bounded, typically )
- : branching factor of *_ALTERNATIVE edges; : maximum alternative path length
- : recipes passed to analysis/display
- : LLM tokens (prompt + context)
4. User Interface Design and Usability
4.1. UI Elements
- Preferences Panel: Users can customize their dietary preferences using a dedicated panel, as illustrated in Figure A1. This includes toggling nutrient emphasis (e.g., favouring high protein or low fat), specifying liked and disliked ingredients, indicating forbidden ingredients (e.g., due to allergies or strict dietary rules), and listing which ingredients are currently available in their pantry. Preferences are input via dynamic search fields and visual tags, with each category colour-coded for clarity. These settings inform subsequent queries, ensuring that recommendations align with the user’s goals and constraints.
- Chat Interface: This is the core interaction space where users engage with DietQA through natural language. The interface acts like a messaging app, with user queries and system replies displayed in conversational bubbles (Figure A2). System responses go beyond plain text, incorporating interactive visual elements such as sliders, filter controls, nutrient visualization charts, and recipe images—enhancing user engagement and understanding.
- Filters Panel: Accessible directly from the chat interface, the Filters Panel offers a rich, real-time refinement toolkit for dynamic, real-time refining search results across nutritional, categorical, and compositional filters (Figure A3). It supports diverse interaction types, including ingredient tag cloud, drag-and-drop gestures, option selections, and sliders. It includes Ingredients, Dish name, Meal type, Diet and Nutritional Sliders Tabs.
- Result Recipe Cards: Recommended recipes are initially presented as conversational messages. Optionally, they can be displayed in a structured list format enriched with dietary tags, key ingredient highlights, and graphical representations of macronutrient distribution (Figure A3). This visual enhancement helps users quickly compare nutritional profiles and suitability to their preferences. Selecting a result expands the full recipe view, including ingredients, and dietary compatibility checks.
- Recipe Card Detail View: When a recipe is selected, a detailed card opens displaying the dish image, basic metadata, per-100 g nutritional information, and diet compatibility. A breakdown of ingredient-level contributions shows how each item affects calories and macronutrients. Users can also view pantry matches and ranking analytics. Visual elements like nutrient bars and expandable ingredient details enhance understanding and support informed decision-making.
4.2. Conversational Interaction
4.3. Visual Query Feedback
4.4. Filter Controls and Exploratory Refinement
4.5. Accessibility and Responsiveness
5. System Implementation
5.1. Backend and Data Infrastructure
5.2. LLM Server and Prompt Pipeline
- Dual AMD EPYC 7742 CPUs (128 cores, 256 threads)
- 1 TiB RAM
- 8× NVIDIA A100-SXM4 GPUs (40 GB each)
- 14 TB RAID0 array for data storage
- 1.7 TB RAID1 array for the operating system
5.3. Frontend Architecture and Technologies
5.4. Deployment, Performance, and Monitoring
6. Evaluation
- How well does DietQA perform in retrieving correct and relevant recipes in response to user queries (accuracy and constraint satisfaction)?
- How effectively does the system perform to diet-constrained queries across diverse dishes, and what is the contribution of ingredient substitution mechanisms to overall query resolution coverage?
- Does DietQA’s integration of personalization improve the quality of recommendations compared to non-personalized baselines?
- How do users perceive the system in terms of usefulness, ease of use, and satisfaction, and does the interface support their needs?
6.1. Accuracy and Retrieval Performance
6.2. Diet-Constrained Query Evaluation
6.3. Negation and Exclusion Recognition
6.4. User Study
6.4.1. Study Design and Methodology
6.4.2. Task Design and Coverage
6.4.3. Assessment Instruments
6.4.4. Evaluation Metrics and Analysis Framework
6.4.5. User Study Results and Analysis
7. Discussion
7.1. Implications for Personalized Diet and Health Technology
7.2. Limitations
7.2.1. Nutritional and Culinary Fidelity
- Ingredient-level estimates vs. cooked reality. All micronutrient values are calculated from raw-ingredient data. Heat-induced losses, water uptake, or fat rendering that occur during cooking are not yet modelled, so reported numbers can diverge from the values in a final product.
- Cooking methods ignored. Preparation techniques (e.g., sautéing vs. steaming) strongly influence nutrient retention and energy density, but DietQA calculations are presently based only on the contributing ingredients.
- Ingredient substitutions may alter the final product. The system suggests ingredient replacements to make a recipe compliant with specific dietary constraints. However, these substitutions are selected based on predefined tag compatibility rather than full nutritional or culinary equivalence. As a result, the proposed substitute may differ in flavour, texture, or nutritional profile—potentially impacting the final outcome of the dish. The system’s role is limited to proposing alternatives, while the user retains full control over whether to accept and apply the substitution.
- Restricted nutrient and diet coverage. At present the KG stores only three macronutrients (protein, carbohydrates, fat) plus calories for each ingredient and handles four diet labels (Vegan, Gluten-Free, Dairy-Free and Low-Fat). This schema prevents queries about other health-critical nutrients (e.g., fibre, sodium, vitamins, minerals) or alternative eating patterns (e.g., Mediterranean, DASH, ketogenic). Broadening the KG to a richer nutrient panel and a more comprehensive diet taxonomy is therefore essential.
- Out-of-vocabulary ingredients. If a newly scraped recipe contains even one ingredient absent from the KG, the entire recipe is discarded because essential nutrient and diet-fit metadata are missing. Enriching the KG therefore requires manual curation or automated connection to external food composition sources before such recipes can be included.
7.2.2. Conversational Performance
- Latency introduced by LLM reasoning. Even with a quantised on-premise model, the RAG pipeline adds several seconds of delay compared with pure KG queries. While users in the study tolerated the lag, it remains a barrier to real-time kitchen use.
- Context-window erosion. DietQA summarizes prior turns to keep the dialogue within the LLM’s context length, but long, multi-topic conversations can still drift, leading to loss of nuance or forgotten constraints.
- Lack of feedback loop. The system currently lacks any mechanism for collecting user feedback—neither explicit (e.g., thumbs-up/down) nor implicit (e.g., recipe clicks, ignored results). Without these signals, it cannot adapt its recommendations or learn user preferences over time.
7.2.3. Evaluation Boundaries
- Short-term, small-sample study. The usability evaluation involved 8 participants performing predefined tasks within a limited timeframe. While useful for initial insights, this short-term snapshot cannot capture long-term adherence, behavioural change, or the system’s robustness under sustained, real-world use.
- Generalisability. All queries and recipes were evaluated in Greek; further work is needed to validate performance in other languages and cultural contexts.
7.2.4. Implications for Future Iterations
7.3. Extensions and Future Work
8. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
Abbreviations
API | Application Programming Interface |
AI | Artificial Intelligence |
BM25 | Best Match 25 |
BERT | Bidirectional Encoder Representations from Transformers |
CDT | Causal Distillation Trees |
DASH | Dietary Approaches to Stop Hypertension |
FARE | Food Allergy Research & Education |
FSANZ | Food Standards Australia New Zealand |
HTRAG | Hierarchical Topic Retrieval-Augmented Generation |
ITE | Individual Treatment Effect |
JSON | JavaScript Object Notation |
KG | Knowledge Graph |
LLM | Large Language Model |
LRU | Least Recently Used |
NER | Named Entity Recognition |
nDCG | Normalized Discounted Cumulative Gain |
QA | Question Answering |
RAG | Retrieval-Augmented Generation |
SAM | Structural Agnostic Modelling |
SUS | System Usability Scale |
USDA | United States Department of Agriculture |
UX | User Experience |
Appendix A
References
- Toledo, R.Y.; Alzahrani, A.A.; Martinez, L. A Food Recommender System Considering Nutritional Information and User Preferences; Springer: Singapore, 2019. [Google Scholar]
- Azzi, R.; Despres, S.; Diallo, G. NutriSem: A Semantics-Driven Approach to Calculating Nutritional Value of Recipes. In Proceedings of the WorldCIST 2020, Budva, Montenegro, 7–10 April 2020. [Google Scholar]
- Chen, M.; Jia, X.; Gorbonos, E.; Hong, C.T.; Yu, X.; Liu, Y. Eating Healthier: Exploring Nutrition Information for Healthier Recipe Recommendation. arXiv 2020, arXiv:2003.07027v1. [Google Scholar] [CrossRef]
- Bondevik, J.N.; Bennin, K.E.; Babur, Ö.; Ersch, C. A systematic review on food recommender systems. Expert Syst. Appl. 2024, 238, 122166. [Google Scholar] [CrossRef]
- Bakagianni, J.; Pouli, K.; Gavriilidou, M.; Pavlopoulos, J. A Systematic Survey of Natural Language Processing for the Greek Language. Patterns 2025, 6, 101313. [Google Scholar] [CrossRef]
- Trattner, C.; Elsweiler, D. Food Recommender Systems: Important Contributions, Challenges and Future Research Directions. arXiv 2017, arXiv:1711.02760. [Google Scholar] [CrossRef]
- Tran, T.N.T.; Atas, M.; Felfernig, A.; Stettinger, M. An overview of recommender systems in the healthy food domain. J. Intell. Inf. Syst. 2018, 50, 501–526. [Google Scholar] [CrossRef]
- Orue-Saiz, I.; Kazarez, M.; Mendez-Zorrilla, A. Systematic Review of Nutritional Recommendation Systems. Appl. Sci. 2021, 11, 12069. [Google Scholar] [CrossRef]
- Min, W.; Liu, C.; Xu, L.; Jiang, S. Applications of knowledge graphs for food science and industry. Patterns 2022, 3, 100484. [Google Scholar] [CrossRef]
- Li, D.; Zaki, M.J.; Chen, C.-H. Health-guided recipe recommendation over knowledge graphs. J. Web Semant. 2023, 75, 100743. [Google Scholar] [CrossRef]
- Cui, J.; Zhang, X.; Zheng, D. Construction of recipe knowledge graph based on user knowledge demands. J. Inf. Sci. 2023, 51, 881–895. [Google Scholar] [CrossRef]
- Khilji, A.F.U.R.; Manna, R.; Laskar, S.R.; Pakray, P.; Das, D.; Bandyopadhyay, S.; Gelbukh, A. CookingQA: Answering Questions and Recommending Recipes Based on Ingredients. Arab. J. Sci. Eng. 2021, 46, 3701–3712. [Google Scholar] [CrossRef]
- Zheng, W.; Cheng, H.; Yu, J.X.; Zou, L.; Zhao, K. Interactive natural language question answering over knowledge graphs. Inf. Sci. 2019, 481, 141–159. [Google Scholar] [CrossRef]
- Chatterjee, U.; Giunchiglia, F.; Madalli, D.P.; Maltese, V. Modeling Recipes for Online Search. In On the Move to Meaningful Internet Systems: OTM 2016 Conferences; LNCS; Springer: Cham, Switzerland, 2016. [Google Scholar]
- Gao, F.; Zhao, X.; Xia, D.; Zhou, Z.; Yang, R.; Lu, J.; Jiang, H.; Park, C.; Li, I. HealthGenie: Empowering Users with Healthy Dietary Guidance through Knowledge Graph and Large Language Models. arXiv 2025, arXiv:2504.14594. [Google Scholar] [CrossRef]
- Chen, Y.; Subburathinam, A.; Chen, C.; Zaki, M.J. Personalized Food Recommendation as Constrained Question Answering over a Large-scale Food Knowledge Graph. In Proceedings of the Fourteenth ACM International Conference on Web Search and Data Mining (WSDM’21), Online, 8–12 March 2021. [Google Scholar]
- Ławrynowicz, A.; Wróblewska, A.; Adrian, W.T.; Kulczyński, B.; Gramza-Michałowska, A. Food Recipe Ingredient Substitution Ontology Design Pattern. Sensors 2022, 22, 1095. [Google Scholar] [CrossRef] [PubMed]
- Senath, T.; Athukorala, K.; Costa, R.; Ranathunga, S.; Kaur, R. Large Language Models for Ingredient Substitution in Food Recipes using Supervised Fine-tuning and Direct Preference Optimization. arXiv 2024, arXiv:2412.04922v1. [Google Scholar] [CrossRef]
- Bajaj, V.; Panda, R.B.; Dabas, C.; Kaur, P. Graph Database for Recipe Recommendations. In Proceedings of the 7th International Conference on Reliability, Infocom Technologies and Optimization (ICRITO), Noida, India, 29–31 August 2018. [Google Scholar]
- Tang, Y.S.; Zheng, A.H.; Lai, N. Healthy Recipe Recommendation Using Nutrition and Ratings Models. In Proceedings of the AAAI 2019, Honolulu, HI, USA, 27 January–1 February 2019. [Google Scholar]
- The New York Times. Nytimes/Ingredient-Phrase-Tagger: Extract Structured Data from Ingredient Phrases Using Conditional Random Fields. Available online: https://github.com/nytimes/ingredient-phrase-tagger (accessed on 27 July 2025).
- Marín, J.; Biswas, A.; Ofli, F.; Hynes, N.; Salvador, A.; Aytar, Y.; Weber, I.; Torralba, A. Recipe1M+: A Dataset for Learning Cross-Modal Embeddings for Cooking Recipes and Food Images. IEEE Trans. Pattern Anal. Mach. Intell. 2021, 43, 187–203. [Google Scholar] [CrossRef] [PubMed]
- Tsampos, I.; Marakakis, E. A Knowledge Graph Question Answering System for Personalized Nutrition and Recipes Recommendation. In Pervasive Computing Technologies for Healthcare: 18th EAI International Conference, PervasiveHealth 2024, Heraklion, Crete, Greece, 17–18 September 2024, Proceedings, Part I; Springer Nature AG: Cham, Switzerland, 2025; Volume 611, pp. 61–79. [Google Scholar]
- Trattner, C.; Elsweiler, D. Investigating the Healthiness of Internet-Sourced Recipes. In Proceedings of the WWW Conference, Perth, Australia, 3–17 May 2017. [Google Scholar]
- Huang, X.; Zhang, J.; Li, D.; Li, P. Knowledge Graph Embedding Based Question Answering. In Proceedings of the Twelfth ACM International Conference on Web Search and Data Mining (WSDM’19), Melbourne, VIC, Australia, 11–15 February 2019. [Google Scholar]
- Gharibi, M.; Zachariah, A.; Rao, P. FoodKG: A Tool to Enrich Knowledge Graphs Using Machine Learning Techniques. Front. Big Data 2020, 3, 12. [Google Scholar]
- Zioutos, K.; Kondylakis, H.; Stefanidis, K. Healthy Personalized Recipe Recommendations for Weekly Meal Planning. Computers 2023, 13, 1. [Google Scholar] [CrossRef]
- Ribeiro, R.; Batista, F.; Pardal, J.P.; Mamede, N.J.; Pinto, H.S. Cooking an Ontology. In Proceedings of the AIMSA 2006, Varna, Bulgaria, 12–15 September 2006. [Google Scholar]
- Haussmann, S.; Seneviratne, O.; Chen, Y.; Ne’eman, Y.; Codella, J.; Chen, C.-H.; McGuinness, D.L.; Zaki, M.J. FoodKG: A Semantics-Driven Knowledge Graph for Food Recommendation. In Proceedings of the International Semantic Web Conference (ISWC), Auckland, New Zealand, 26–30 October 2019. [Google Scholar]
- Fatemi, B.; Duval, Q.; Girdhar, R.; Drozdzal, M.; Romero-Soriano, A. Learning to Substitute Ingredients in Recipes. arXiv 2023, arXiv:2302.07960. [Google Scholar] [CrossRef]
- Qi, Z.; Yu, Y.; Tu, M.; Tan, J.; Huang, Y. FoodGPT: A Large Language Model in Food Testing Domain with Incremental Pre-training and Knowledge Graph Prompt. arXiv 2023, arXiv:2308.10173. [Google Scholar]
- Zhou, P.; Min, W.; Fu, C.; Jin, Y.; Huang, M.; Li, X.; Mei, S.; Jiang, S. FoodSky: A Food-oriented Large Language Model that Passes the Chef and Dietetic Examination. arXiv 2024, arXiv:2406.10261v1. [Google Scholar] [CrossRef]
- Yang, Z.; Khatibi, E.; Nagesh, N.; Abbasian, M.; Azimi, I.; Jain, R.; Rahmani, A.M. ChatDiet: Empowering personalized nutrition-oriented food recommender chatbots through an LLM-augmented framework. Smart Health 2024, 32, 100465. [Google Scholar] [CrossRef]
- Tsampos, I.; Marakakis, E. Querying Knowledge Graphs in Greek Language. In Proceedings of the 17th International Conference on PErvasive Technologies Related to Assistive Environments, Crete, Greece, 26–28 June 2024. [Google Scholar]
- Serderidis, K.; Konstantinidis, I.; Meditskos, G.; Peristeras, V.; Bassiliades, N. d2kg: An integrated ontology for knowledge graph-based representation of government decisions and acts—The Greek Programme Diavgeia case. Semant. Web 2024, 15, 1677–1699. [Google Scholar] [CrossRef]
- Tsampos, I.; Marakakis, E. A Medical Question Answering System with NLP and Graph Database. In Proceedings of the HeDAI 2023 Workshop, Co-Located with EDBT/ICDT 2023 Joint Conference, Ioannina, Greece, 28–31 March 2023. [Google Scholar]
System Features | DietQA | HealthGenie [15] | FoodKG [29] | pFoodReQ [16] | Health-Guided Recipe Recom. [10] | FoodSky [32] | ChatDiet [33] | FoodGPT [31] | GISMo [30] |
---|---|---|---|---|---|---|---|---|---|
Uses a food KG | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✗ | ✓ | ✓ |
Formulated as KG-QA | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
Multi-diet combination reasoning | ✓ | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
Diet-aware ingredient substitutions | ✓ | ✓ | ✓ | ✗ | ✓ | ✗ | ✗ | ✗ | ✓ |
Conversational, multi-turn QA | ✓ | ✓ | ✗ | ✗ | ✗ | ✓ | ✓ | ✗ | ✗ |
Symbolic constraint composition | ✓ | ✓ | ✓ | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ |
Explanation/rationale | ✓ | ✓ | ✗ | ✗ | ✓ | ✓ | ✓ | ✗ | ✗ |
Quantitative multi-diet coverage and substitution lift | ✓ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ |
You’re looking for recipes with chicken and tomato, with a focus on high protein content, low fat and low carbohydrates, and a small number of total ingredients. You don’t like artichokes, broad beans, okra, or mushrooms. Let’s look at the options: Your search returned 44 recipes, mainly featuring chicken and tomato-based dishes, including main meals, salads, pizzas, and soups. Most recipes are suitable for gluten-free and dairy-free diets, and many are high in protein and low in fat. To help you choose, we’ve grouped the recipes into two categories based on their nutritional profile: Group 1 (Lighter): These recipes (18) have about 121 calories per 100 g, with high protein content (23%), moderate fat (27%), and fairly high carbohydrates (50%). Ideal if you’re looking for something light and protein-rich. Group 2 (Richer): These recipes (26) have about 220 calories per 100 g, with lower protein content (15%), much higher fat (43%), and lower carbohydrates (18%). This group is richer in fats and may be more filling, but it doesn’t align well with your preference for low fat. |
The top three results are: calzone, chicken/turkey giouvetsi, and beer-roasted chicken, with 11, 10, and 8 ingredients, respectively. Let’s look at how well these match your preferences: Pan-fried Calzone: High in fat and carbs, so not ideal if you’re looking for low-fat, low-carb meals. You already have tomato, but you’ll need turkey, ham, tortillas, gouda, mozzarella, and peppers. Chicken or Turkey Giouvetsi: A good option! Moderate in carbs, high in protein, and low in fat. You already have chicken, tomato, onion, pepper, and salt. You’ll need orzo, turkey, chicken stock cube, tomato paste, and garlic. Beer-Roasted Chicken: Interesting choice, but high in fat. You already have tomato, chicken, salt, and black pepper. You’ll need beer, mustard powder, red pepper, and margarine. Chicken with Eggplant in Pot: A very good choice! Low in calories, high in protein, and low in fat. You already have tomato and chicken. You’ll need tsakonian eggplants and oil. Rooster Soup with Trahana: Also a good option, moderate in carbs. You already have potatoes, zucchini, tomato, onion, and chicken. You’ll need leeks, rooster, and celery. Chicken with Lentil Rice: An interesting option, but moderate in fat. You already have chicken, tomato, and onion. You’ll need lentils, rice, and balsamic vinegar. Chicken with Peas in Clay Pot: Not the best option, as it’s quite fatty. You have chicken, tomato, carrot, and onion. Chicken with Okra: Not ideal either, as it’s high in fat and carbs, and you don’t like okra. You have tomato, onion, chicken, pepper, and salt. Summary: The Chicken or Turkey Giouvetsi and Chicken with Eggplant in Pot are the best matches for your preferences: high protein, low fat. The rest have drawbacks in terms of fat, carbs, or required ingredients. |
Top-1 Accuracy | Recall@3 | nDCG@5 | Constraint Satisfaction |
---|---|---|---|
88.3% | 93.3% | 0.908 | 90.0% |
Covered Query Category | # Queries | Percentage of Covered Queries |
---|---|---|
All Covered Queries (≥1 recipe) | 9718 | 100.0% |
Covered by Direct Match | 7233 | 74.4% |
- Direct-Only Coverage | 5691 | 58.6% |
Covered by Substitution | 4027 | 41.4% |
- Substitution-Only Coverage | 2485 | 25.6% |
- Supplemented Coverage * | 1542 | 15.9% |
# Diets | Total Queries | Queries with Results | Total Results | Coverage | Avg Results/Successful Query | Unique Dishes from Direct Match | Additional Unique Dishes from Substitution Coverage | Coverage Lift Using Substitution |
---|---|---|---|---|---|---|---|---|
1 | 9192 | 4335 | 17,836 | 47.2% | 4.11 | 1084 | 250 | +23% |
2 | 13,788 | 3682 | 11,580 | 26.7% | 3.15 | 614 | 319 | +52% |
3 | 9192 | 1473 | 3493 | 16.0% | 2.37 | 368 | 320 | +87% |
4 | 2298 | 228 | 345 | 9.9% | 1.51 | 228 | 257 | +113% |
Span | Mean | Median | P95 | P99 | Min | Max |
---|---|---|---|---|---|---|
Aggregated queries (base + substitution) | 213.7 | 186.7 | 402.3 | 575.4 | 169.78 | 1450.9 |
Base (no substitution) | 105.2 | 92.4 | 197.7 | 345.1 | 83.9 | 967.9 |
With substitution | 108.5 | 93.4 | 201.5 | 362.3 | 83.7 | 1323.9 |
1 diet base/substitution/aggregated | 107.0 | 93.2 | 199.1 | 348.1 | 83.8 | 940.3 |
109.0 | 93.7 | 201.7 | 364.9 | 84.4 | 1153.4 | |
216.0 | 187.7 | 410.0 | 577.6 | 170.8 | 1300.9 | |
2 diets base/substitution/aggregated | 105.2 | 92.2 | 198.4 | 345.8 | 83.9 | 967.9 |
108.7 | 93.3 | 202.5 | 363.7 | 83.7 | 1323.9 | |
213.9 | 186.5 | 410.7 | 575.7 | 169.8 | 1416.4 | |
3 diets base/substitution/aggregated | 103.7 | 91.9 | 181.4 | 339.0 | 84.4 | 771.8 |
107.8 | 93.2 | 201.1 | 358.2 | 84.4 | 1307.5 | |
211.5 | 186.2 | 371.5 | 545.6 | 170.1 | 1450.9 | |
4 diets base/substitution/aggregated | 104.0 | 91.9 | 197.8 | 333.5 | 84.8 | 756.7 |
107.9 | 93.2 | 200.5 | 360.4 | 84.6 | 1118.2 | |
212.0 | 185.7 | 399.4 | 551.3 | 172.0 | 1212.1 |
Metric | 4.4 K Recipes DB | 17.6 K Recipes DB | Change |
---|---|---|---|
Number of Recipes | 4395 | 17,587 | ×4.0 |
Avg Ingredients per Recipe | 9.24 | 9.25 | ≈same |
Unique Dishes | 1363 | 2298 | 68.6% |
Queries | 20,445 | 34,470 | 68.6% |
Total Results | 7885 | 33,258 | ×4.2 |
Coverage | 20.5% | 28.2% | +37.6% |
No-result rate | 79.5% | 71.8% | −7.7 pp |
Avg results/query | 0.39 | 0.97 | ×2.50 |
Time per result (overall) | 101.1 ms | 65.0 ms | −36% |
Results per second (successful) | 9.9 | 15.4 | +55% |
Mean total latency/query | 187.9 ms | 213.7 ms | +13.8% |
Median total latency/query | 159.1 ms | 186.7 ms | +17.4% |
p95/p99 latency | 406/578 ms | 402/575 ms | ≈same |
Coverage Lift using Substitution | +36.6% | +37.8% | ≈same |
Task # | Task Description |
---|---|
1 | Find a suitable breakfast that fits your usual dietary preferences or restrictions |
2 | Ask a nutrition-related question you are genuinely curious about (e.g., low-carb recipes, protein content, or alternatives to dairy) |
3 | Search for a lunch option under a specific micronutrient threshold that includes preferred ingredients while excluding disliked ones |
4 | Look for a meal from a specific dietary framework (e.g., Mediterranean, ketogenic) that is also high in protein |
5 | Find a dessert recipe that satisfies your preferences (e.g., low-fat, gluten-free) using varied expression methods |
6 | Perform complex queries with multiple dietary constraints (e.g., low-carb, high-protein, dairy-free) and evaluate result relevance |
7 | Request recipes incorporating specific ingredients within a chosen dietary framework and verify alignment with stated goals |
8 | Search for recipes featuring a particular main ingredient and explore preparation methods using preferred pantry items |
9 | Inquire about calorie content and macronutrient breakdown of commonly consumed ingredients or food items |
10 | Formulate one or more personalized questions reflecting genuine dietary needs, preferences, or nutritional curiosities |
Statement # | Statement |
---|---|
1 | The system was easy to use |
2 | The recipe suggestions were helpful for my needs |
3 | I was satisfied with the quality and clarity of the answers |
4 | The system respected my dietary preferences and restrictions |
5 | I trust the nutritional information and recommendations given by the system |
6 | I felt the recommendations were tailored to my personal dietary needs |
7 | I enjoyed trying the recipes suggested by the system |
8 | I would continue using this system if it were available in my regular diet app |
Item # | Statement |
---|---|
1 | I think that I would like to use this system frequently |
2 | I found the system unnecessarily complex (reverse-scored) |
3 | I thought the system was easy to use |
4 | I think that I would need the support of a technical person to be able to use this system (reverse-scored) |
5 | I found the various functions in this system were well integrated |
6 | I thought there was too much inconsistency in this system (reverse-scored) |
7 | I would imagine that most people would learn to use this system very quickly |
8 | I found the system very cumbersome to use (reverse-scored) |
9 | I felt very confident using the system |
10 | I needed to learn a lot of things before I could get going with this system (reverse-scored) |
Aspect | Score (Positive %) |
---|---|
Ease of Use (interface and interaction) | 92.5% |
Usefulness of recommendations | 85.0% |
Satisfaction with response quality | 85.0% |
Personalization satisfaction | 95.0% |
Trust in system accuracy | 87.5% |
Adoption likelihood (continued use) | 85.0% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tsampos, I.; Marakakis, E. DietQA: A Comprehensive Framework for Personalized Multi-Diet Recipe Retrieval Using Knowledge Graphs, Retrieval-Augmented Generation, and Large Language Models. Computers 2025, 14, 412. https://doi.org/10.3390/computers14100412
Tsampos I, Marakakis E. DietQA: A Comprehensive Framework for Personalized Multi-Diet Recipe Retrieval Using Knowledge Graphs, Retrieval-Augmented Generation, and Large Language Models. Computers. 2025; 14(10):412. https://doi.org/10.3390/computers14100412
Chicago/Turabian StyleTsampos, Ioannis, and Emmanouil Marakakis. 2025. "DietQA: A Comprehensive Framework for Personalized Multi-Diet Recipe Retrieval Using Knowledge Graphs, Retrieval-Augmented Generation, and Large Language Models" Computers 14, no. 10: 412. https://doi.org/10.3390/computers14100412
APA StyleTsampos, I., & Marakakis, E. (2025). DietQA: A Comprehensive Framework for Personalized Multi-Diet Recipe Retrieval Using Knowledge Graphs, Retrieval-Augmented Generation, and Large Language Models. Computers, 14(10), 412. https://doi.org/10.3390/computers14100412