<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>mender from Recipes to Shopping Carts - Optimizing Ingredients, Kitchen Gadgets and their Quantities</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Joey Jonghoon Ahnn</string-name>
          <email>joey.ahnn@target.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Chahak Sethi</string-name>
          <email>csethi2@usfca.edu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Melvin Vellera</string-name>
          <email>mvellera@usfca.edu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Diane Myung-kyung Woodbridge</string-name>
          <email>dwoodbridge@usfca.edu</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Target</institution>
          ,
          <addr-line>Sunnyvale, California</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>University of San Francisco</institution>
          ,
          <addr-line>San Francisco, California</addr-line>
          ,
          <country country="US">USA</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <abstract>
        <p>In this paper, we introduce a recommender system where it automatically captures the context of what users or guests look for and recommends a bundle of products to be added to their shopping cart. The recommendation system takes selected recipes from a user as input and recommends a shopping cart with ingredients in optimized quantities as well as any kitchen gadgets that might be necessary to eficiently prepare the recipes using neural networks. We propose a system architecture, dive deep into the individual components, and evaluate the performance of information retrieval, semantic search, and quantity optimization algorithms. Using an ensemble methodology, we attained a mean average precision of over 0.9 for ingredient and quantity recommendations. The recipe-based bundle recommender system may be used not only to improve the user's shopping experiences but also to enable and encourage them to have healthier eating habits, aiming at providing personalized product recommendations.</p>
      </abstract>
      <kwd-group>
        <kwd>or TV shows</kwd>
        <kwd>including genre</kwd>
        <kwd>language</kwd>
        <kwd>cast</kwd>
        <kwd>director</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>Recommendation systems provide personalized
recommendations for the customers using various data from
customers and products to enhance customer experience
and maximize the conversion rate, significantly
contributing to revenue growth in the retail industry. In 2020,
the recommendation system market was valued at 1.77
billion US dollars globally with a projected compound
annual growth rate of 33.0% by 2028 [9].</p>
      <p>Recommendation systems generally utilize two
categories of algorithms, including Collaborative
filteringmendation [16] algorithms. Collaborative filtering (CF)
relies on the user’s history data and matches a user A with
a similar user B and recommends A what B liked. Today,
most big e-commerce giants with a massive amount of
data, use collaborative filtering to recommend products
to their customers [4]. Content-based recommendations
create a profile to characterize each item. Some of the
industry applications of content-based recommendation
systems include a name that suggests jobs to the users by
matching their interests and skills with the features of job
postings [2]. IMDb uses the information of the movies
present in this field in Section 2. Next, we provide the
overview of the developed system, including mapping
kitchen gadgets and ingredients in the recipes to relevant
products from the product catalog database, optimizing
the quantities to be recommended, and providing
multiple candidates and their corresponding ranking to the
user in Section 3. We have employed a few techniques
to measure the performance of the system which will
be discussed in Section 4. We summarize our work with
some future works section 5. The authors make the codes
used for the research available to the public [24].
customers can purchase individually or as a bundle, a 2. Related Work
group of complementary items that can be purchased
together [13] [29]. In late 2015, an American company that operates a
gro</p>
      <p>Our research ofers the convenience of personally cu- cery delivery and pick-up service in the United States
rated shopping experiences to users by reducing their and Canada, integrated with AllRecipes, a top recipe site,
shopping eforts to find out right products as a bundle. to allow users to select a recipe and fill their cart with all
The system helps users without any prior experience the necessary ingredients [22]. Although the ingredient
in cooking easily purchase the required ingredients and recommendations provided by a e-commerce company
kitchen gadgets. An automatic quantity optimization are accurate for a good number of recipes, we observed
will reduce wastage of resources and optimize costs for that the recommended quantities were not ideal for
certhe users by suggesting the correct quantity of the prod- tain recipes. There were also cases where no matching
uct. We believe that this approach leads to increased product was found for a recipe ingredient, such as
veguser basket sizes, eventually raising the business revenue. etable oil, even though there are other closely related
Furthermore, it can also aid in automated promotional products, including olive oil and canola oil. In addition
emails to the consumers with all the ingredients and gad- to these limitations, we also identified an opportunity for
gets in a recipe rather than the hand-curated contents augmenting ingredient recommendations with kitchen
which we find time-consuming. gadget recommendations that could help improve a user’s</p>
      <p>In this paper we discuss the related work already cooking experience, especially those new to cooking. Our
work has been primarily motivated by these use cases, corpus (millions) while still being certain that
recommenand in this paper, we propose a methodology that gen- dations are personalized and engaging for the user. Our
erates accurate ingredient recommendations as well as research employed a two-stage approach for candidate
kitchen gadget recommendations. generation (retriever stage) and ranking (re-ranker stage)</p>
      <p>To our knowledge, there has not been any notable re- [7].
search regarding the recommendations of an optimized
shopping cart of ingredients and kitchen gadgets based
on recipes. We find that most of the existing literature in 3. System Overview
the food domain is related to recommending recipes or
ingredient substitutes. [25, 26, 11, 17]. Anirudh Jagithyala The proposed system first takes a recipe as input from
[11] developed a recommendation system that recom- a guest shopping on an e-commerce company’s website.
mends recipes based on recipe ratings, ingredients, and The recipe then gets split into two sections: 1) cooking
review text. A number of approaches including memory- instructions and 2) ingredients. The cooking instructions
based collaborative filtering and TF-IDF were tried along are parsed in order to detect and extract any kitchen
with similarity measures such as cosine and Pearson cor- gadgets that might be required for the recipe, while the
relation. The research evaluated multiple approaches us- required ingredients and quantities are extracted from
ing the mean average precision (mAP) and showed that the recipe’s ingredients section. The quantities and units
collaborative filtering on recipe ratings performed better. of ingredients in the recipe text and the product catalog
Chantal Pellegrini et al. [17] explored the use of text and database are standardized for accurately matching
varyimage embeddings for identifying ingredient substitutes. ing units from recipes and products. The ingredients and
They generated context-free embeddings using word2vec kitchen gadgets required by the recipe are then fed into
as well as context-based embeddings using transformer- the recommender system to search for the best
matchbased models. In the end, the research showed that the ing products from the product catalog database based
transformer-based multi-modal approach using text and on textual and quantity information. The system then
image embeddings together gave the best results with a adds these products to the shopping cart of the guest
precision of 0.84 for the top 1000 most common ingre- (Figure 2).
dients. Chun-Yuen Teng et al. [25] explored the recom- For advanced natural language processing (NLP), we
mendation of recipes and ingredient substitutes using utilized Open-source software libraries, including Spacy
network structures. The system identifies ingredient sub- [10] and NLTK [3] for extracting recipe ingredients and
stitutes using a graph structure where nodes represent in- kitchen gadgets from the recipe text. The ingredients,
gredients and edges represent the degree of substitutabil- along with the required quantities, were parsed from the
ity. To derive pairs of related recipes, they computed the ingredient section of the recipe (Figure 1) using regular
cosine similarity between the ingredient lists for the two expressions, after which these ingredients were then
prerecipes, weighted by the inverse document frequency. processed using the NLTK library for stop words removal,
Mayumi Ueda et al. [26] applied user preferences and stemming, and  -gram expansion. The Spacy library was
ingredient quantity for recommending recipes. Their used for extracting kitchen gadgets from the recipe
inmethod breaks recipes down into their ingredients and structions using named entity recognition (NER). Once
scores them based on the ingredients’ frequency of use the ingredients and kitchen gadgets of the recipe are
and specificity. identified, they are compared against the products in the</p>
      <p>Some of the existing algorithms for searching and rank- product catalog database to get the most relevant
proding relevant items use classical information retrieval al- uct in stock for each ingredient and user. This process
gorithms such as TF-IDF [19], BM-25 [21], or Glove [18], also involved the novel usage of a language
representawhile others make use of deep learning models such as tion model, Bidirectional Encoder Representations from
BERT [8]. BERT [8] is a language representation model Transformers (BERT) [8], which is designed to pre-train
that can give accurate contextual embeddings for words deep bidirectional representations from an unlabeled text
in most cases. Unfortunately, the BERT does not gener- by jointly conditioning on both left and right contexts in
ally give accurate representations for sentences, and the all layers. The advantage of using a pre-trained
architecconstruction of BERT makes it unsuitable for semantic ture is that we can use transfer learning to transfer the
similarity search. To overcome these issues, we applied already trained features to the current data without the
the Sentence-BERT, [20] model, which was trained using complexity of training heavy machine learning models
Siamese BERT-Networks. [15].</p>
      <p>The preferred recommendation system architecture We also developed an algorithm to recommend the
was one based a two-stage approach consisting of can- optimal number of products in case a guest chooses more
didate generation and ranking stages. This two-stage than one recipe using the same products. The quantity
approach allows for recommendations from a very large or weight of the common ingredients is recommended</p>
      <sec id="sec-1-1">
        <title>3.1. Ingredient Recommendation</title>
        <p>The developed system utilizes a combination of semantic
search and information retrieval algorithms to
recommend the most relevant products for the ingredients in
a recipe. Semantic search can improve search accuracy
by understanding the context and content of the search
which only find documents based on lexical matches,
semantic search can also find synonyms. Semantic search
aims to embed all entries in the corpus into vector space,
where the query is embedded into the same vector space,
to find the closest embeddings from the corpus. In our
case, a recipe ingredient is a query, and the products are
all the entries in the corpus, where the products are
embedded into vector space and stored separately. During
based on the sum of the required amount, which helps
search time, the algorithm embeds a recipe ingredient
create the optimal baskets for the guests and leads to less
into the same vector space and calculates the similarity
wastage of resources.
query. In contrast to conventional search algorithms, , where  is the embedding dimension of the ingredient
between an ingredient ( ) and product ( ) to find the most
relevant products. These products would have a high
semantic overlap with the ingredient. We used cosine
similarity in Equation 1 to find the closest embeddings
from the corpus.</p>
        <p>( ,  ) =
 ⋅ 
‖ ‖‖ ‖
=</p>
        <p>∑</p>
        <p>=1   ⋅</p>
        <p>√∑=1   2√∑=1   2</p>
        <p>(1)
and product vectors.</p>
        <sec id="sec-1-1-1">
          <title>After computing the cosine similarity between the</title>
          <p>embedding of an ingredient and the embeddings of the
products, the top  products are retrieved.</p>
          <p>For complex search tasks, the search can be
significantly improved by using a retrieve and re-rank
framework, where the top  products are retrieved eficiently,
followed by a re-ranker that ranks these  products and
 1, … ,   , the BM25 score for a product text  is in Equa- levels: class, subclass, and item-type. These models were
(2) function (Equation 5).
, where  (  ) is the number of product texts in the
database that contain the term   of the ingredient query. 3.1.2. Re-ranker
(4)
(5)
recommends  products.
3.1.1. Retriever
Given an ingredient, we first use a retrieval system that
quickly retrieves  products that are potentially relevant
for the given ingredient. Then the  products are
reranked, and the top</p>
          <p>matches are sent through to the
quantity recommendation module. For our retrieval
system, we make use of the BM25 algorithm for
lexical search [21]. For an ingredient query ( ) with terms
tion 2.</p>
          <p>25( ,  ) =

∑   (
=1
 )</p>
          <p>(  ,  ) ⋅ ( + 1)
 (  ) +  ⋅ (1 −  +  ⋅
 
|| )
 .  
, where  (  ,  ) is the number of times term   of the
ingredient text occurs in  . || is the number of words in</p>
          <p>is the average number of words for product text.
 and  are saturation parameters for document length
and term frequency respectively. In general, values such
as 0.5 &lt;  &lt; 0.8 and 1.2 &lt;  &lt; 2 are reasonably good in
many circumstances [21].</p>
          <p>Equation 3 describes inverse document frequency
(  (
 )) for a corpus with  products with term   .</p>
          <p>(
 ) = 
 −  (</p>
          <p>) + 0.5
 (  ) + 0.5</p>
        </sec>
        <sec id="sec-1-1-2">
          <title>For improving the accuracy of the retrieval stage, we</title>
          <p>combined the BM25 algorithm with a bi-encoder sentence
transformer model that was fine-tuned using Microsoft’s</p>
        </sec>
        <sec id="sec-1-1-3">
          <title>MiniLM model [27]. The MiniLM model is a compressed</title>
        </sec>
        <sec id="sec-1-1-4">
          <title>Transformer model that uses an approach termed as deep</title>
          <p>self-attention distillation to reduce the number of
parameters required by a transformer model. It is twice as fast as
BERT while retaining more than 99% accuracy on SQuAD
2.0 and several GLUE benchmark tasks using only 50%
of BERT’s model parameters. The bi-encoder sentence
transformer model [20] that uses the MiniLM model was
trained using a dataset of 1 billion sentence pairs and a
self-supervised contrastive learning objective: given a
sentence from a sentence pair, the model should predict
which out of a set of randomly sampled other sentences
was actually paired with one in the dataset. A bi-encoder
model performs two independent self-attentions for the
query and the document, and the document is mapped
to a fixed BERT representation regardless of the choice
of a query. This makes it possible for bi-encoder models
to pre-compute document representations ofline,
significantly reducing the computational load per query at the
time of inference [6]. A bi-encoder model can encode
an input text, such as a recipe ingredient or a product,
and output a vector (embedding) that captures
semantic information. If a recipe ingredient embedding and a
product embedding are similar, then the cosine similarity
(Equation 1) between these two embeddings will be high.</p>
        </sec>
        <sec id="sec-1-1-5">
          <title>Hence, by comparing an ingredient embedding with all</title>
          <p>the product embeddings using cosine similarity, we can
identify the most similar products for an ingredient.</p>
          <p>In order to reduce the search space eficiently,
hierarchical classification models were created for the following
trained using the preprocessed text of the products as
feature vectors and the respective hierarchical level
values as the target labels. A softmax activation function
(Equation 4) was used in the final layer of the multi-class
classification models, along with the cross-entropy loss
Softmax (  ) =
exp(  )

∑=1 exp(  )
, where  is the number of output classes,   is an element
of a vector  of size  corresponding to a particular class.</p>
          <p>Cross Entropy Loss = −</p>
          <p>(∑   ⋅ ( ̂  ))

1

=1
(3) , where  is the number of observations,   is the true
label vector and  ̂ is the predicted label probability vector.
After retrieving the top  products, the re-ranker stage
ranks the products more accurately using a cross-encoder
sentence transformer model that was fine tuned using
the Microsoft’s MS Marco dataset [ 1], which is a large
scale information retrieval corpus that was created based
on real user search queries using Bing search engine. In
contrast to a bi-encoder model that performs two
independent self-attentions for the query and the document,
a cross-encoder model performs full self-attention across
the entire query-document pair. As a result, the
crossencoder can model the interaction between a query and
a document, and the resulting representations contain
contextualized embeddings [6]. In our use case, an
ingredient and a product are passed simultaneously to the
cross-encoder, which then outputs a score indicating how
relevant the product is for the given ingredient. As the
cross-encoder models the interaction between an
ingredient and a product during inference time, it is slower
than the bi-encoder, and hence, it can only be used for
a small subset of products. However, we can achieve
a higher accuracy as they perform attention across the
query and the document. After the re-ranker stage, the</p>
        </sec>
      </sec>
      <sec id="sec-1-2">
        <title>3.2. Unit Normalization and Optimization</title>
        <p>of 1 lb rather than two packs of 0.5 lb flour if 1 lb-pack is</p>
        <p>If a user selects multiple recipes, the quantity is
optimized such that minimum units of the common products
are recommended. For example, for two recipes using
one tablespoon and two tablespoons of salt each, the
recommended unit of salt can/bottle will be optimized to
one to reduce waste and cost.</p>
      </sec>
      <sec id="sec-1-3">
        <title>3.3. Kitchen Gadget Recommendation</title>
        <sec id="sec-1-3-1">
          <title>The recommendations for kitchen gadgets follow a simi</title>
          <p>lar approach to ingredient recommendations using a
combination of semantic search and information retrieval
algorithms. The required kitchen gadget is implicitly
menOnce the algorithm selects the top  matched ingredients, tioned in unstructured recipe instruction text, whereas
the next important step is to recommend the optimal
ingredients are explicitly listed in the ingredient
secquantity of the product needed in the recipe (Figure 4). tion. To identify the kitchen tools and methods post</p>
        </sec>
        <sec id="sec-1-3-2">
          <title>For this, we start with retrieving the ingredient quantity</title>
          <p>specified in the recipe and normalize the units required to
the pre-processing of the recipe instructions, a custom</p>
        </sec>
        <sec id="sec-1-3-3">
          <title>NER model from Spacy [10] was trained on these entities.</title>
          <p>a standard SI units (Table 2), including tablespoon (tbsp), The NER model identifies the kitchen gadgets (nouns)
teaspoon (tsp), milliliter (ml), cup, count, pound (lb), and
ounce (oz). These standard quantities are either weight
or in volumes handled diferently from each other.</p>
          <p>As product descriptions generally utilize weight as a
measure while most recipes use volumes, we converted
the volume with the standardized unit to weight using
density ( ). For instance, the weight ( ) for  cups of a
grocery product in the recipe, where 1 cup is 225 ml, can
be calculated as the following.</p>
          <p>=  ∗ 225 ∗</p>
          <p>Once the required weight is calculated, the system
compares it against the weight of the recommended products
in product catalog’s database. The recommended
number of units is then calculated for each matched product
using Equation 7, where  is the recommended quantity,
 is the ounces required in the recipe, and  is the ounces
sold or packaged.</p>
          <p>= ⌈</p>
          <p>⌉</p>
        </sec>
        <sec id="sec-1-3-4">
          <title>For fresh produce items that use a count as a unit in</title>
          <p>a recipe, like two onions or three potatoes, the average
weight of the given fruits and vegetables is used to
convert it to weight [14]. The reverse conversion is also
applied if the unit for a product at e-commerce
companies uses count and the recipe specifies weight instead.</p>
          <p>Once the recommended quantity is known for 
matched ingredients, we sort  ingredients by the
quantity recommended and the price in ascending order. In
addition, the system recommends lower-priced items if
multiple packaging options are available for the same
products. For instance, the system recommends one pack
(6)
(7)
used in the recipe and the methods (verbs) that can
identify a kitchen gadget. For example, for ”Chop the garlic
and add to the pan”, a pan will be identified as a gadget,
whereas chop will be identified as a method associated
with the gadgets including a knife and chopping board.</p>
          <p>Similar to ingredient recommendations, products are
embedded into vector space and stored separately.
During search time, a gadget from the recipe instruction is
also embedded into the same vector space, and the system
searches for the most relevant products. These products
would have a high semantic overlap with kitchen
gadgets. After computing the cosine similarity between the
embedding of the kitchen gadget and the embeddings
of all products, the top  products with the maximum
similarity are retrieved. For these search tasks, we used
embeddings from the RoBERTa [12], an improved and
robustly trained version of BERT with further tuned
hyperparameters. RoBERTa has achieved state-of-the-art
results on GLUE, RACE, and SQuAD.</p>
          <p>For complex search tasks, the search is significantly
improved by using a retrieve (Section 3.1.1 ) and re-rank
(Section 3.1.1) framework, just like for the ingredients
(Figure 5). For quantity optimization, if the user selects
multiple recipes, the common kitchen gadgets are only
recommended once, along with all the other gadgets used
in each recipe.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>4. Result</title>
      <sec id="sec-2-1">
        <title>For assessing the performance of diferent algorithms, we identified the relevant products for the top 100 most common ingredients and kitchen gadgets (queries) and</title>
        <sec id="sec-2-1-1">
          <title>4.1. Ingredient Search</title>
          <p>For ingredient search, diferent algorithms, as well as an
ensemble of these algorithms, were evaluated using the</p>
          <p>metric. The BM25 algorithm was considered
as the baseline model against more complex models. An
(9)
algorithm gives a very good performance for  =1 since
lexical search algorithms generally have high precision
due to exact keyword matching. However, for higher
values of  , the drop in mean average precision is quite high.</p>
        </sec>
      </sec>
      <sec id="sec-2-2">
        <title>The experiment results showed that transformer models</title>
        <p>such as MiniLM and MS Marco are more general with
consistently high precision values across diferent 
values. Using BM25 along with the MS Marco transformer
model gave the best performance for all  values.</p>
      </sec>
      <sec id="sec-2-3">
        <title>Once the best performing model was identified, we further evaluated the final model with 100 recipes from the Recipe1M+ corpus, which is a large-scale, structured</title>
        <p>, where  is the number of queries,  is the number of interesting thing to note from Figure 6. is that the BM25
at  .</p>
        <p>is the average precision

∑

=1</p>
        <p>() =</p>
        <p>∑
=1  ()</p>
        <p>( , )</p>
        <p>1</p>
        <p>∑  () ⋅  ()
, where  is the number of relevant products,  is the
number of retrieved products,  ()
says whether that  ℎ item was relevant ( ()
( ()
=0), and  () is the precision at  .</p>
        <p>is an indicator that</p>
        <p>=1) or not</p>
        <sec id="sec-2-3-1">
          <title>4.3. Kitchen Gadget</title>
        </sec>
      </sec>
      <sec id="sec-2-4">
        <title>The NER model to identify kitchen gadgets was trained</title>
        <p>on 500 recipes and tested on 100 recipes. The custom
entities’ kitchen gadgets and methods were marked with
their position in the text using regex for these 600 recipes.</p>
        <p>A manual review of the annotations was performed to
update any incorrect or missed annotations, and we
achieved a test F1 score of 99.627% (Equation 11).
corpus of over one million cooking recipes and 13 million
food images. The  @1 value for all the ingredients
from these 100 recipes was 0.949, which is similar to
the  @ values we see in Figure 6 for the top 100
ingredients.</p>
        <p>2 ⋅   ⋅  
 1 = (11)</p>
        <p>+  
, where precision is out of the total documents retrieved,
how many are relevant and recall is out of the total
rele4.2. Quantity Normalization and vant documents how many relevant documents are
re</p>
        <sec id="sec-2-4-1">
          <title>Optimization trieved.</title>
          <p>A custom mapping is used to convert cooking methods
For evaluating quantity normalization, we measured the to kitchen gadgets which along with other identified
gadaccuracy of quantity normalization, using the most com- gets form search queries for the recipe. For evaluation,
monly used ingredients in the randomly chosen 100,000 diferent algorithms were evaluated at mAP@K, similar
recipes. The three most commonly used ingredients, salt, to ingredient search. We developed transformer models
sugar, and butter, are tracked to measure if the recom- including MiniLM, MS Marco, and Roberta for the
semended quantity after unit normalization is accurate or mantic search tasks. The experiment results show that
not. MS Marco, a combination of retriever and a re-ranker,</p>
          <p>We found that salt is used in 32,506 out of the chosen performs consistently better than MiniLM and Roberta
100,000 recipes ( Table 3). Out of the total 32,506 recipes, across all  (Figure 7).
the quantity of salt is correctly recommended in 32,443 As an example, we present a recipe in Figure 8 that
recipes which is 99.806% of the total. Similarly, the accu- consists of two sections: ingredients and directions. The
racies of the recommended quantity were 82.435% and ingredients section is used for ingredient and quantity
78.463% for sugar and butter respectively. However, the recommendations, whereas the directions section is used
relatively low accuracy in quantity recommendations for for kitchen gadget recommendations. The keywords used
sugar and butter is due to the incorrect recipe text. For for kitchen gadget recommendations are highlighted in
example, certain recipes say 34 cups of butter instead of red.
3/4 cups of butter. This has been further discussed in The product recommendations based on the recipe
Section 5. (Figure 8) is given below in Table 4.</p>
          <p>Further, the quantity optimization process was also
evaluated with randomly chosen 100 recipes from the
Recipe1M+ corpus. The mAP@1 value for all the ingredi- 5. Conclusion
ents from these 100 recipes was 0.914. For a combination
of recipes, the result has been manually verified for 5
random sets of any two recipes.</p>
        </sec>
      </sec>
      <sec id="sec-2-5">
        <title>We presented a content-based recommendation system to recommend relevant retail products to a user or guest based on selected recipe contents. The recommended products are primarily based on the ingredients required</title>
        <p>Table 4 assessing the top product recommendations for the 100
Shopping Cart Recommendation most frequently occurring ingredients in the 1M+ recipe
Product Qty Price ($) corpus. For ingredient search, the ensemble approach of
Red Delicious Apple 1 0.99 BM25 and MS Marco gave the best performance, while
GMocoCdor&amp;mGicakthGerroOunrgdaCniincnOaamtson-1-82o.3z7oz 11 21..3999 for kitchen gadget search, the MiniLM model proved to
Buttermilk Pancake Mix - 32oz 1 2.19 be more accurate. The accuracy of quantity
recommendaImperial Granulated Pure Sugar - 4lb 1 2.19 tions was measured by evaluating certain high-frequency
SGqouoidsh&amp;1G.5qatthMerixAinlkgaBlinoewWl-aGterree-n1L 11 08..9999 ingredients such as salt, sugar, and butter across more
Anchor 8oz Glass Measuring Cup 1 3.49 than 50,000 recipes from the 1 million+ (1M+) recipe
Nylon Ladle with Soft Grip - Made By Design 1 3.00 corpus.</p>
        <p>FLaaukxesGidrean1i0t”e Nfinonisshtick Aluminum Skillet with 1 16.47 There were a few challenges that we faced while
implementing the system that we hope to address in the
near future. Firstly, the recipe text used in the 1M+ recipe
by the recipe, which are extracted from the recipe text corpus has some inconsistencies where the quantity
realong with associated quantities. More significantly, the quired is not accurately defined. For example, a lot of
system is also capable of recommending the relevant recipes say 34 cups of an ingredient instead of 3/4 cups. In
kitchen gadgets that might be required for making the future work, we can work on parsing the text with more
recipe based on the instructions provided in the recipe. scrutiny and rules to avoid such cases. Alternatively,
When a user selects multiple recipes, the recommender we could also build an entirely new recipe scraping
alsystem optimizes quantities for each product, where the gorithm to handle such cases. Secondly, the quantity
quantities are adjusted according to the amounts of the optimization for multiple recipes is in place, but there is
common ingredients and kitchen gadgets present in the no formal way to measure how well is the performance
recipes. of the process. As a part of future work, we would devise</p>
        <p>We conducted experiments for evaluating the efec- a way to quantify the performance of this process.
tiveness of various algorithms for the recommendation We also identified extra features for the current
syssystem, such as BM25, MiniLM, MS Marco, and RoBERTa. tem. First, the dietary restrictions of a user can be
acIn our experiments, we compared these algorithms by counted for by considering the ingredients, nutritional
information, and key allergens that might be present in [5] Lin Chen, Rui Li, Yige Liu, Ruixuan Zhang, and
the product using natural language processing. Second, Diane Myung-kyung Woodbridge. 2017.
Mathere could be preference filters provided to users before chine learning-based product recommendation
usthey add a recipe to the shopping cart that could consider ing Apache Spark. In 2017 IEEE SmartWorld,
Ubiqtheir dietary preferences such as whether they prefer uitous Intelligence Computing, Advanced Trusted
non-GMO or organic products only. Third, instead of Computed, Scalable Computing Communications,
asking for preferences explicitly, the preferences of the Cloud Big Data Computing, Internet of People
users could be determined automatically by analyzing and Smart City Innovation
(SmartWorld/SCALtheir past shopping behaviors such as clicks, views, or COM/UIC/ATC/CBDCom/IOP/SCI). 1–6. ht tps :
product purchases. Based on this implicit feedback, we //doi.org/10.1109/UIC-ATC.2017.8397470
could determine the user’s preferences, such as whether [6] Jaekeol Choi, Euna Jung, Jangwon Suh, and
Wonthe user is a vegetarian or if the user is currently pur- jong Rhee. 2021. Improving Bi-encoder
Docuchasing products specific to a particular diet, such as the ment Ranking Models with Two Rankers and
Multiketogenic diet. Such information can then be used in the teacher Distillation. In Proceedings of the 44th
Inrecommendation system for personalizing recommended ternational ACM SIGIR Conference on Research and
products for diferent users. Development in Information Retrieval. ACM.</p>
        <p>The content-based recommendation system proposed [7] Paul Covington, Jay Adams, and Emre Sargin. 2016.
in this paper could potentially be used to improve the Deep neural networks for youtube
recommendashopping experience of users by providing them options tions. In Proceedings of the 10th ACM conference on
to add all the necessary products required by a recipe recommender systems. 191–198.
automatically to their shopping cart. Kitchen gadget rec- [8] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and
ommendations could be helpful not just for improving Kristina Toutanova. 2018. BERT: Pre-training of
the shopping experiences of the users but also for their Deep Bidirectional Transformers for Language
Uncooking experiences. These recommendations also al- derstanding.
low a business to increase the basket sizes of their users, [9] Grand View Research. 2021. Recommendation
Enthereby increasing revenue. Moreover, the system could gine Market Size, Share &amp; Trends Analysis.
Recomalso aid in automated promotional emails that recom- mendation Engine Market Report (2021).
mend products required by recipes that may be of interest [10] Matthew Honnibal and Ines Montani. 2017. spaCy
to customers. 2: Natural language understanding with Bloom
embeddings, convolutional neural networks and
incremental parsing. (2017). To appear.</p>
        <p>References [11] Anirudh Jagithyala. 2014. Recommending recipes
[1] Payal Bajaj, Daniel Campos, Nick Craswell, Li Deng, tbaatsieodn.onKainngsraesdSietnattes aUnndivuesresritryev.iews. Ph. D.
DisserJianfeng Gao, Xiaodong Liu, Rangan Majumder, An- [12] Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du,
drew McNamara, Bhaskar Mitra, Tri Nguyen, Mir Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis,
Rosenberg, Xia Song, Alina Stoica, Saurabh Tiwary, Luke Zettlemoyer, and Veselin Stoyanov. 2019.
and Tong Wang. 2016. MS MARCO: A Human Gen- RoBERTa: A Robustly Optimized BERT Pretraining
erated MAchine Reading COmprehension Dataset. Approach.
[2] Shivam Bansal, Aman Srivastava, and Anuja Arora. [13] Kevin F. McCardle, Kumar Rajaram, and
Christo2017. Topic Modeling Driven Content Based Jobs pher S. Tang. 2007. Bundling retail products:
ModRecommendation Engine for Recruitment Industry.
els and analysis. European Journal of Operational
Procedia Computer Science 122 (2017), 865–872. 5th Research 177, 2 (2007), 1197–1217.
International Conference on Information Technol- [14] Niklas. 2022. Average Weight of All Fruits and
ogy and Quantitative Management, ITQM 2017. Vegetables. https://weightofstuff.com/average-w
[3] Steven Bird, Ewan Klein, and Edward Loper. 2009. eight-of-all-fruits-and-vegetables/
Natural language processing with Python: analyzing [15] Sinno Jialin Pan and Qiang Yang. 2010. A Survey on
text with the natural language toolkit. ” O’Reilly Transfer Learning. IEEE Transactions on Knowledge
Media, Inc.”.
and Data Engineering 22, 10 (2010), 1345–1359.
[4] Dan Chang, Hao Gui, Rui Fan, Ze Fan, and Ji [16] Michael J. Pazzani and Daniel Billsus. 2007.
ContentTian. 2019. Application of Improved Collaborative
Filtering in the Recommendation of E-commerce BHaesieddelRbeercgo,mBmerelnind,aHtioenideSlybsetregm, s3.25S–p3r4in1.ger Berlin
Commodities. INTERNATIONAL JOURNAL OF [17] Chantal Pellegrini, Ege Özsoy, Monika Wintergerst,
COMPUTERS COMMUNICATIONS CONTROL 14, 4 and Georg Groh. 2021. Exploiting Food Embeddings
(2019), 489–502.
for Ingredient Substitution. In HEALTHINF.
[18] Jefrey Pennington, Richard Socher, and Christo- _project/
pher D Manning. 2014. Glove: Global vectors for [25] Chun-Yuen Teng, Yu-Ru Lin, and Lada A Adamic.
word representation. In Proceedings of the 2014 con- 2012. Recipe recommendation using ingredient
ference on empirical methods in natural language networks. In Proceedings of the 4th annual ACM
processing (EMNLP). 1532–1543. web science conference. 298–307.
[19] Juan Ramos et al. 2003. Using tf-idf to determine [26] Mayumi Ueda, Syungo Asanuma, Yusuke
word relevance in document queries. In Proceed- Miyawaki, and Shinsuke Nakajima. 2014. Recipe
ings of the first instructional conference on machine recommendation method by considering the users
learning, Vol. 242. Citeseer, 29–48. preference and ingredient quantity of target recipe.
[20] Nils Reimers and Iryna Gurevych. 2019. Sentence- In Proceedings of the international multiconference
BERT: Sentence Embeddings using Siamese BERT- of engineers and computer scientists, Vol. 1. 12–14.</p>
        <p>Networks. [27] Wenhui Wang, Furu Wei, Li Dong, Hangbo Bao,
[21] Stephen Robertson and Hugo Zaragoza. 2009. The Nan Yang, and Ming Zhou. 2020. MiniLM: Deep
Selfprobabilistic relevance framework: BM25 and beyond. Attention Distillation for Task-Agnostic
CompresNow Publishers Inc. sion of Pre-Trained Transformers. arXiv:2002.10957
[22] Perez Sarah. 2015. Instacart And Allrecipes Now Let [28] Chutian Wei, Xinyu Chen, Zhenning Tang, and
You Add A Meal’s Ingredients To Your Grocery List Wen Cheng. 2021. Fully content-based IMDb movie
With A Click. https://techcrunch.com/2015/10/12/ recommendation engine with Pearson similarity.
instacart-and-allrecipes-now-let-you-add-a-meals In International Conference on Green
Communica-ingredients-to-your-grocery-list-with-a-click/ tion, Network, and Internet of Things (GCNIoT 2021),
[23] J. Ben Schafer, Dan Frankowski, Jon Herlocker, and Siting Chen and Jun Mou (Eds.), Vol. 12085.
InternaShilad Sen. 2007. Collaborative Filtering Recom- tional Society for Optics and Photonics, SPIE, 132 –
mender Systems. Springer Berlin Heidelberg, Berlin, 137.</p>
        <p>Heidelberg, 291–324. [29] Ruiliang Yan, Chris Myers, John Wang, and Sanjoy
[24] Chahak Sethi, Melvin Vellera, Diane Myung kyung Ghose. 2014. Bundling products to success: The
Woodbridge, and Joey Jonghoon Ahnn. 2022. Bun- influence of complementarity and advertising.
Jourdle Recommender from Recipes to Shopping Cart. nal of Retailing and Consumer Services 21, 1 (2014),
https://github.com/dianewoodbridge/target_recipe 48–53.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list />
  </back>
</article>