Using Generative AI to reduce food waste at home

January 22, 2024

What problem are we facing?

The latest European Commission report on food waste shows that 57 million tons of food and beverages were wasted in Europe in 2022. This is equivalent to 127 kg of waste per person per year on average, with a market value estimated at 130 billion euros according to Eurostat. The data illustrate the extent of Europe's food waste problem and the need for reduction measures.

With 55% of waste coming from households and the remaining 45% distributed throughout the supply chain, this picture offers two clear areas for improvement:

  1. In the management of food by households, encouraging greater awareness and more sustainable practices
  2. In industry, which can play a crucial role through greater involvement and investment in process optimization and the recovery of food that is unfit for consumption.

In the face of major challenges such as these, there are, fortunately, equally significant solutions.

Data insights and Artificial Intelligence emerge as key tools to effectively address and improve these everyday issues.

How does Generative AI help us reduce food waste at home?

Generative AI is emerging as a resource of great value in multiple fields, becoming more and more integrated in our daily lives. This everyday use is possible thanks to the fact that tools such as Chat-GPT, Bing, or Llama 2 are available to the general public, and, in many cases, free of charge, with limited but effective functionalities to solve specific problems.

We find then in these tools an innovative and democratic solution, since, in addition to being accessible, their use can be very simple if we find the right key, because we can take advantage of them using prompts or messages that guide the model to generate answers, through a daily conversation.

Considering that the main cause of food waste in the domestic environment is the lack of planning and organization in the menus consumed over time, which can lead to the addition of unnecessary quantities or products in the shopping list, it is possible to use technologies that are based on text Generative AI such as GPT or Bing. Doing this kind of planning can take time that is not really necessary to invest if these conversational text assistants or LLM can do it for us.

If we interact with the LLM with the following prompt:

We can obtain a useful but imprecise result if we have more specific needs, so it is important to add complexity to the prompt.

How can we improve the above interaction?

The answer, a priori, may be simple and it is none other than to add complexity to the prompt used, since the more detail is provided to the assistant about what is being asked, the more detail the response obtained will have based on those expectations resulting from more precise objectives.

However, there are multiple ways to add complexity and increase the quality of the instructions provided to the LLM; it is not limited to a single way of providing instructions or just adding more text, but there are several options available that can better fit what is required:

  • Role Prompting: gives more context to the LLM by making him/her assume a specific role, such as a specialized nutritionist, so that if you want to have a conversation with the chat, he/she will be able to contextualize all your answers:

  • Few Shot Prompting: it is the favorite method for some experts as it is able to give the most accurate answer in terms of expected format and information. It consists of providing the chat with some examples so that it learns to provide a specific answer. In this way, the LLM could be given an example of a menu with a specific format on which to make certain modifications, for example, related to some objective we hope to achieve, to diversify the options, to make it vegan or to provide us with specific recipes.

These prompts can also be used to learn more about other ways to avoid food waste at home, adapting to each situation or need. From knowing what tips would be the best to prepare the weekly Tupperware in an afternoon, to designing a recipe to make the most of the last ingredients we have in the fridge, preventing them from going to waste.

One of the advantages of this type of conversational assistants is that they can be used intuitively, which facilitates the resolution of small day-to-day doubts.

Therefore, these prompt engineering concepts will be of great relevance in order to get the most out of LLMs, obtaining the most accurate answers possible, especially in such sensitive topics as health issues, emphasizing that this is only a support for day-to-day life and does not replace health or food professionals.

◾ In the second part, we will see how in the field of industry and the supply chain, data and artificial intelligence are also key tools for reducing food waste.

How to create realistic images using Generative AI
Telefónica Tech
AI of Things
How to create realistic images using Generative AI
November 23, 2023