<!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>
      <journal-title-group>
        <journal-title>August</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>HeASe: An AI-powered Framework to Promote Healthy and Sustainable Eating</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Alessandro Petruzzelli</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Cataldo Musto</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Michele Ciro Di Carlo</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giovanni Tempesta</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giovanni Semeraro</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Bari Aldo Moro</institution>
          ,
          <addr-line>via Orabona 4, Bari, 70125</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2024</year>
      </pub-date>
      <volume>05</volume>
      <issue>2024</issue>
      <fpage>0000</fpage>
      <lpage>0001</lpage>
      <abstract>
        <p>This paper introduces Healthy And Sustainable eating (HeASe), a comprehensive framework designed to promote healthy and sustainable eating by leveraging large language models and food retrieval techniques. As global concerns about nutrition and environmental sustainability escalate, the need for efective solutions that allow people to better nourish and improve their knowledge and self-awareness about food becomes imperative. To this end, given an input recipe, our framework first identifies a set of substitute meals by exploiting a retrieval strategy based on macro-nutrients, then relies on large language models to re-rank candidate recipes based on their healthiness and sustainability. As shown in our experiments, the methodology has the ability to expose individuals to better dietary choices, potentially contributing to overall well-being and reducing the ecological footprint of food consumption.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Food Recommendation</kwd>
        <kwd>Large Language Models</kwd>
        <kwd>Health-aware Recommender Systems</kwd>
        <kwd>Sustainability</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Today, the food industry is eficient and ofers a variety of fresh and processed options. However, every
step of the agricultural and food chain raises environmental concerns. Land use, water consumption,
and air emissions all have an impact on the environment. While technological advancements create
new markets and opportunities, they must also address these environmental challenges. To mitigate the
environmental footprint of the food chain, a fundamental shift in consumer behavior is essential. Indeed,
we must transition towards a dietary paradigm that prioritizes both individual health and environmental
sustainability [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. This necessitates a move away from conventional consumption patterns and towards
a more mindful approach to food choices. All these principles are in lines with several Sustainable
Development Goals (SDGs), in particular SDG3 (Good Health and Well-being) and SDG12 (Responsible
Consumption and Production).
      </p>
      <p>
        In recent years, food recommendation systems (RSs) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] have emerged as a promising avenue to guide
consumers toward healthier and more sustainable dietary choices. These systems can be categorized
into two primary types: health-aware and sustainable-aware RSs [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ]. Health-aware food RSs [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] aim to
assist users in defining daily diets that align with their nutritional needs and health goals. These systems
typically achieve this by balancing user preferences with various health-related factors. Previous
methods have tried to incorporate healthiness by replacing ingredients with healthier alternatives [
        <xref ref-type="bibr" rid="ref5 ref6">5, 6</xref>
        ]
or incorporating nutritional facts as function constraints [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]. In [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], a post-filtering method has
been proposed to score recipes based on health criteria.While these approaches have shown promise in
promoting healthier eating habits, they often face limitations. Notably, methods that directly substitute
ingredients or impose hard constraints on healthiness can significantly alter the recipe’s original
characteristics, potentially compromising user satisfaction. Additionally, post-filtering approaches may
discard potentially healthy recipes that fall below an arbitrary threshold, limiting user choice.
      </p>
      <p>
        On the other hand, sustainability-aware food RSs solely consider the environmental impact related to
food consumption. For instance, in [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ], the authors introduce a system that exploits the information
about water footprint. In particular, it promotes recipes with ingredients whose production needs a
lower quantity of water. While being of interest and certainly novel, this approach fails to capture the
complete picture of a recipe’s impact ignoring other sustainability aspects such as carbon emissions
[
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], that play a key role in assessing the sustainability of a recipe. To sum up, the analysis of the state
of the art showed that there is a scarcity of systems that jointly tackle the problem of providing food
suggestions that are healthy and sustainable at the same time.
      </p>
      <p>
        Accordingly, we propose a novel framework that aims to fill in this gap by exploiting large language
models (LLMs) and a recipe similarity formula based on macro-nutrients. In particular, given an input
(not sustainable) recipe, we first use macro-nutrients to identify suitable alternative, then we rank them
based on our sustainability score and we finally exploit large language models ( i.e., GPT 3.5 Turbo [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ])
to select an alternative recipe that is both healthy and sustainable. Up to our knowledge, the use of
LLMs to identify sustainable food alternative is a completely novel research direction.
      </p>
      <p>
        In our vision, this approach acknowledges that health-conscious consumers often consider not only
the nutritional value of food but also its environmental impact. So, by incorporating a sustainability
score for each ingredient, the framework can identify recipes that encompass both individual well-being
and environmental responsibility. A toy example showing the behavior of the framework is presented
in Figure 1, while the contribution of the paper can be summarized as follows:
• Sustainability Score: we introduce a strategy to estimate the sustainability of a recipe based on
the information about water and carbon footprint of its ingredients.
• Dataset: we release a new dataset that extends HUMMUS [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] with sustainability and healthiness
scores for ingredients. In particular, we provided all the recipes in the dataset with information
about environmental aspects. This will encourage and foster research in the area of
sustainabilityaware food RSs.
• HeASe Framework: we propose a framework that provides users with more sustainable and
healthier recipes by exploiting: (a) recipe similarity based on macro-nutrients; (b) sustainability
and healthiness scores; (c) selection mechanism based on LLMs.
• Evaluation: we showed that our sustainability scores allowed to identify similar but more
sustainable recipes. Moreover, we also showed the LLMs can be particularly efective in selecting
the most suitable alternative given a pool of candidate recipes. Both these directions have been
scarcely investigated in the state of the art.
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. Assessing Healthiness and Sustainability</title>
      <sec id="sec-2-1">
        <title>2.1. Calculating Healthiness of Recipes</title>
        <p>
          Determining the "healthiness" of a recipe is a complex issue, heavily influenced by its nutrient
composition and individual dietary needs. The concept of healthy food has experienced significant evolution,
with past approaches focusing on factors like calories information [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], cholesterol levels [
          <xref ref-type="bibr" rid="ref13">13</xref>
          ], or
multinutrients like protein, sodium, and saturated fats [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
        </p>
        <p>
          Today, we have a more comprehensive framework based on guidelines from international health
organizations like the World Health Organization (WHO) [
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. The WHO recommends daily intake
ranges for 15 macro-nutrients. Based on these intakes, in the HUMMUS dataset [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ] the authors created
a single score reflecting a recipe’s overall healthiness. In particular, the method relies on the "trafic
light" system proposed by [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ]: each macro-nutrient range is assigned a color based on its perceived
healthfulness (green for healthy, yellow for moderate, red for unhealthy) , and each color is mapped to
a range of scores. The individual scores of the macro-nutrients are then added up and normalized to
create a final WHO score ranging from 0 (very healthy) to 14 (very unhealthy) for each recipe. Given
a recipe , from now on the healthiness of the recipes calculated as we just described is indicated as
 (). For more details on the formula, we suggest to refer to [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ].
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. Calculating Sustainability of Recipes</title>
        <p>
          While the task of calculating the healthiness of a recipe has some previous attempts, the assessment of
the sustainability is relatively newer and scarcely investigated. Indeed, sustainability is a complex and
constantly developing field, with no single universally accepted method. This makes it challenging to
objectively compare the environmental impact of diferent recipes. Only of the first attempts in this
direction is represented by the SU-EATABLE Life (SEL) dataset [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ], that provides carbon footprint (WC)
and water footprint (WF) data for various food ingredients.
        </p>
        <p>In this work, we tackle the task of assessing the sustainability of the recipes available in the HUMMUS
dataset by properly processing the information encoded in SEL dataset. In particular, the process is
organized as follows:
1. Pre-process the SU-EATABLE Life (SEL) dataset. We remove noise by eliminating items
lacking both footprints, removing unnecessary characters from names, and filtering out stopwords
and adjectives.
2. Match ingredients with recipes: We match ingredients in the SEL dataset with those in each
recipe from the HUMMUS dataset.
3. Handle missing ingredients: To ensure comprehensive matching, we perform additional steps:
• Check if the SEL ingredient name is contained within the recipe ingredient name.
• Check if the recipe ingredient name is contained within the SEL ingredient name.
• If the above steps find matchings, we utilize transformers 1 to calculate the similarity between
missing ingredients and matched ones in SEL, with a threshold of 0.98. We manually
reviewed similarities further refined the matches.
4. Manual intervention for high-occurrence missing ingredients: We manually addressed 87
missing ingredients with over 1000 occurrences, identifying 19 potential associations.</p>
        <p>Based on the previous strategy, given an ingredient  we can obtain its corresponding water and
carbon footprints, labeled as   () and  ().</p>
        <p>Next, to evaluate the overall environmental impact of an ingredient we designed a new metric named
Ingredient Sustainability Score (ISS), calculated as follows:
() =  ×   () +  ×  ()
(1)
where:
•  represents the specific ingredient.
•   () denotes the water footprint of ingredient .
•  () represents the carbon footprint of .</p>
        <p>•  and  are weighting factors, with  = 0.2 and  = 0.82</p>
        <sec id="sec-2-2-1">
          <title>1https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2</title>
          <p>2This weighting scheme prioritizes the carbon footprint over the water footprint, reflecting the generally greater environmental
impact of greenhouse gas emissions compared to water use. Of course, diferent weighting schemes may be adopted as well.</p>
          <p>Next, based on the ISS scores for ingredients, we define a scoring function for recipes. To this end,
we first rank the ingredients 1 . . .  based on their ISS. Then, we define the Recipe Sustainable Score
(RSS) for a recipe  as:
(2)
(3)
() =
||− 1
∑︁ ()− 
=0
Where  represents the -th ingredient of the recipe, based on the previous ranking.</p>
          <p>The intuition behind this formula is to give a greater importance to the ingredients with higher carbon
and water footprint (i.e., those that have a greater environmental impact). Diferently from a simple
average, that gives identical importance to the ingredients, this strategy gives more importance to
ingredients that are not sustainable. Indeed, this discounting mechanism ensures that the overall recipe
score reflects the dominance of the main ingredient while incorporating the influence of additional
ingredients. Finally, the ultimate sustainability score (SuS) of a recipe was computed as:
SuS(R) = 1 −
() −  
  −</p>
          <p>Where MinRSS and MaxRSS are the minimum and maximum RSS scores obtained over the dataset of
recipes, respectively, and are used as a normalization factor. It is important to note that the Sustainability
Score is calculated based on the water and carbon footprint of all the ingredients of the recipe. These
have negative environmental impacts, so a higher overall score indicates a more sustainable recipe. A
qualitative evaluation of the efectiveness of our formula is provided next.</p>
        </sec>
      </sec>
      <sec id="sec-2-3">
        <title>2.3. Description of the Dataset</title>
        <p>
          As mentioned in the previous steps, one of the contributions of the paper is a new dataset providing
information about sustainability of recipes. Our dataset is based on Health-aware User-centered
recoMMendation and argUment-enabling data Set (HUMMUS) dataset. This dataset is built on top
of the existing FoodKG [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ] knowledge graph. The authors have added more data to the graph by
collecting additional information for each recipe. They have also included valuable features such as
nutritional scores from WHO, FDA, and Nutriscore. This dataset has over 507, 000 recipes, and each
recipe contains details about ingredients, macro-nutrients (calories, total fat, etc.), and other relevant
information organized into tags. The tags provide information about key recipe aspects like main
ingredients (meat, pork, fruit) and dish category (main course, dessert, breakfast). The dataset contains
a set of 902 unique tag values.
        </p>
        <p>To ensure the dataset’s quality, we performed some prep-rocessing steps. We removed duplicate
recipes, those missing any tags, and those lacking any listed ingredients. This process helped to refine
the dataset and improve its overall usability, reducing the number of recipes to 214, 800.</p>
        <p>Next, we applied the pipeline described in section 2.2 to calculate the SuS score for each recipe.
However, during this process, we noticed that not all ingredients could be matched, even after manual
checking. To maintain the overall quality of the dataset, we decided to remove recipes where more
than 30% of ingredients could not be matched in the SEL dataset. This additional filtering reduced the
number of recipes to 100,870.</p>
        <p>Finally, we categorized recipes with three sustainability labels based on their sustainability scores:
• High ( ≥ 0.9): Representing highly sustainable recipes (16,433 recipes).
• Medium (0.5 &lt;  &lt; 0.9): Representing moderately sustainable recipes (79,157 recipes).
• Low ( ≤ 0.5): Indicating recipes with low sustainability (5,280 recipes).</p>
        <p>Some examples of the recipes that were classified in each category will be provided next. Moreover,
the dataset together with the labels we calculated was used in our experiment to assess the efectiveness
of the strategy and was released as a contribution of the work.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Description of the Framework</title>
      <p>This section introduces the HeASe framework. As previously stated (see Figure 1), the goal of the
framework is to automatically suggest a similar-but-healthier and more sustainable alternative of an
input recipe given a by user. For better understanding the framework, we break down the process into
four steps, each corresponding to a component in Figure 2.</p>
      <sec id="sec-3-1">
        <title>3.1. Step 1: Encoding Module</title>
        <p>The workflow starts with the Encoding Module. In a nutshell, this module takes as input the input
recipe and returns a vector encoding the characteristics of the recipe in terms of macro-nutrients. This is
a mandatory step, since we want to identify recipes that are healthier and more sustainable, but also
similar to the input. Accordingly, it is necessary to understand nutritional values and characteristics of
a recipe.</p>
        <p>To this end, we exploited a pre-trained transformer fine-tuned on the recipe domain 3 to encode the
input recipe based on the name of the recipe. Next, we calculate the similarity between the input recipe
and the names of the other recipes available in the dataset. If a match with a similarity score exceeding
0.99 is found, we obtain a precise match. It means that a recipe with (almost) the same name exists in
the dataset. Otherwise, the  most similar recipes are returned. In this way, the framework is able to
manage both exact and non-exact matching.</p>
        <p>In case of exact match, the output of the module is a vector encoding the values of the macro-nutrients
of the matched recipe, together with the descriptive tags available in the dataset. Conversely, in case of
non-exact matching, the macro-nutrients of the input recipe are obtained as the centroid vector of the
macro-nutrients of the  similar recipes previously identified by the transformer.</p>
        <sec id="sec-3-1-1">
          <title>3https://huggingface.co/davanstrien/autotrain-recipes-2451975973</title>
        </sec>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Step 2: Retrieval Module</title>
        <p>As mentioned in the previous step, the Encoding module generates a representation of the input recipe
based on its macro-nutrients. Such a representation is then used to search for similar recipes. To address
this task, we calculated the similarity in terms of macro-nutrients between the input recipe (as returned
by the Encoding module) and all the recipes in the dataset, based on the cosine similarity. This allowed
us to retrieve recipes that closely matched the input recipe in terms of their nutritional composition.</p>
        <p>Moreover, we also used the tags that are available for each recipe as a further element to improve the
quality of the retrieved recipes. In particular, we only return recipes that are similar and share at least
one tag (i.e., pasta, breakfast, japanese, etc.) with the input recipe provided by the user. In this way, we
avoid that very diferent recipes could be included in the output of the Retrieval module.</p>
      </sec>
      <sec id="sec-3-3">
        <title>3.3. Step 3: Ranking Module</title>
        <p>Once similar recipes are obtained, it is necessary to rank them in order to identify an alternative that is
more sustainable and healthier. This role is played by the Ranking module, whose goal is to take as
input the recipes previously returned by the Retrieval module and identify the better alternatives for
the user. To rank the recipes, we defined a new function called HeaSe Score (HS), defined as follows:
HS(R) =  · Sustainability() +  · WHO()
(4)
• Where  represents a recipe.
• SuS() is a function that returns the sustainability score of R, as described in Section 2.2
• WHO() is a function that returns the WHO score of a given recipe.</p>
        <p>•  and  hyperparameters that allow you to weight the importance of each factor.</p>
        <p>At the end of this step, a list of ranked alternative recipes is obtained. It is worth emphasizing that
the workflow can also stop after this step, by returning to the user the top-1 recipe retrieved by the
systems based on the HeaSe score. However, we also implemented a Selection module based on LLMs
to assess whether the knowledge encoded in large language models can be exploited to better handle
this task.</p>
      </sec>
      <sec id="sec-3-4">
        <title>3.4. Step 4: Selection Module</title>
        <p>Finally, in the Selection module, the output previously obtained from the Ranking module is processed
by using LLMs, specifically GPT-3.5 turbo, in order to select the most suitable alternative of the recipe
provided as input by the user. To carry out this step we specifically designed a strategy inspired by
Retrieval-Augmented Generation (RAG) [19] which takes as input the list of candidate recipes and asks
the LLM to select the most suitable one. This is done through a zero-shot prompt that is used to query
the LLM, leaving it the task to identify the most suitable candidate recipe based on the knowledge
encoded in the language model. An example of such a prompt is provided below. As shown in the
example, we populate the prompt with the recipes previously identified and we let GPT pick the more
sustainable alternative recipe. To mitigate potential biases like positional bias [20], the retrieved recipes
are shufled and inserted into the prompt without any additional information.</p>
        <p>U s i n g your knowledge , p l e a s e rank ( i f
n e c e s s a r y ) t h e f o l l o w i n g r e c i p e s from
most t o l e a s t recommended b a s e d on a
b a l a n c e o f s u s t a i n a b i l i t y and
h e a l t h i n e s s :
1 . R e c i p e : H e a l t h y S a l a d
2 . R e c i p e : Quinoa Bowl
3 . R e c i p e : V e g g i e S t i r − F r y
Which one s h o u l d I c h o o s e ?
R e t u r n j u s t t h e name .</p>
        <p>It is crucial to note that the lack of information about the input recipe is intentional and derives from
the experiment’s ultimate objective. We aim to assess the LLM’s ability to accurately identify the recipe
with higher values of sustainability and healthiness without relying on specific recipe details.</p>
        <p>Of course, one of the goals of the experiment will be to assess the efectiveness of LLMs in the task of
automatically identifying healthy and sustainable recipes.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Experimental Evaluation</title>
      <p>This section explores the efectiveness of the proposed metrics and framework through experiments
addressing the following Research Questions (RQs):
RQ1 - Scoring Efectiveness: Can SuS and HeASe scores actually rank recipes based on sustainability
and healthiness?
RQ2 - Retrieval Efectiveness: Is the framework able to successfully identify suitable food alternatives?
RQ3 - LLM-based Selection Efectiveness: Can LLMs be leveraged to automatically select sustainable
alternatives?</p>
      <sec id="sec-4-1">
        <title>4.1. Experimental Setting</title>
        <p>Dataset and Evaluation Protocol All the experiments rely on the dataset previously described in
Section 2.3, that is also available online on our repository4. Based on this dataset, we evaluated the
performance of the framework by providing an input recipe and by checking whether the alternative
identified by the framework is healthier and/or more sustainable. To guarantee the soundness of the
protocol, we evaluated the performance of HeaSe system across diverse scenarios:
1. Low Sustainability: based on 100 randomly selected recipes labeled as "Low" in sustainability.
2. Medium Sustainability: based on 100 randomly selected recipes labeled as "Medium" in
sustainability.
3. High Health: based on 100 randomly selected recipes with a WHO score above average.
4. Unknown Recipes: based on 30 Recipes not present in the recipe dataset.</p>
        <p>These scenarios allow us to assess the framework’s eficacy in diferent contexts. For instance, for the
"Low Sustainability" scenario we expect significant improvements in the output recipe’s sustainability
and healthiness compared to the input. However, we also evaluate the framework’s performance in
more challenging settings (i.e., high health, based on recipes that are already healthy, or unknown, in
order to also assess the efectiveness of non-exact matching in the retrieval phase).</p>
        <p>Implementation Details and Model Parameters The model uses a pre-trained transformer encoder
with a hidden dimensionality of 768. This allows the model to eficiently find similarities between
the input text and recipe titles, even when the input doesn’t perfectly match the recipe title. As for
the Retrieval module, the number of alternative recipes based on macro-nutrient similarity which
is returned is set to 100. The recipe representation is based on its macro-nutrients, which include:
Calories [cal], Total Fat [g], Saturated Fat [g], Cholesterol [mg], Sodium [mg], Dietary Fiber
[g], Sugars [g], and Protein [g]. As regards the scoring function in the Ranker module, the best
configuration for the model was achieved by setting the alpha and beta values in the formula 4 to 0.7
and 0.3, respectively.</p>
        <p>Evaluation Metric We evaluate the performance of the HeASe system by calculating the mean
percentage increment of each metric for each scenario. Given an input recipe () and a list of 
possible alternatives () returned by the system, we compute the following:</p>
        <p>1 ∑︀=0  () −  ()
WHO_incr = 
 ()</p>
        <p>1 ∑︀
SuS_incr =  =0 () − ()
()
1 ∑︀
HeASe_incr =  =0 () − ()
()
(7)</p>
        <p>Intuitively, these metrics calculate the increase (if any) in terms of healthiness and sustainability of
the recipe retrieved by the framework compared to the input one.</p>
        <p>Sensitivity Analysis. Finally, to investigate the performance of the system on varying of diferent
parameters, we also carried out a sensitivity analysis based on the following key factors:
• Tags matching: This option controls how strictly the recipe tags need to match between the input
recipe and the retrieved items. By setting it to true, the framework only outputs recipes that
share all the same tags with the input recipe.
• Retrieved items: This parameter determines the number of alternative recipes retrieved as
recommendations.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.2. Discussion of the Results</title>
        <p>RQ1 - Scoring Function Efectiveness:
based on SuS and HeASe scores.</p>
        <sec id="sec-4-2-1">
          <title>To answer RQ1, we present the top-5 and worst-5 recipes</title>
          <p>• Top-5 Recipes (Tables 1 and 3): as shown in the tables, this includes recipes like "Homemade
Oatmeal," "Quinoa-Toasted," and "Seasoned Rice", which excel in both sustainability and healthiness,
achieving high SuS and HeASe scores. These options likely prioritize plant-based ingredients and
simple preparation methods, reducing environmental impact and promoting nutritional value.
Generally speaking, we can state that the list of the more sustainable and healthy recipes confirms
the efectiveness of the scoring function we designed.
• Worst-5 recipes (Tables 2 and 4): Conversely, recipes like "Rich Lamb Curry," "Five Meat Chili,"
and "Middle Eastern Stew" score poorly in both categories. These dishes likely contain significant
amounts of meat, which can contribute to a higher environmental footprint and potentially lower
overall health benefits. Also, in this case, we can state that the poorly sustainable recipes are
correctly identified through our scoring function.</p>
          <p>The disparity between metrics: Interestingly, the top and bottom scorers for SuS do not entirely
overlap with those for HeASe. "Boiled Radishes" and "Granita" for example, rank highly in SuS but not
in HeASe. This suggests that some sustainable practices might not always translate directly to health
benefits, and vice versa, highlighting the need for a balanced metric like HeASe.</p>
          <p>To sum up, we can answer RQ1 by stating that the qualitative analysis we provided generally
confirmed the efectiveness of the scoring function we introduced in this paper.
RQ2 - Retrieval Efectiveness To answer RQ2, we conducted several tests to evaluate the
efectiveness of the framework, that is to say, to assess whether the alternative recipes retrieved through
our pipeline are healthier and more sustainable w.r.t. the input recipe. In particular, for each of the 100
recipes in each scenario (see Section 4.1) we retrieved the 100 most similar recipes based on
macronutrients, we ranked them based on our HeaSe score, and we calculated the average increase in terms
of healthiness and sustainability for all the recipes. The results are reported in Table 5.</p>
          <p>As shown in Table 5, the results confirmed the efectiveness of the approach, since the proposed
alternative recipes are healthier and more sustainable, on average, in all the experimental scenarios we
considered. It is worth emphasizing that the results are consistent across all the diferent scenarios,
even if the gaps of course reflect the complexity of the task. Indeed, when poorly sustainable recipes
are used as input of the framework, a huge average increase emerges from all the alternatives. Even
though this was expected, it is important to see that the increase we obtained is really huge, on average.
It is also important to note that an average increase in terms of sustainability is obtained when recipes
that are already healthy are used as input. Next, the results of the sensitivity analysis are shown in
Figures 3 and 4. Due to space constraints, we only reported the plot for two scenarios, i.e., the "Low
Sustainability" scenario and the "High Health" scenario. The other scenarios follow a similar trend.
Plots clearly show that the framework achieves better performance as the number  of alternative
recipes increases, and it confirmed our choice of choice of retrieving and ranking 100 similar recipes.
In particular, as shown in Figure 4a, this is a necessary choice for the "high health" scenario, since
by considering the top-1 and top-10 recipes retrieved we have an average decrease in sustainability.
Conversely, by increasing the number of recipes, the overall healthiness and sustainability are higher.
While this suggests that alternative strategies for retrieval and ranking need to be investigated in the
future, proper tuning of the parameters still guarantees good performance.</p>
          <p>Finally, Figures 3b and 4b show the results on varying of the tag matching strategy. The results
reveal slight diferences, with configurations that don’t require matching all tags generally producing
better results. This means that when the retrieved recipes need to match all the tags of the input recipe,
non-relevant recipes may be generally returned. To sum up, all the results of the sensitivity analysis
showed that the platform generally performs well, but a proper choice of parameter may lead to more
efective results.
by the platform based on diferent input recipes. As shown in the table, in all the reported settings the
alternative recipe is healthier more sustainable, and suficiently similar to the input one. This definitely
confirmed the efectiveness of the design choices. More tests can be carried out by running our online
demo5.</p>
        </sec>
        <sec id="sec-4-2-2">
          <title>5https://github.com/GiovTemp/SustainaMeal_Case_Study</title>
          <p>RQ3 - LLM-based Selection Efectiveness: Finally, to answer RQ3, we evaluated the ability of
GPT3.5 Turbo to automatically pick the more sustainable alternative in a pool of candidate recipes retrieved
by the system. The process follows the step described in the Selection module of the framework. Due
to limitations in prompt length, we experimented with a smaller set of alternatives (i.e., 10 candidate
recipes). The analysis with a longer prompt is left as future work. In Table 7, we compare the healthiness
and sustainability of the recipe with the highest score calculated by the Ranker to the recipe identified
by GPT among the top-10 returned by the Ranker as well. As shown in the table, the results show that
the LLM showed an unexpected and surprising ability to exploit its own knowledge about responsible
food consumption to automatically select the best recipe in a pool of 10 candidates. Indeed, when
compared with the top-1 recipes previously picked, the average sustainability and healthiness of the
recipes is generally higher. These findings suggest that LLMs can efectively leverage the strengths
of both retrieval and generation techniques to identify recipes that are both sustainable and healthy.
This is an important finding of this work, showing the efectiveness of LLMs in a novel and scarcely
investigated research direction.</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>5. Discussion and Future Works</title>
      <p>The framework described in this paper aligns with SDG3 and SDG12. In particular, we foresee the
following impact:
- SDG 3 - Good Health and Well-being: Promoting Healthier Diets. The framework focuses on
encouraging individuals to adopt healthier eating habits. By leveraging our system users can explore
and choose recipes that contribute to a balanced and nutritious diet. This directly contributes to the
goal of ensuring good health and well-being by promoting better nutrition and reducing the risk of
diet-related diseases.
- SDG12 - Responsible Consumption and Production: Ingredient Substitution: The framework
contributes to responsible consumption by helping users identify more sustainable substitute ingredients
in recipes. This aligns with SDG 12’s focus on ensuring sustainable consumption by promoting
ecofriendly and ethically sourced ingredients.</p>
      <p>In summary, the HeaSe framework contributes to SDG 3 by promoting healthier diets and better
well-being and to SDG 12 by encouraging responsible consumption and production practices. By
combining technology-driven solutions with user engagement and education, the project seeks to
address the interconnected challenges of health and sustainability in the context of food choices. In
future work, we will evaluate diferent strategies for the selection of alternative recipes, and we evaluate
the efectiveness with real users.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgements</title>
      <p>We acknowledge the support of the PNRR project FAIR - Future AI Research (PE00000013), Spoke 6
Symbiotic AI under the NRRP MUR program funded by the NextGenerationEU and project PHaSE (CUP
H53D23003530006) - Promoting Healthy and Sustainable Eating through Interactive and Explainable AI
Methods, funded by MUR under the PRIN program. Additionally, we acknowledge the CINECA award
under the ISCRA initiative (class C project: IscrC_LLM_REC), for the availability of high-performance
computing resources and support
The Semantic Web – ISWC 2019, Springer International Publishing, Cham, 2019, pp. 146–162.
[19] P. Lewis, E. Perez, A. Piktus, F. Petroni, V. Karpukhin, N. Goyal, H. Küttler, M. Lewis, W.-t. Yih,
T. Rocktäschel, et al., Retrieval-augmented generation for knowledge-intensive nlp tasks, Advances
in Neural Information Processing Systems 33 (2020) 9459–9474.
[20] P. Wang, L. Li, L. Chen, Z. Cai, D. Zhu, B. Lin, Y. Cao, Q. Liu, T. Liu, Z. Sui, Large language models
are not fair evaluators, 2023. arXiv:2305.17926.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>C.</given-names>
            <surname>Hartmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Lazzarini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Funk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Siegrist</surname>
          </string-name>
          ,
          <article-title>Measuring consumers' knowledge of the environmental impact of foods</article-title>
          ,
          <source>Appetite</source>
          <volume>167</volume>
          (
          <year>2021</year>
          )
          <fpage>105622</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>C.</given-names>
            <surname>Trattner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Elsweiler</surname>
          </string-name>
          ,
          <article-title>Food recommender systems: important contributions, challenges and future research directions</article-title>
          ,
          <source>arXiv preprint arXiv:1711.02760</source>
          (
          <year>2017</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>I.</given-names>
            <surname>Gallo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Landro</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. La</given-names>
            <surname>Grassa</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Turconi</surname>
          </string-name>
          ,
          <article-title>Food recommendations for reducing water footprint</article-title>
          ,
          <source>Sustainability</source>
          <volume>14</volume>
          (
          <year>2022</year>
          ). URL: https://www.mdpi.com/2071-1050/14/7/3833. doi:
          <volume>10</volume>
          .3390/ su14073833.
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>M.</given-names>
            <surname>Ge</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Ricci</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Massimo</surname>
          </string-name>
          ,
          <article-title>Health-aware food recommender system</article-title>
          ,
          <source>in: Proceedings of the 9th ACM Conference on Recommender Systems</source>
          , RecSys '15,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2015</year>
          , p.
          <fpage>333</fpage>
          -
          <lpage>334</lpage>
          . URL: https://doi.org/10.1145/2792838.2796554. doi:
          <volume>10</volume>
          .1145/2792838.2796554.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>C.-Y.</given-names>
            <surname>Teng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.-R.</given-names>
            <surname>Lin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. A.</given-names>
            <surname>Adamic</surname>
          </string-name>
          ,
          <article-title>Recipe recommendation using ingredient networks</article-title>
          ,
          <source>in: Proceedings of the 4th annual ACM web science conference</source>
          ,
          <year>2012</year>
          , pp.
          <fpage>298</fpage>
          -
          <lpage>307</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>D.</given-names>
            <surname>Elsweiler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Trattner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Harvey</surname>
          </string-name>
          ,
          <article-title>Exploiting food choice biases for healthier recipe recommendation</article-title>
          ,
          <source>in: Proceedings of the 40th international acm sigir conference on research and development in information retrieval</source>
          ,
          <year>2017</year>
          , pp.
          <fpage>575</fpage>
          -
          <lpage>584</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>D.</given-names>
            <surname>Elsweiler</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Harvey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Ludwig</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Said</surname>
          </string-name>
          ,
          <article-title>Bringing the "healthy" into food recommenders</article-title>
          ,
          <source>in: International Workshop on Decision Making and Recommender Systems</source>
          ,
          <year>2015</year>
          . URL: https: //api.semanticscholar.org/CorpusID:1838398.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>Y.-K.</given-names>
            <surname>Ng</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Jin</surname>
          </string-name>
          ,
          <article-title>Personalized recipe recommendations for toddlers based on nutrient intake and food preferences</article-title>
          ,
          <source>in: Proceedings of the 9th international conference on management of digital ecosystems</source>
          ,
          <year>2017</year>
          , pp.
          <fpage>243</fpage>
          -
          <lpage>250</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>C.</given-names>
            <surname>Trattner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Elsweiler</surname>
          </string-name>
          ,
          <article-title>Investigating the healthiness of internet-sourced recipes: implications for meal planning and recommender systems</article-title>
          ,
          <source>in: Proceedings of the 26th international conference on world wide web</source>
          ,
          <year>2017</year>
          , pp.
          <fpage>489</fpage>
          -
          <lpage>498</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>D.</given-names>
            <surname>Pandey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Agrawal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. S.</given-names>
            <surname>Pandey</surname>
          </string-name>
          ,
          <article-title>Carbon footprint: current methods of estimation, Environmental monitoring</article-title>
          and assessment
          <volume>178</volume>
          (
          <year>2011</year>
          )
          <fpage>135</fpage>
          -
          <lpage>160</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>T.</given-names>
            <surname>Brown</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Mann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Ryder</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Subbiah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. D.</given-names>
            <surname>Kaplan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Dhariwal</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Neelakantan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Shyam</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Sastry</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Askell</surname>
          </string-name>
          , et al.,
          <article-title>Language models are few-shot learners</article-title>
          ,
          <source>Advances in neural information processing systems</source>
          <volume>33</volume>
          (
          <year>2020</year>
          )
          <fpage>1877</fpage>
          -
          <lpage>1901</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>F.</given-names>
            <surname>Bölz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Nurbakova</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Calabretto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Gerl</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Brunie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Kosch</surname>
          </string-name>
          ,
          <article-title>Hummus: A linked, healthinessaware, user-centered and argument-enabling recipe data set for recommendation</article-title>
          ,
          <source>in: Proceedings of the 17th ACM Conference on Recommender Systems</source>
          , RecSys '23,
          <string-name>
            <surname>Association</surname>
          </string-name>
          for Computing Machinery, New York, NY, USA,
          <year>2023</year>
          , p.
          <fpage>1</fpage>
          -
          <lpage>11</lpage>
          . URL: https://doi.org/10.1145/3604915.3609491. doi:
          <volume>10</volume>
          .1145/3604915.3609491.
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>A.</given-names>
            <surname>Starke</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Trattner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Bakken</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Johannessen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Solberg</surname>
          </string-name>
          ,
          <article-title>The cholesterol factor: Balancing accuracy and health in recipe recommendation through a nutrient-specific metric</article-title>
          ,
          <source>in: Proceedings of the 1st Workshop on Multi-Objective Recommender Systems (MORS</source>
          <year>2021</year>
          ),
          <year>2021</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>R. Yera</given-names>
            <surname>Toledo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Alzahrani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Martínez</surname>
          </string-name>
          ,
          <article-title>A food recommender system considering nutritional information and user preferences</article-title>
          ,
          <source>IEEE Access 7</source>
          (
          <year>2019</year>
          )
          <fpage>96695</fpage>
          -
          <lpage>96711</lpage>
          . doi:
          <volume>10</volume>
          .1109/ACCESS.
          <year>2019</year>
          .
          <volume>2929413</volume>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>W. H.</given-names>
            <surname>Organization</surname>
          </string-name>
          , Healthy diet, https://www.who.int/news-room/fact-sheets/detail/healthy-diet,
          <year>2020</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>G.</given-names>
            <surname>Sacks</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Rayner</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Swinburn</surname>
          </string-name>
          ,
          <article-title>Impact of front-of-pack 'trafic-light'nutrition labelling on consumer food purchases in the uk</article-title>
          ,
          <source>Health promotion international 24</source>
          (
          <year>2009</year>
          )
          <fpage>344</fpage>
          -
          <lpage>352</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>T.</given-names>
            <surname>Petersson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Secondi</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Magnani</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Antonelli</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Dembska</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Valentini</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Varotto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Castaldi</surname>
          </string-name>
          ,
          <article-title>A multilevel carbon and water footprint dataset of food commodities</article-title>
          ,
          <source>Scientific data 8</source>
          (
          <year>2021</year>
          )
          <fpage>127</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>S.</given-names>
            <surname>Haussmann</surname>
          </string-name>
          ,
          <string-name>
            <given-names>O.</given-names>
            <surname>Seneviratne</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y.</surname>
          </string-name>
          <article-title>Ne'eman</article-title>
          , J. Codella,
          <string-name>
            <given-names>C.-H.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D. L.</given-names>
            <surname>McGuinness</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. J.</given-names>
            <surname>Zaki</surname>
          </string-name>
          ,
          <article-title>Foodkg: A semantics-driven knowledge graph for food recommendation</article-title>
          , in: C.
          <string-name>
            <surname>Ghidini</surname>
            ,
            <given-names>O.</given-names>
          </string-name>
          <string-name>
            <surname>Hartig</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Maleshkova</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Svátek</surname>
            ,
            <given-names>I. Cruz</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Hogan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Song</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Lefrançois</surname>
          </string-name>
          ,
          <string-name>
            <given-names>F.</given-names>
            <surname>Gandon</surname>
          </string-name>
          (Eds.),
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>