$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
This study was conducted in accordance with the guidelines of the Research Ethics Committee of The National University of Malaysia (UKM) and approved under approval number UKM FST/2025-AI/023. Written informed consent was obtained from all participants prior to the collection of chatbot queries. All data were anonymized to ensure participant confidentiality and privacy
Study overview
The overview of the proposed intelligent catering system assisted with AI technologies is shown in Figure 1. As illustrated, the customer input is preprocessed with the NLP techniques such as word embeddings, lemmatization, and tokenization to extract the tags. Then, the ML model called LDA has been applied to modelling customer tags to provide contactless service to them. The food suggestion is carried out using a Conv-RNN model. Based on the flow sequence recorded from the previous customer's choices, the food is suggested to the customer intelligently. Finally, the customer satisfaction level is predicted by using an optimized Conv-LSTM model for further improvement in the services of the restaurant. The performance of the proposed AI models is evaluated under the various evaluation metrics.

Figure 1: Proposed system model for intelligent catering services (ICS). The architecture integrates user interaction, data preprocessing, intent detection, food recommendation, and feedback mechanisms. Please click here to view a larger version of this figure.
Dataset used
To create the intelligent catering system, we gathered 283 requests from a nearby restaurant using a chatbot. These questions, which included a broad variety of client inquiries from menu details to operating hours, were manually divided into 15 different intent groups. This guarantees thorough coverage of all possible user interactions with the system. Salutations, goodbyes, appreciation, catering, hours, setting, contact information, questions about payments, today's menu, delivery alternatives, menu questions, ordering processes, special deals, bookings, beverage options, and accessibility for outdoor sitting are just a few of the specific aspects of customer inquiries that the intent classes were made to record. Table 1 shows the frequency of questions in each of the purpose groups and the classification according to the queries' thematic substance. For example, the category Contact Information had the highest queries, suggesting that patrons are very interested in finding out how to get in touch with the eatery. On the other hand, the Seating and Beverage categories got the fewest inquiries, which may indicate that there is less consumer interest in these subjects or that there is already more clarification on them.
Contactless service using NLP with LDA
The user input that starts the framework's activity is initially preprocessed to standardize the text and eliminate noise. Tokenization, stop word elimination, and lemmatization are examples of this preparation, which gets the data ready for additional analysis. Following preliminary processing, user inquiries are converted into numerical representations. Semantic linkages and contextual relevance are among the linguistic features that are captured by these representations. Several machine learning classifiers were used to train these vector representations of user queries for the classification of 16 pre-defined classes (intents/tags). The model fetches the predetermined related response and returns it to the user after accurately predicting the user's query intents.
Preprocessing
Our analysis's dependability is greatly enhanced by the preprocessed queries, which verify that the incoming data is formatted consistently and relevant for the classification procedure that follows. The intent patterns (e.g., greetings such as hi, hello, hey) were collected and preprocessed by converting text to lowercase, removing stop words, and applying tokenization using the NLTK toolkit33. Table 2 shows the preprocessing steps followed by this study.
LDA-based tag modeling
The system classifies the tags from the user using Support Vector Regression (SVR) so that the user's greetings are recognized by the system. In order to improve the system capacity to anticipate user intent, we thoroughly examined both conventional and cutting-edge text processing methods in addition to Machine Learning (ML) and Deep Learning (DL) models. Building a highly accurate algorithm that could comprehend a broad range of user questions was our aim. This study employed the fundamental strategies of Bag of Words (BoW) and TF-IDF because of their ease of use and potency in emphasizing word frequency and the importance of words in the text. Glove and Word2Vec's capacity to produce word embeddings according to word usage together allowed them to deliver knowledge of word meanings and context22.
Once the data is prepared, the intents queries are classified using the latent Dirichlet allocation (LDA) method. The goal is to use text mining with the LDA method to analyze the connections among terms and identify patterns in their structures34,35. Unsupervised and probabilistic in nature, LDA makes the assumption that every document in a corpus is composed of a predetermined number of manually defined themes. Every document in LDA has equal weight and has a bag of words. Each document's words are presumed to be unordered. A topic is also described using a probability mass function of words. Every document uses a probability mass function to choose themes. For intent classification, Latent Dirichlet Allocation (LDA) was applied using the GensimPython library34.
In LDA, the intents are viewed as the distribution over the latent that is denoted by the LDA distribution air called
. A pattern is selected based on the intent distribution, which is denoted as θ(multinomial) which defines the given intent, I's probability belongs to the given class C. A Dirichlet distribution is related to β which encodes the pattern into a Bag of words. Given the α and β, it is defined as the multivariate distribution with N words related to M patterns with z intents. The group of N terms is denoted as W, which is given as36:
(1)
By integrating over θ, the summation is declared as Z, and the product is taken of the probabilities of the marginal of the individual intents, and the entire intent probability is computed as,
(2)
The patterns, including the intent variations for greetings, are hi, hello, Hey, Good morning/noon/eve, and hola. While receiving these patterns, the system finds the user intent as greetings and responds to them consequently with the defined phrase, such as What can I help you? or How can I help you? If the query is not recognized by the system with the predefined 15 classes, then the system provides restaurant information and suggests that the user communicate with customer service. The outcome of the LDA-based tag modeling of user queries related to greetings is shown in Figure 2. Similarly, the responses are carried out for all 15 classes related to the user intents (Queries). The model LDA has the following parameters. Number of topics (k) is declared as 40, Alpha is fixed as 0.05, Beta value is 0.04, and the number of iterations is declared as 100.
Food suggestion using Bi-NN for ICS
In the Intelligent Catering System (ICS), food items are systematically categorized to support accurate recommendations. Each menu entry may represent either a single item (e.g., burger, snack, drink) or a combination of items such as a meal set (e.g., fried chicken with a cold drink). These items are grouped into six main categories: chicken, burger, snack, drink, suit, and tiffin. For clarity, suit refers to packaged meal sets, while tiffin represents traditional multi-item meals. Each food item is defined by three key features: its price, its category, and a content vector describing its composition. This structured categorization enables the recommendation model to analyze customer purchase histories at both the item and category levels, improving the system's ability to suggest relevant meals and combos that align with user preferences. All the foods in the ICS are a set denoted as,
where N denotes the total number of food items in the ICS. For every food product
in F,
consists of details of the features of food, and it is denoted as,
(3)
where,
denotes the prices of food,
denotes the category of the food items where
, C denotes the categories.
denotes the number of menus where
where M denotes the menus
denotes the content vector of food, where
where
is the element of the content vector and represents chicken, burger, snack, drink, suit, and Tiffin, respectively.
The user data consists of details about the user to denote the user's features that can be obtained from the app or the usage flow. For every user
, the features are denoted as,
(4)
where
, denotes the details about the user, such as age and gender.
denotes the click event of the user, which is a variable-length vector where
and t declares the time of the recent click event,
is the positive number and
denotes the entire flow sequence that denotes the entire purchase carried out by the user.
Denotes the list of food purchased by the customer, where
, k denotes the total amount of purchased food items by the user.
With the use of F and U, which denote food items and user data, respectively, the recommendation system is framed in ICS. The objective of this system is to improve the accuracy to enhance the user purchase intention. The problem of ICS is formulated as,
(5)
Equation (5) denotes the objective of the problem to find improved accuracy results on ICS problem by reducing the loss function which is denoted in Equation (6).
(6)
where,
is the predicted results and
is the actual result. The model performs better when the loss function's value is smaller. The loss function is employed to determine the discrepancy between the model's predicted value and the true value Y. In this,
(7)
where,
(8)
(9)
In this, r denotes the training data in X, and s is the purchased food item number of one training data. The developed ICS employed cross-entropy as a loss function, which is described in the following section.
Conv-RNN-based food recommendation
By analyzing the product's attributes, user ratings, and user profiles, a Conv-RNN-based recommendation system provides users with recommendations based on their interests. Figure 3 shows the proposed CRNN design. The Conv-RNN models frequently consider or automatically add specific information about the user's temporal context while making suggestions. However, how well a recommender system comprehends and utilizes the context provided by the suggestion requests often determines how effective it is. Conv-RNN calculates prediction ratings based on the dynamic features and attributes of the item and the user's current time context to provide suitable recommendations for a specific user. It is inevitable that people who are going through similar things at the same time will have similar preferences. The effectiveness of a CNN-based time-aware system for recommendations depends on its capacity to find users who are most comparable to the intended receiver and share the same temporal context. Thus, CNN records the temporal context, which is the time-sensitive information about the user's activity. The CNN's input layer was then fed the user attributes, item characteristics, and time information to rebuild the original matrix. A method for calculating the final output is given once the convolution layer has been used to extract features from the matrix.
From the convolution layers, the food click events are extracted using Eqn (10)
(10)
where O is the output size, X is the input data size, F is the convolutional kernel size, a is to fill the input data, and S is more than 1 and S is the kernel stride. The neural network can model more complex models than it could if it were restricted to simulating computations between neighboring layers of the network, which it does by using uniformity but only linear operation, because the activation function within the stimulation layer is used to perform nonlinear operations. In a neural network, layer-to-layer communication is strictly sequential. In Conv-RNN, activation functions were the most prevalent. The conventional Tanh, sigmoid, and other types of activation functions lack a gradient and have small, practical interval ranges. When a resource-efficient nonlinear operation is also used, the rectified linear unit (ReLU) functions become the primary instrument for overcoming these two issues.
For computational efficiency, the pooling layer down-samples and sparsely processes feature data. The maximum and average pooling methods are two well-known examples of pooling algorithms; MaxPooling provides better feature selection results. MaxPooling selected the following features:
(11)
The Conv-RNN then employs the fully connected layer using two dense approaches for retraining the Conv-RNN tail with less feature information loss. Recurrent layers are commonly used in neural networks for the analysis of sequential data. Because of connections that allow them to maintain an internal memory of previous inputs, recurrent layers handle each input separately, unlike traditional feedforward layers. This makes recurrent layers particularly well-suited for tasks involving sequences, time-series data, or any kind of information where the order of inputs matters. The fundamental unit of a recurrent layer is the recurrent neuron, often known as an RNN cell. As RNN cells handle inputs one at a time, they maintain an internal state that contains data from previous inputs. Its internal condition is altered at each time step, which influences the processing of subsequent inputs. The output layer shows the user the results after using the SoftMax classifier. Before using the fields, whose characteristics are categorized as the index of the embedded matrix, they must first be converted to integers.
The categorical cross-entropy loss function, which quantifies the difference between the true class labels y and the projected probability distribution y', was used to train the Conv-RNN recommendation model. Stochastic gradient descent (SGD) with adaptive moment estimation (Adam) was used to improve the model parameters θ (weights and biases). The parameters were modified as follows at each training iteration t:
(12)
where, η is the learning rate,
is the gradient of the loss function with respect to θ.
The following tactics were used to avoid overfitting. During training, dropout regularization (ρ=0.3) is used on fully linked layers to randomly deactivate neurons. When no improvement was seen for 15 consecutive epochs, training was stopped early based on validation loss.
Five-fold split cross-validation to confirm generalization performance
Using a grid search on the validation set, hyperparameter tuning was carried out. Included in the search space were the Number of filters for the convolution layer, 64, the kernel size, 3 x 3, the Number of Recurrent layers as 100, the Batch size, dropout rate 0.2, and learning rate 0.002. The used optimizer is ADAM. Finally, the output layer returns the results of recommended foods as a one-hot encoding vector, where suggested foods are denoted by one, and other outputs will be denoted as 0.
Customer satisfaction prediction using Conv-LSTM
This study utilized the Convolution Long Short-Term Memory (Conv-LSTM) to forecast customer satisfaction once they have finished their catering. The structure of Conv-LSTM is shown in Figure 4. CNN's architecture includes input neurons, a series of convolutional layers, pooling, completely connected layers, and normalization layers37. The convolution layer's nerve cells are connected to the layer above it through a narrow region, while the activation neurons of the fully linked layers are fully related to the layers below them. Conv-LSTM inputs explicitly define the tensor shapes and temporal granularity. Each input sequence is structured per customer order session (time step = per order), where the purchase list is encoded as a multi-hot vector and the associated satisfaction level is represented as a numerical score. The resulting tensor has the shape (batch size × sequence length × feature dimension).
The forward and backward reverse transmission of a function in CNN generally separates factors into different groups based on their input. Numerous CNN designs have emerged as a result of recent research advancements. As shown in Equation (15), three weights, iw, rw, and b, denote input weight, recurrent weight, and bias, respectively, that have been employed in each LSTM block.
(13)
The following is a declaration of the cell state at time step t:
(14)
where the Hadamard product is denoted by . The code for the hidden state Ht of t is,
(15)
The hyperparameters and their values of Conv-LSTM are declared as follows: The number of filters for the convolution layer is 64, the kernel size is 3 x 3, the LSTM units are 100 with a dropout rate of 0.2, the batch size is 64, the learning rate is 0.002, and the number of time steps is 50 with the Adam optimizer.
UML diagram and Pseudo Code for Customer Interaction
The dynamic flow of interactions in the suggested system is depicted in the UML sequence diagram (Figure 5). The NLP–LDA module processes the user's request (such as a meal order or query) for topic modeling and intent extraction. Following processing, the recommendation engine (Conv-RNN) receives the request and produces a customized recommendation. Lastly, the user receives a real-time response from the system. This sequence guarantees transparency in the conversion of user input into intelligent service outputs and emphasizes the modular interplay of components.
The Conv-RNN recommendation algorithm has been given pseudocode to improve reproducibility. It provides an overview of the sequential computational logic, which includes preprocessing the user request, using convolutional and recurrent layers for sequence modeling and feature extraction, regularization, and a softmax output layer to generate a suggestion. This pseudocode offers a clear implementation-level view of the model workflow, which enhances mathematical formulations.
Pseudo Code: Conv-RNN Recommendation Algorithm
Input: User request U, historical interaction sequence H
Output: Recommended food item R
- Preprocess U → tokenize, embed with Word2Vec
- Construct input sequence S = [H, U]
- Apply Convolutional Layer:
S_conv = Conv1D(S, filters, kernel_size)
- Pass through Recurrent Layer (RNN/GRU):
S_RNN = RNN(S_conv, hidden_units)
- Apply Dropout for regularization
- Dense layer with Softmax activation:
P = Softmax(W xS_rnn + b)
- Select recommendation:
R = argmax(P)
- Return R to the user