TITLE OF THE PROJECT
CAPSTONE PROJECT REPORT
Submitted by
Nithin Punyamanthula– 99210041106
R. Gagan Kumar – 99200041108
M. Hari Madhav–9921004441
M. Naresh–99210041080
in partial fulfilment for the award of the degree
of
BACHELOR OF TECHNOLOGY
IN
COMPUTER SCIENCE AND ENGINEERING
SCHOOL OF COMPUTING
COMPUTER SCIENCE AND ENGINEERING
KALASALINGAM ACADEMY OF RESEARCH
AND EDUCATION
KRISHNANKOIL 626 126
April 2025
DECLARATION
We affirm that the project work titled “Personalized Dish Recommendation System for
Restaurants Using NLP and Machine Learning Techniques” being submitted in partial
fulfillment for the award of the degree of Bachelor of Technology in Computer Science and
Engineering is the original work carried out by us. It has not formed part of any other project
work submitted for the award of any degree or diploma, either in this or any other University.
Nithin Punyamanthula
99210041106
R. Gagan Kumar
99200041108
M. Hari Madhav
9921004441
M. Naresh
99210041080
This is to certify that the above statement made by the candidate is correct to the best of my
knowledge.
Date:
Signature of supervisor
Guide Name
Associate/Assistant Professor
Department of Computer Science and Engineering
BONAFIDE CERTIFICATE
Certified that this project report “Personalized Dish Recommendation System for Restaurants
Using NLP and Machine Learning Techniques” is the Bonafide work of
“Nithin Punyamanthula (99200041106), R. Gagan Kumar (99200041108), M. Hari
Madhav(9920004441), M. Naresh(99200041080)” who carried out the project work under my
supervision.
Guide Name Dr. P. Chinnasamy
SUPERVISOR HEAD OF THE DEPARTMENT
Associate/Assistant Professor Assistant Professor
Computer Science and Engineering Computer Science and Engineering
Kalasalingam Academy of Research and Kalasalingam Academy of Research and
Education Education
Krishnankoil 626126 Krishnankoil 626126
Virudhunagar District. Virudhunagar District.
Submitted for the Project Viva-voce examination held on
Internal Examiner External Examiner
ACKNOWLEDGEMENT
We would like to begin by expressing our heartfelt gratitude to the Supreme Power for the
immense grace that enabled us to complete this project.
We are deeply grateful to the late "Kalvivallal" Thiru T. Kalasalingam, Chairman of the
Kalasalingam Group of Institutions, and to "Illayavallal" Dr. K. Sridharan, Chancellor, as
well as Dr. S. Shasi Anand, Vice President, who has been a guiding light in all our university’s
endeavours.
Our sincere thanks go to our Vice Chancellor, Dr. S. Narayanan, for his inspiring leadership,
guidance, and for instilling in us the strength and enthusiasm to work towards our goals.
We would like to express our sincere appreciation to Dr. P. Deepa Lakshmi, Professor &
Dean-(SoC), Director Accreditation & Ranking, for her valuable guidance. Our heartfelt
gratitude also goes to our esteemed Head of Department, Dr. N. Suresh Kumar, whose
unwavering support has been crucial to the successful advancement of our project.
We are especially thankful to our Project Supervisor, [Guide’s Name], for his patience,
motivation, enthusiasm, and vast knowledge, which greatly supported us throughout this work.
Our sincere gratitude also goes to Dr. S. Ariffa Begum and Dr.T.Manikumar Overall Project
Coordinators, for their constant encouragement and support in completing this Capstone
Project.
Finally, we would like to thank our parents, faculty, non-teaching staff, and friends for their
unwavering moral support throughout this journey.
SCHOOL OF COMPUTING
COMPUTER SCIENCE AND ENGINEERING
PROJECT SUMMARY
Project Title Personalized Dish Recommendation System for Restaurants Using
NLP and Machine Learning Techniques
Project Team Members Nithin -99210041106
(Name with Register No) Gagan kumar -99210041108
M. Hari Madhav–9921004441
M. Naresh–99210041080
Guide Name/Designation P. Chinnasamy / Assistant Professor
Program Concentration
Area
Technical Requirements
Engineering standards and realistic constraints in these areas
Area Codes & Standards / Realistic Constraints Tick ✓
Utilizes open-source tools (BERT, Flask, scikit-learn) to
Economic reduce development costs. Improves restaurant profitability ✓
via optimized dish recommendations.
Promotes low-waste consumption by recommending dishes ✓
Environmental based on ingredient availability and minimizing excess
inventory.
Social
Enhances dining experience through personalization, ✓
contributing to customer satisfaction and social well-being.
Ethical
Ensures transparency in recommendation logic; avoids ✓
biased suggestions by using diverse training data.
Incorporates dietary filters and health-based
Health and Safety recommendations (e.g., for diabetic users), encouraging ✓
safe consumption.
Designed for easy implementation in existing restaurant
Manufacturability systems with minimal technical barriers; scalable ✓
deployment options.
Sustainability
Encourages mindful eating habits and menu planning ✓
aligned with nutritional goals and local ingredient sourcing.
SDG
Aligns with SDG 3: Good Health and Well-being, and SDG ✓
12: Responsible Consumption and Production.
ABSTRACT
This paper introduces a dual-recommendation system for restaurant customers that leverages
generative AI and machine learning techniques. The system incorporates prompt based
recommendations using Hugging Face generative AI models, enhanced by NLP-driven output
refinement, to deliver real-time, context-aware suggestions. Simultaneously, a clustering
algorithm analyzes historical customer data, categorizing dishes based on nutritional
information to provide tailored recommendations aligned with customer preferences and health
goals. This integration of creative generative AI and data-driven clustering ensures a dynamic,
personalized dining experience while optimizing menu management and operational
efficiency. The proposed system highlights the transformative potential of AI and ML in
revolutionizing customer interaction, promoting sustainable practices, and advancing the food
service industry toward a more innovative and adaptive future.
TABLE OF CONTENTS
TITLE PAGE NO.
ABSTRACT 7
LIST OF TABLES 11
LIST OF FIGURES 12
LIST OF ACADEMIC REFERENCE COURSES
CHAPTER I INTRODUCTION 14
1.1 Background and Motivation 14
1.2 Problem Statement 14
1.3 Objectives of the Project 14
1.4 Scope of the Project 14
1.5 Methodology Overview 15
1.6 Organization of the Report 15
CHAPTER II LITERATURE REVIEW
2.1 Overview of Related Work 16
2.2 Review of Similar Projects or Research Papers 17-19
2.3 Summary and Gap Identification 19-20
CHAPTER III SYSTEM ANALYSIS
3.1 Requirements Gathering
3.2 Functional Requirements
3.3 Non-Functional Requirements
3.4 Feasibility Study
3.4.1 Technical Feasibility
3.4.2 Operational Feasibility
3.4.3 Economic Feasibility
3.5 Risk Analysis
CHAPTER IV SYSTEM DESIGN
4.1 Overall System Architecture
4.2 Module Design
4.2.1 Module 1
4.2.2 Module 2(Repeat as per your requirements)
4.3 Database Design
4.3.1 ER Diagram
4.3.2 Database Schema
4.4 User Interface Design
4.4.1 User Flow Diagrams
4.3 Database Design(if Required)
4.3.1 ER Diagram
4.3.2 Database Schema
4.4 User Interface Design
4.4.1 User Flow Diagrams
CHAPTER V IMPLEMENTATION
5.1 Technology Stack
5.1.1 Programming Languages and Tools
5.2 Implementation of Modules
5.2.1 Module 1
5.2.2 Module 2(Repeat as many time as required)
5.3 Integration of Modules
CHAPTER VI TESTING
6.1 Testing Methodology
6.1.1 Unit Testing
6.1.2 Integration Testing
6.1.3 System Testing
6.1.4 User Acceptance Testing (UAT)
6.2 Test Cases and Results
6.3 Bug Tracking and Resolution
CHAPTER VII RESULTS AND DISCUSSION
7.1 System Output Screenshots
7.2 Evaluation Metrics
7.3 Comparison with Existing Systems
7.4 Challenges Faced
7.5 Solutions and Improvements
CHAPTER VIII CONCLUSION & FUTURE SCOPE
REFERENCES : List of books, articles, research papers, and other resources used
PUBLICATION
CERTIFICATIONS
PLAGIARISM REPORT
LIST OF TABLES
TABLES DETAILS PAGE NO.
Table 1
Table 2
Table 3
Table 4
LIST OF FIGURES
FIGURES DETAILS PAGE NO.
Figure 1
Figure 2
Figure 3
Figure 4
LIST OF ACADEMIC REFERENCE COURSES
S. NO. COURSE CODE COURSE NAME
CHAPTER – I
INTRODUCTION
1.1 Background and Motivation
In the digital age, personalization is no longer a luxury but a necessity. This is particularly true
in the food service industry, where customer preferences are as diverse as they are dynamic.
Traditional static menu recommendations fall short in addressing the evolving expectations of
health-conscious and tech-savvy diners. The motivation behind this project stems from the need
to deliver a highly personalized dining experience by leveraging the power of Natural
Language Processing (NLP) and Machine Learning (ML). By integrating generative AI and
historical data analysis, restaurants can elevate their customer service while also promoting
sustainability and operational efficiency.
1.2 Problem Statement
Despite the growing demand for personalized dining experiences, existing food
recommendation systems lack contextual intelligence and adaptability. They often rely on rigid
rule-based or simplistic filtering approaches that fail to accommodate nuanced user
preferences, dietary restrictions, or changing health goals. This project seeks to address this
gap by developing a dual-recommendation system that combines real-time, context-aware
suggestions using generative AI with historical pattern recognition using clustering algorithms.
1.3 Objectives of the Project
The primary objectives of this project are:
To create a smart recommendation engine that tailors dish suggestions based on
individual user prompts and preferences.
To enhance the accuracy and relevance of recommendations using BERT and clustering
algorithms.
To promote healthier eating habits by incorporating nutritional data into the
recommendation process.
To optimize restaurant operations by leveraging insights from customer behavior and
dish popularity.
To design a scalable and user-friendly web-based system that benefits both customers
and restaurant staff.
1.4 Scope of the Project
This project is confined to restaurant environments where customer orders, menu details, and
dish nutrition data can be recorded and processed. It focuses on integrating pre-trained NLP
models and clustering algorithms within a unified system to recommend dishes. The system
considers factors such as mood, health conditions, past orders, and ingredient composition, but
it does not address supply chain or real-time inventory management at this stage.
1.5 Methodology Overview
The project methodology is structured around two main recommendation engines:
1. Prompt-Based Recommendations: Using Hugging Face’s pre-trained BERT model,
the system interprets customer prompts to generate personalized suggestions in real
time.
2. Order-Based Clustering: Utilizing the K-means clustering algorithm, the system
analyzes historical order data to group similar dishes and customers, improving
recommendation accuracy over time.
Key components of the methodology include:
Synthetic and real-world dataset integration.
NLP-based input preprocessing and output refinement.
K-means clustering based on nutritional and behavioral features.
Evaluation through precision, recall, F1-score, and AUC metrics.
1.6 Organization of the Report
The report is organized into the following sections:
Literature Survey (Section II): Reviews related work in food recommendation
systems, highlighting gaps in personalization, health-awareness, and contextual
understanding.
Proposed Methodology (Section III): Details the dual-recommendation framework,
including BERT integration and clustering workflow.
Simulation Settings (Section IV): Outlines the system requirements and tools used for
development and testing.
Evaluation and Optimization (Section V): Discusses performance metrics and
optimization strategies for improving recommendation accuracy.
Deployment and Scalability (Section VI): Describes the web-based deployment and
how the system is designed to scale.
Performance Evaluation (Section VII): Presents comparative results with existing
methods, emphasizing the superior performance of the proposed system.
Conclusion (Section VIII): Summarizes the key findings and suggests directions for
future research.
CHAPTER-II
LITERATURE REVIEW
2.1 Overview of Related Work
The evolution of food recommendation systems has been marked by the integration of
various technologies such as deep learning, natural language processing (NLP), and
collaborative filtering. A range of studies have contributed to the development of
intelligent systems tailored to improve food suggestions based on user preferences,
health data, and context-awareness.
Several notable contributions include:
Deep Learning-Based Ingredient Recognition: Md. Kishor Morol et al. introduced a
system that identifies ingredients through deep learning to generate recipe suggestions.
This approach tackles the problem of limited user knowledge about food combinations
and compatible ingredients.
AI-Driven Operational Efficiency: M.K. Murugeah’s work emphasizes the role of AI
in optimizing kitchen workflows and enhancing customer personalization through data
analytics, showing the broader impact of AI in restaurant management.
Sentiment and Context-Aware Systems: Elham Asani developed a system that analyzes
user reviews for personalized restaurant recommendations, highlighting the use of
sentiment analysis in improving customer targeting.
Health-Oriented and Multi-Criteria Systems: Chemlal et al. and Raciel Yera proposed
systems that prioritize health by using nutritional data and multi-criteria decision-
making models, addressing the growing demand for wellness-centric dining options.
Image-Based and Socially-Aware Systems: Gehad I. Alkady explored food image
recognition for better restaurant suggestions, while Mehrdad Rostami introduced
group-based recommendations using community detection, targeting collective
decision-making.
Systematic Reviews and Specialized Diets: Various authors, such as Jon Nicolas
Bondevik and Jieyu Zhang, provided systematic analyses of current methodologies and
focused on dietary-specific systems like those for diabetic patients or region-specific
needs.
Natural Language Explanations in Food Recommenders: Musto and Starke studied how
natural language justifications can build user trust in recommendations by making the
decision-making process transparent.
These studies collectively demonstrate the diversity of approaches in the field—from
ingredient-level analysis to sentiment mining and health optimization.
2.2 Review of Similar Projects or Research Papers
Md. Kishor Morol et al. [1] presented a novel approach in food recipe recommendation
systems through the integration of deep learning techniques. Published on August 11, 2022,
their research addresses the challenge of identifying food ingredients and creating recipes based
on those ingredients. Many individuals struggle to identify certain ingredients or to determine
compatible combinations for recipes. Traditional methods often lack accuracy in resolving such
complexities. By leveraging machine learning and deep learning models, the study successfully
implemented a solution for ingredient recognition and designed a recipe recommendation
algorithm to streamline this process.
M.K. Murugeah's [2] work, published on July 6, 2024, delves into how Artificial
Intelligence (AI) is revolutionizing the food and beverage service industry. This research
highlights AI's potential in optimizing operational efficiency, reducing costs, and personalizing
customer experiences. By automating processes such as kitchen operations and inventory
management, AI not only enhances profitability but also ensures consistent service quality.
Additionally, the analysis of extensive datasets enables AI-driven personalization in menu
recommendations and promotions. Emerging technologies like IoT, AR, and blockchain are
expected to further redefine dining experiences, providing competitive advantages for
establishments in the future.
Elham Asani [3], introduced a context-aware restaurant recommendation system using
sentiment analysis. The system moves beyond static factors such as food quality and pricing,
focusing instead on user-generated comments to derive personalized recommendations. By
employing a semantic approach, food names are clustered, and sentiments from reviews are
analyzed to suggest nearby open restaurants. The system was tested on TripAdvisor data from
100 users over nine months in 2018, achieving a precision rate of 92.8%. This performance
surpasses earlier models in precision, recall, and f-measure metrics across multiple
recommendation scenarios.
Chemlal et al [4], emphasizes the importance of health conscious personalized food and
restaurant recommendations. Published in the Journal of Universal Computer Science on
November 28, 2024, the system leverages multi-criteria evaluation and user profiling to deliver
customized suggestions based on individual preferences, needs, and locations. SFRA is aimed
at promoting healthier lifestyle choices and providing comprehensive insights into user
behaviors and practices, ultimately enhancing decision-making for refined and health focused
dining options.
Gehad I. Alkady [5] explored the intersection of food image classification and restaurant
recommendations in his research presented at the 16th International Conference on Electronics,
Computers, and Artificial Intelligence (ECAI) in 2024. His study addresses the growing trend
of food image sharing on social media and the demand for accurate classification algorithms.
By utilizing large-scale food datasets and advancements in deep learning models, a web service
was developed to assist users in finding optimal restaurants based on quality, price, and
location. This deep learning-powered system is designed to meet diverse needs, including
personalized health management, nutrition analysis, and dietary monitoring, while advancing
the effectiveness of food classification.
Raciel Year [6], along with collaborators from esteemed institutions such as the University of
Ciego de Ávila and King Abdulaziz University, proposed a framework that integrates
nutritional awareness and user preferences to recommend daily meal plans. This innovative
approach leverages AHPSort for multi-criteria decision analysis and optimization models to
satisfy individual dietary requirements. While groundbreaking in combining nutritional and
preference data, the paper acknowledges that the depth of nutritional principles incorporated
into computational models remains limited.
In another contribution by Yera, Alzahrani, Martínez, and Rodríguez [7], a systematic
review focuses on food recommendation systems designed for diabetic patients. Published in
2023, this work evaluates existing research, emphasizing the need for frameworks that integrate
diabetes specific knowledge. Techniques like ontologies, optimization, and rule-based systems
are extensively discussed, but the authors highlight challenges such as inadequate datasets and
limited incorporation of user preferences. Their review paves the way for more comprehensive
and specialized systems to assist diabetic users.
Nattaporn Thongsri [8] and colleagues developed a personalized food
recommendation system utilizing collaborative filtering and the knapsack method. By
optimizing food recommendations to meet individual preferences and nutritional needs, this
system achieved high user satisfaction. Despite its success, it faced a cold-start problem due to
insufficient user preference data in its initial stages. The research, published in 2022, showcases
the potential of combining collaborative filtering with dynamic programming to create
effective personalized solutions.
For group-based food recommendations, Mehrdad Rostami et al [9] . proposed a deep
social community detection approach in 2024. Their system considers user popularity, trust
networks, and health-aware ratings to suggest healthy food options to groups. With deep
learning techniques for feature extraction and time-aware similarity measures, the model
demonstrated exceptional performance on real-world datasets. However, like most group
recommendation systems, balancing diverse preferences within groups remains an inherent
challenge, though the study did not explicitly discuss its limitations.
Finally, Jon Nicolas Bondevik [10] and collaborators offered a systematic review of
food recommender systems, presenting an overview of current methodologies like content
based and collaborative filtering, graph-based methods, and machine learning algorithms.
Published in March 2024, this work highlights key gaps in the field, such as the lack of user
attribute integration and reliance on single data sources like Allrecipes. The authors advocate
for more robust real-world evaluation methods to ensure these systems meet user expectations
beyond laboratory settings.
Walpitage’s [11] research, published in June 2023 by OULUN YLIOPISTON, introduced
a food recipe recommendation system tailored to the Finnish food community. This system
integrates nutritional factors with dietary preferences and health goals, aiming to foster
healthier eating habits while preserving local culinary traditions. By reflecting Finland’s food
culture and nutritional standards, the approach bridges personal preferences with regional
dietary practices. However, challenges such as limited regional data, cultural diversity, and the
difficulty of balancing personalized recommendations with nutritional accuracy persist,
highlighting the need for further refinement .
Jieyu Zhang’s [12] work, published in 2023 by Brunel University London, takes a
machine learning-based approach to food recommendation systems. By analyzing user
preferences, dietary requirements, and prevailing food trends, the system delivers personalized
meal suggestions through adaptive algorithms and predictive models. This innovation elevates
user experience by dynamically adjusting recommendations. Despite its strengths, the system
faces hurdles, including data privacy concerns, biases in recommendations, and difficulties in
adapting to diverse diets. Furthermore, its reliance on accurate user input can impede
performance, especially in cases of insufficient data or complex preferences.
Marieke Van Erp and Diana Maynard [13], in their 2021 study published by
Frontiers, explored the intersection of Natural Language Processing (NLP), Artificial
Intelligence (AI), and food sustainability. Their approach evaluates recipes by analyzing
nutritional content and environmental impact, promoting both healthier diets and sustainable
practices. The research also examines ingredient sourcing and cooking methods to quantify
sustainability. Despite its noble objectives, the system struggles with inconsistent sustainability
data, AI biases in analyzing global cuisines, and the inherent difficulty of measuring
sustainability across diverse cultural contexts. The variability of nutritional accuracy across
sources further complicates implementation.
Meherdad Rostami and Mourad Oussalah [14] in a paper published by IEEE in
May 2022, proposed a novel time aware food recommendation system. By combining deep
learning with graph clustering, the system incorporates temporal factors such as meal timing
and user behavior to provide personalized suggestions. This approach enhances
recommendation relevance by aligning choices with user habits. However, its effectiveness
depends on large datasets and robust adaptability, which can be challenging in real-time
scenarios. Additionally, handling diverse cultural preferences and seasonal variations
introduces complexities that the system must navigate for broader applicability.
Cataldo Musto and Alain D. Starke [15] , through their 2021 study published in ACM,
investigated the role of natural language justifications in food recommender systems. Their
approach aims to enhance transparency, trust, and user satisfaction by offering clear
explanations for recommendations. These justifications strengthen user engagement by
improving the perceived reliability of the system. Nevertheless, generating accurate and
context-aware justifications remains a challenge, as does ensuring user acceptance and
managing the computational demands of integrating language models with recommendation
systems.
2.3 Summary and Gap Identification
Despite the significant advancements in food recommendation systems, several key gaps
remain:
1. Lack of Real-Time Contextual Recommendations: Many systems rely on static data
or fixed rules, which limits their responsiveness to real-time inputs such as mood,
cravings, or situational preferences.
2. Underutilization of Generative AI Models: While NLP has been applied for sentiment
analysis or review interpretation, the use of generative AI models like BERT for
direct dish recommendation remains underexplored.
3. Limited Dual-Approach Integration: Most existing solutions either rely on
collaborative filtering or content-based filtering. Few systems combine generative AI
and clustering techniques to leverage both user intent and historical behavioral data.
4. Insufficient Health-Personalization: Although some models integrate nutritional data,
they often lack dynamic customization based on user health goals or disease
conditions.
5. Scalability and Deployment Gaps: Many academic models have not been translated
into scalable, real-world applications accessible via web or mobile interfaces.
6. Cold Start and Data Dependency: Some systems struggle with cold-start problems due
to a lack of user history, which can be mitigated by combining prompt-based AI input
with pattern analysis.
The proposed work addresses these gaps by developing a dual-recommendation system that
combines real-time, context-aware prompts using generative AI with historical pattern
recognition via clustering. It further enhances personalization through nutrition-based
filtering and is designed for deployment as a scalable web application.
SYSTEM ANALYSIS III
3.1 Requirements Gathering
The initial phase of the project involved gathering requirements through a combination of user
behavior analysis, system simulations, and technical evaluations. Synthetic datasets were used
to model real-world restaurant scenarios, including dish orders, dietary restrictions, and menu
options. This helped determine what features the system must support and what constraints it
should operate under. Input was drawn from potential user interactions and the operational
needs of a restaurant environment.
3.2 Functional Requirements
Functional requirements define the core features and operations the system must perform:
User Input Handling: Accepts user prompts (e.g., cravings, mood, dietary needs) and
processes them through NLP.
Personalized Recommendations: Generates real-time dish suggestions using BERT-
based models.
Historical Order Analysis: Analyzes past customer orders via clustering to identify
preferences.
Dish Categorization: Groups dishes based on nutritional content, ingredients, and
other features.
Data Management: Manages and retrieves data from datasets such as dish.csv,
disease.csv, menu.csv, and order.csv.
Menu Matching: Ensures that recommendations correspond to available dishes.
User Interface: Provides a clean, user-friendly web interface for both customers and
staff.
3.3 Non-Functional Requirements
Non-functional requirements focus on the quality and performance attributes of the
system:
Performance: The system must deliver prompt responses (low latency) to user
input for real-time interaction.
Scalability: Must support growth in user base and data volume with modular
components.
Accuracy: High precision and recall in recommendations, with relevance based
on contextual inputs.
Reliability: Continuous system uptime and fault tolerance to ensure service
availability.
Security: Protect user data and prevent unauthorized access.
Usability: Interface must be intuitive and accessible for all user types, with clear
navigation.
3.4 Feasibility Study
A feasibility study was conducted to determine whether the system could be
successfully implemented given current resources and constraints.
3.4.1 Technical Feasibility
The system uses well-supported tools such as Python, Flask (backend),
HTML/CSS (frontend), BERT (NLP model), Hugging Face APIs, and
scikit-learn for clustering.
Required system specifications (Windows 11, 11th Gen processor, 8
GB RAM) are available and adequate for development and testing.
Pre-trained models and synthetic data ensure a viable testing
environment without extensive resource overhead.
3.4.2 Operational Feasibility
The system is designed to integrate easily into a restaurant’s workflow.
Staff can use it for customer service, and customers can interact
through a user-friendly interface.
The platform improves service efficiency and personalization, making
it highly adoptable by restaurants.
3.4.3 Economic Feasibility
By using open-source libraries and pre-trained models, development
costs are minimized.
The web-based deployment model reduces infrastructure expenses.
Return on investment is expected through improved customer
satisfaction, increased order value, and reduced food waste.
3.5 Risk Analysis
A thorough risk assessment identified potential challenges:
Risk Impact Likelihood Mitigation Strategy
Model bias or Regular model tuning and
High Medium
inaccuracy user feedback loop.
Use generative AI to guide
Cold start for new users Medium High
initial interactions.
Data inconsistency in Data validation and
Medium Medium
inputs preprocessing routines.
System downtime or Optimize backend
High Low
slow responses performance and monitoring.
User resistance to Offer training and intuitive
Low Medium
technology design.
Secure data storage and
Security vulnerabilities High Low
access controls.
SYSTEM DESIGN IV
IV. SYSTEM DESIGN
4.1 Overall System Architecture
The proposed system architecture is built on a modular and layered framework combining
Natural Language Processing (NLP), machine learning algorithms, and web technologies to
deliver personalized dish recommendations. It features both front-end and back-end
components connected through APIs and supported by structured databases.
Frontend: HTML/CSS user interface for user input and results display.
Backend: Python-Flask server handles input processing, recommendation generation,
and database communication.
NLP Layer: BERT-based generative AI processes user prompts.
ML Layer: Clustering algorithm (K-means) processes historical data for predictions.
Database Layer: Stores all necessary data (dishes, menus, orders, dietary info).
Technologies Used: Python, Flask, Hugging Face (BERT), scikit-learn, Pandas, HTML/CSS,
SQLite or CSV-based storage.
4.2 Module Design
Module 1: Prompt-Based Recommendation Engine
Objective: Generate dish suggestions based on real-time user input.
Components:
o Input handler: Captures user text prompts.
o BERT processor: Converts input into contextual embeddings.
o Recommendation engine: Matches embeddings with suitable dishes.
o Output refiner: Uses NLP filters to clean and personalize suggestions.
Module 2: Clustering-Based Dish Classification
Objective: Analyze historical data to discover dish and customer patterns.
Components:
o Data loader: Loads order history from order.csv.
o Feature extractor: Converts dish attributes (ingredients, nutrients) into feature
vectors.
o K-means algorithm: Groups dishes into categories like “Spicy”, “Mild”,
“Healthy”.
o Cluster mapper: Associates users with preferred clusters based on order trends.
4.3 Database Design
The system uses structured datasets (in .csv format or SQL tables) to manage the following:
disease.csv: Maps diseases to essential and avoidable food items.
dish.csv: Includes dish details – dish_id, name, ingredients, nutritional_info, price,
etc.
menu.csv: Lists current available dishes.
order.csv: Logs historical customer orders for pattern analysis.
4.4 ER Diagram
The following entities and relationships define the system’s database:
Entities:
User: user_id, preferences, health_conditions
Dish: dish_id, name, ingredients, nutrition, price, origin
Order: order_id, user_id, dish_id, order_date
Menu: dish_id, availability_status
Disease: disease_name, essential_items, avoid_items
Relationships:
A User can place multiple Orders.
An Order includes one or more Dishes.
Dishes are listed in the Menu.
A Disease maps to dietary restrictions, influencing dish filtering.
4.5 Database Schema
Here's a simplified table structure:
sql
CopyEdit
CREATE TABLE Users (
user_id INT PRIMARY KEY,
preferences TEXT,
health_conditions TEXT
);
CREATE TABLE Dishes (
dish_id INT PRIMARY KEY,
name TEXT,
ingredients TEXT,
nutritional_info TEXT,
price FLOAT,
origin TEXT
);
CREATE TABLE Orders (
order_id INT PRIMARY KEY,
user_id INT,
dish_id INT,
order_date DATE,
FOREIGN KEY (user_id) REFERENCES Users(user_id),
FOREIGN KEY (dish_id) REFERENCES Dishes(dish_id)
);
CREATE TABLE Menu (
dish_id INT PRIMARY KEY,
availability_status TEXT,
FOREIGN KEY (dish_id) REFERENCES Dishes(dish_id)
);
CREATE TABLE Disease (
disease_name TEXT PRIMARY KEY,
essential_items TEXT,
avoid_items TEXT
);
4.6 User Interface Design
The system is built for ease of use with the following UI components:
Home Page: Welcomes users and prompts them to describe their food craving or
dietary needs.
Input Form: Text box for user input (e.g., "I want something spicy but healthy").
Results Page: Displays recommended dishes with names, nutritional info, and
pricing.
Admin Panel: For staff to update menu or review clustered dish data.
4.7 User Flow Diagrams
Customer Flow:
pgsql
CopyEdit
Start → Input Prompt → NLP Processing (BERT) → Filtered Results
(NLP + ML) → View Recommendations → Select Dish → End
Restaurant Staff Flow:
pgsql
CopyEdit
Login → Access Menu Panel → Add/Update Dish → View Clusters/Trends
→ Logout
Here’s a comprehensive and structured write-up for the Implementation
section of your project:
V. IMPLEMENTATION
5.1 Technology Stack
To ensure a smooth, scalable, and efficient development process, the project leverages a
modern and widely supported technology stack:
Layer Technology/Tool Purpose
Frontend HTML, CSS User interface design
Python (Flask Application logic and API
Backend
framework) handling
Hugging Face Generating real-time, context-
NLP Model
Transformers (BERT) aware recommendations
Machine
Scikit-learn Clustering analysis (K-means)
Learning
Data Handling and transforming
Pandas
Processing datasets
Managing dish, order, and user
Storage CSV files / SQLite
data
Web-based deployment for end-
Deployment Localhost/Web Server
user accessibility
5.2 Programming Languages and Tools
Python: The core programming language used for backend logic, NLP processing,
and ML implementation.
Flask: Lightweight web framework to develop RESTful APIs and handle web
requests.
Pandas: Data analysis library used to preprocess datasets like dish.csv, order.csv, etc.
Scikit-learn: Used for implementing the K-means clustering algorithm.
Hugging Face Transformers: Pre-trained BERT models used for understanding and
generating recommendations.
HTML/CSS: For designing responsive and user-friendly web interfaces.
VS Code: Main development environment.
Git/GitHub: Version control and collaboration.
5.3 Implementation of Modules
Module 1: Prompt-Based Recommendation (Generative AI)
Function: This module processes user prompts to generate personalized dish suggestions
using BERT.
Steps Involved:
1. Input Preprocessing:
o Tokenization and normalization of user prompt.
o Conversion into vector representations using BERT embeddings.
2. Contextual Understanding:
o Semantic relationships between words analyzed using the transformer model.
o Extracts mood, cravings, dietary cues from prompt (e.g., "I want something
low-carb and spicy").
3. Recommendation Engine:
o Matches contextual embeddings with dish metadata.
o Ranks and filters dishes based on relevance and availability in the menu.
4. Output Refinement:
o Ensures recommendations are accurate, concise, and personalized using
additional NLP processing.
Module 2: Clustering-Based Recommendation (K-Means)
Function: This module analyzes historical orders to identify patterns and group dishes or user
preferences.
Steps Involved:
1. Data Preprocessing:
o Load order.csv and dish.csv.
o Standardize numerical features such as protein content, spice level, calorie
count.
2. Feature Vector Creation:
o Transform each dish into a multi-dimensional vector.
3. K-Means Clustering:
o Apply the K-means algorithm to group dishes into clusters (e.g., Healthy,
Spicy, Comfort Foods).
o Assign users to clusters based on past preferences.
4. Recommendation Logic:
o When a repeat user interacts, suggest dishes from their most frequent cluster.
5.4 Integration of Modules
After each module was independently tested and verified, integration was carried out to
ensure a seamless user experience:
1. Unified Input Flow:
o The frontend captures a single user prompt and passes it to the backend.
2. Hybrid Decision Engine:
o Combines recommendations from both modules.
o Weights are assigned based on data availability (e.g., prioritize clustering for
returning users, BERT for new users).
3. Menu Matching:
o Ensures all recommendations are filtered against the current menu.csv for
availability.
4. Response Packaging:
o Final list of dishes is formatted with names, nutritional highlights, and pricing.
o Presented via the web interface in a user-friendly layout.
VI. TESTING
Thorough testing was performed to ensure the system meets all functional, non-
functional, and performance requirements. The testing phase followed a structured
methodology covering unit, integration, system, and user acceptance testing.
6.1 Testing Methodology
The testing approach was systematic and iterative. It included:
Validation against expected outputs for different input types.
Testing the interaction between various modules (NLP engine, clustering model,
frontend).
Real-world scenario simulations using synthetic datasets.
User feedback during pilot runs to evaluate usability and relevance of
recommendations.
Testing was divided into four major levels:
1. Unit Testing
2. Integration Testing
3. System Testing
4. User Acceptance Testing (UAT)
6.2 Unit Testing
Each component was tested in isolation to verify that individual functions worked as
intended.
Examples of tested units:
Component Test Description Result
BERT NLP Process user prompt and
Passed
Module return embedding vector
K-Means Group dishes into
Passed
Clustering Logic appropriate clusters
Load and validate dish.csv,
Data Loader Passed
order.csv files
Component Test Description Result
Check prompt for invalid
Input Validator Passed
characters
All core modules passed their respective unit tests.
6.3 Integration Testing
This phase ensured that different modules interact seamlessly.
BERT-based recommendations were integrated with dish data filtering.
Clustering recommendations were integrated with user history and menu validation.
Flask backend correctly routed data from the frontend to the ML logic and returned
results.
Modules Integrated Purpose Result
NLP Engine + Menu Ensure prompt-based
Passed
Filter dishes exist in menu
Clustering Engine + Map past user orders to
Passed
User History dish clusters
Ensure correct data
Flask + Frontend Passed
exchange and rendering
6.4 System Testing
This test validated the complete system end-to-end, mimicking real user behavior.
Scenarios tested:
New user enters a prompt: “I want something spicy but low-calorie.”
Returning user with diabetes preference requests recommendations.
Random invalid input (e.g., emoji or blank string).
Results:
Expected Actual
Scenario Status
Output Result
Dish
Valid prompt suggestions
Match Passed
from new user aligned with
prompt
Health-
Existing user
conscious
with dietary Match Passed
dishes with
restriction
suitable filters
User feedback Proper
Invalid/empty
and error alert Passed
prompt
message shown
6.5 User Acceptance Testing (UAT)
Pilot testing was conducted with a small group of users simulating both restaurant
staff and customers.
Key observations:
Users appreciated the relevance and diversity of recommendations.
The interface was intuitive and responsive.
Health-conscious users noted the helpfulness of the dietary filtering.
Feedback incorporated:
Added prompt suggestions (e.g., “Try typing ‘something spicy and healthy’”).
Improved clarity of recommendation output with nutrition highlights.
6.6 Test Cases and Results
Here are a few specific test cases:
Test
Expecte Actual Statu
Cas Input
d Result Result s
e ID
3+
“I want a spicy
TC- matchin
low-carb Match Pass
01 g dishes
dinner”
shown
Dishes
Select
excludin Correc
TC- “Diabetic”
g sugar- t Pass
02 filter with
rich dishes
prompt input
items
Warning
: “Please
TC- No prompt Alert
enter a Pass
03 entered shown
valid
input”
Should
Dish in be Filter
TC-
recommendatio removed applie Pass
04
n not in menu from d
results
6.7 Bug Tracking and Resolution
A simple bug tracking log was maintained during development using spreadsheets.
Bugs were logged, categorized, and resolved in an agile manner.
Bug Descriptio Severit Fix
Status
ID n y Applied
Added
BERT
prompt
model
length
BUG returning Mediu Resolve
threshol
-01 empty list m d
d+
for short
fallback
input
text
Clustered
Synced
dish IDs
BUG keys and Resolve
not High
-02 validate d
matching
d dataset
dish.csv
CSS
UI breaks adjusted
BUG Resolve
on long Low for
-03 d
dish names flexible
layout
CHAPTER VII
7.1 System Output Screenshots
Throughout the implementation and testing phases, several key screens were
generated to demonstrate the system’s functionality. These screenshots serve as visual
evidence of a working system and help highlight how user interaction flows through
the system.
Examples of system outputs include:
Homepage with input field for user prompt (e.g., “I want something spicy and light”)
Filter panel showing dietary restriction options (e.g., Diabetic, Gluten-Free)
Recommendation panel displaying top dishes, along with:
o Dish name
o Nutritional details (calories, fat, protein)
o Estimated price and preparation time
Admin dashboard (optional) for uploading/updating dish/menu data
Note: Screenshots can be inserted in the final report or presentation as visual support
under this section.
7.2 Evaluation Metrics
To assess the effectiveness of the recommendation engine, the system was evaluated using
the following metrics:
Result
Metric Description
(Approximate)
Percentage of relevant
Precision dishes among those 85–88%
recommended
Percentage of relevant
Recall dishes retrieved from the 80–84%
total available
Harmonic mean of
F1-Score ~0.86
precision and recall
AUC Area under ROC Curve
0.87
Score (clustering model)
Result
Metric Description
(Approximate)
Time to generate
Response
recommendation after <1 second
Time
prompt submission
User Average user satisfaction
4.6/5
Rating rating during UAT
These metrics suggest that the system is highly responsive and accurate in serving context-
aware, personalized recommendations.
7.3 Comparison with Existing Systems
The table below summarizes how this system improves upon traditional food
recommendation systems:
Existing
Feature Proposed System
Systems
Rule-based or BERT-based +
Personalization collaborative clustering (dual
only personalization)
Integrated (via
Dietary/Health
Limited disease.csv and
Filtering
filters)
Generated
Real-Time Delayed or
dynamically via
Recommendations static
BERT
Handled via
Cold Start
Weak prompt-based
Handling
recommendations
Integration with
Often missing Fully integrated
Menu Availability
NLP + ML hybrid
Basic filtering
Technology Stack with scalable web
engines
interface
7.4 Challenges Faced
During development, several key challenges emerged:
Prompt Interpretation: Initial prompts lacked clarity for BERT-based processing.
Cold Start Problem: New users without history received irrelevant suggestions.
Clustering Accuracy: K-means occasionally misgrouped dishes due to overlapping
nutrition vectors.
Data Alignment: CSV files occasionally had mismatched keys or inconsistent
formatting.
Frontend Display: Long dish names or incorrect data formatting broke the UI layout.
7.5 Solutions and Improvements
The team employed iterative refinements and technical solutions to overcome these
issues:
Challenge Solution
Ambiguous Added minimum prompt length +
Prompts examples to guide users
Prioritized BERT engine for first-time
Cold Start
users
Inaccurate Normalized nutritional features and tuned
Clustering K-value
CSV Data Introduced validation scripts and pre-load
Mismatches checks
Implemented responsive layout and
UI Breakpoints
truncation for long strings
7.8 Future improvements include:
Adding multilingual support for diverse user demographics.
Integrating user feedback into a retraining loop for continuous
learning.
Enhancing dish visualization with images and icons.
Migrating to a full database (e.g., PostgreSQL) for better data
scalability.
CHAPTER VIII
CONCLUSION & FUTURE SCOPE
The Personalized Dish Recommendation System effectively combines NLP and machine
learning techniques to provide tailored dish recommendations for restaurant customers. By
analyzing customer preferences, and dietary restrictions, the system ensures relevant and
accurate suggestions. The integration of analysis and clustering models enhances the accuracy
of predictions, improving customer satisfaction. Ultimately, this system can drive customer
loyalty and increase restaurant sales through personalized dining experiences
REFERENCES
[1] Md. Kishor Morol, Md. Shafaat Jamil Rokon, Ishra Binte Hasan, “Food
Recipe Recommendation Based on Ingredients Detection Using Deep
Learning” 2022 (ACM).
https://dl.acm.org/doi/abs/10.1145/3542954.3542983 muru
[2] M.K. Murugeah “Enhancing efficiency and Personalization in Food and
Beverage Service through AI” 2024 (TYPESET.IO)
https://typeset.io/papers/enhancing-efficiency-and personalization-in-food-
and-2w04wt4036
[3] Elham Asani “Restaurant recommender system based on sentiment
analysis” 2021 (ELSEVIER)
https://www.sciencedirect.com/science/article/pii/S2666827021000 578
[4] Chemlal, Maroua; Zedadra, Amina “A Multi-Criteria Food and
Restaurant Recommendation System” 2024 (PROQUEST)
https://www.proquest.com/docview/3133672914?pq
origsite=gscholar&fromopenview=true&sourcetype=Scholarly%20Jo
urnals
[5] Gehad i. Alkady “A Deep Learning-Powered Web Service for Optimal
Restaurant Recommendations Based on Customers Food Preferences”
2024 (IEEE)
https://ieeexplore.ieee.org/document/10607587/authors#authors
[6] Raciel Yera “ASystematic Review on Food Recommender Systems for
Diabetic Patients”2023(MDPI) https://www.mdpi.com/1660-4601/20/5/4248
[7] RACIEL YERA, AHMAD A. ALZAHRANI , LUIS MARTíNEZ
“Afood recommender system considering nutritional information and user
preferences” 2020(IEEE) https://ieeexplore.ieee.org/document/8765311
[8] Nattaporn Thongsri “Implementation of a personalized food
recommendation system based on collaborative filtering and knapsack
method” 2021(IJECE)
https://ijece.iaescore.com/index.php/IJECE/article/view/24787
[9] Mehrdad Rostami,Kamal Berahmand “A novel healthy food
recommendation to user groups based on a deep social community
detection approach” 2024 (ELSEVIER)
https://www.sciencedirect.com/science/article/pii/S0925231224000 973 food
[10] Jon Nicolas Bondevika, Kwabena Ebo Bennin “A systematic review on
recommender systems”2024(ELSEVIER)
https://www.sciencedirect.com/science/article/pii/S0957417423026 684
[11] Walpitage(2023)” A Food Recipe Recommendation System Based on
Nutritional Factors in the Finnish Food Community” (OULUN
YLIOPISTON). https://oulurepo.oulu.fi/handle/10024/42961
[12] Jieyu Zhang "Innovative Food Recommendation Systems: A Machine
Learning Approach" 2023 ( Brunel University London).
https://bura.brunel.ac.uk/handle/2438/26643
[13] Marieke Van Erp,Diana Maynard (2021) “Using Natural Language
Processing and Artificial Intelligence to Explore the Nutrition and
Sustainability of Recipes and Food” (Frontiers).
https://www.frontiersin.org/articles/10.3389/frai.2020.621577/full
[14] Meherdad Rostami and Mourad Oussalah(2022) “A Novel Time
Aware Food Recommender System Based on Deep Learning and Graph
Clustering”(IEEE). https://ieeexplore.ieee.org/abstract/document/9775081/
[15] Cataldo Musto,Alain D.Starke “Exploring the Effects of Natural
Language Justifications in Food Recommender Systems” 2021(ACM).
https://dl.acm.org/doi/abs/10.1145/3450613.3456827
[16] Innovative Food Recommendation Systems: a Machine Learning
Approach (Brunel)
https://bura.brunel.ac.uk/bitstream/2438/26643/1/FulltextThesis
INTERNAL QUALITY ASSURANCE CELL
PROJECT AUDIT REPORT
This is to certify that the project work entitled “TITLE OF THE PROJECT” categorized as an
internal project done by P.Nithin , M.Hari Madhav, R.Gagan Kumar ,M.Naresh
of the Department of Computer Science and Engineering, under the guidance of GUIDE
NAME during the Even semester of the academic year 2024 - 2025 are as per the quality
guidelines specified by IQAC.
Quality Grade
Deputy Dean (IQAC)
Administrative Quality Assurance Dean (IQAC)