Personalizing Weekly Diet Reports (2022)

Abstract: In this paper we present the main components of a weekly diet report generator (DRG) in natural language. The idea is to produce a text that contains information on the adherence of the dishes eaten during a week to the Mediterranean diet. The system is based on a user model, a database of the dishes eaten during the week and on the automatic computation of the Mediterranean Diet Score. All these sources of information are exploited to produce a highly personalized text. The system has two main goals, related to two different kinds of users: on the one hand, when used by dietitians, the main goal is to highlight the most salient medical information of the patient diet and, on the other hand, when used by final users, the main goal is to educate them toward a Mediterranean style of eating.

## introduction the diet has a huge impact on the health of people, and a number of studies have tried to apply artificial intelligence techniques to this domain. on the one hand, there is a growing interest in applying computational techniques in all the aspects of food production, monitoring, consumption @xcite . on the other hand, diet is one of the main factors influencing human health and it has been studied in the field of health informatics @xcite . in the domain of health, it has been shown that one of the main risk factors in the onset of chronic diseases lies in the adoption of an unhealthy diet @xcite . specifically, following a mediterranean diet provides many health benefits @xcite @xcite . however, following a diet is often difficult both for the specific complexity of the domain, and for the human tendency to transgress on eating behaviors @xcite . a diet can be seen as a set of quantitative or qualitative rules and constraints, and technological tools could support users both in keeping track of the historical data and of the user progress, and obtaining motivation by means of their educational and persuasive roles. a virtual dietitian that reasons about eaten meals and that communicates through natural language suggesting corrective actions can be helpful in this task. the multimedia application for diet management @xcite @xcite ) (madiman foot_0 ) was born in 2015 in order to build a virtual dietitian that is able to: (i) let the user choose the meal to eat through a mobile application, (ii) analyze the ingredients of the recipe and their quantity through the nlu module, (iii) evaluate the compatibility of the chosen meal with the principles of a diet through the reasoner module, (iv) determine what the consequences of eating a particular dish are, (v) show these consequences to the user through natural language with messages for educational and informational purposes and motivating users to pursue their goals. a recent development of madiman @xcite concerns the integration of the mediterranean diet score (med score henceforth) originally proposed in @xcite . by using a food ontology, madiman is able to reason both (i) on macronutrient-based constraints typical of medical diets (e.g., eat 0.8 g of proteins per kilogram of body weight per day), and (ii) on food-based constraints typical of mediterranean diet (e.g., use daily olive oil in cooking). the med score (0-55) is based on the specific scores (0-5) obtained over the consumption of 11 food categories during a week. some categories prescribe to eat no more than a limit (e.g., no more than 2 portions of red meat per week), and others not less than a limit (e.g., not less than 5 portions of fish per week). the madiman system includes modules that accompany the user in real-time in the contingent choices of individual meals, but a drawback is the absence of a summary that allows the user to consolidate the results obtained at the end of the week. furthermore, the implementation design lacks a proper personalization of the messages, since the nlg module does not take into account any personal data/preferences or the emotional state of the users. this work has the intent to fulfill this limitation by producing a longer weekly report that educates the user. this automatic report is built with a higher degree of personalization, by formalizing different user models, in order to support different types of users who can access the platform and to implement the related communication strategies. consequently, the information flow analyzed so far is enriched with a long report, which is sent to the user in the form of an e-mail on a weekly basis, in order to represent the habits held in the past week and to suggest which behaviors to encourage for the future and which ones to avoid. the main research goal of this paper is to evaluate the impact of personalization on the quality of automatically generated weekly diet reports. with this aim, we first describe the main design choices in the drg system and then we give the results of a preliminary evaluation of the system. the paper is structured as follows: in section 2 the concept of user model is introduced and its implementation is described. in section 3, we describe drg, a multilingual (italian/english) generator that follows the typical modules of an automatic nlg system, in relation to the persuasiveness and the educational impact of the generated messages. in section 4, we provide the results of an initial evaluation of the system and, finally, in section 5 we conclude the paper describing some ongoing developments. ## the user models in the domain of e-health, personalization can play a role for achieving some form of engagement @xcite , and user models play a key role in personalizing automatically generated messages. for the diet domain, a user model contains both personal information about the health status (e.g. weight) as well as user's preferences on specific topics. in particular, drg has been designed by considering two specific categories of users, that are the patients and the dietitians. the personalization of the messages is based on the different goals that these two kinds of users have. note that in the first case the personalization needs to consider just the patient user model, but in the second case the personalization needs to consider both the dietitian (the message addressee) and the patient (the message topic). on the one hand, the messages generated by drg for patients have to be informative, motivational and educational. the final goal of the system is to educate the patients toward a better understanding of the mediterranean diet principles using an emotional engaging language based on some psychological heuristics. on the other hand, the messages generated by drg for dietitians, that are medical specialists on nutrition (in some cases physicians), should be as short as possible, should contain information just on bad behavior of the patient, and should use a technical lexicon without emotional content. note that we decided to not communicate information on the good behavior to the dietitians since we think that in a support system for an expert is more important to produce a summary of the problems. however, if a dietitian prefers otherwise, it is possible to adopt a different policy by changing the drg configuration. on the basis of these differences, the patient user model contains: (1) numerical personal/medical information on the user, storing sex, age, weight, height, and bmi (body mass index); (2) a 1-to-4 point scale for representing the stress level based on the dass-21 questionnaire @xcite ; (3) a boolean variable representing the interest of the user for food sustainability, that is a sort of sensitivity to environmental issues. using this source of information we can produce a specific personalization for the specific patient. in contrast, with the aim to produce a technical message, all the dietitians, for a specific patient, will read the same message. following @xcite , we divided the generation process into three macro-phases implementing the specific generation tasks. the text planning phase implements the selection of information units to communicate (content determination) and the order in which they appear (text structuring). the creation of these information units follows the idea to aggregate together semantically equivalent information. the different categories of food are aggregated based on their scores over four different possible values: very good, good, bad and very bad. text structuring decides in which order the information should be presented: following the socalled sandwich technique, we communicate the units following the very good, bad, good, very bad order, that is alternating a positive and a negative communication. in figure 2 we report an example of text plan. note that the text plan contains the med score value, computed by the reasoner, rather than the frequency of consumption of each food category. in section 3.1, we give some details on the lexicalization that personalizes the sentences on the basis of some emotions. ## initial evaluation of drg we are aware that message personalization does not always correspond to an effective improvement for the end user @xcite . so, in order to evaluate drg, we performed two different evaluations. a first preliminary evaluation consisted in submitting a number of italian and english texts generated by drg to an adjunct professor of dietistic (henceforth, the expert). the evaluation was set up by generating ten different reports simulating the diet of ten patients. these simulations consist in randomly selected dishes from a database of recipes recovered from well-known web sites (e.g. bbc food). for eight simulations, drg generated a report personalized for the patient, and for two simulations drg generated a report personalized for dietitians. by considering the specific user for which the text is generated, the expert had to evaluate a report in terms of: (i) readability, that consists in the linguistic quality of the report, (ii) accuracy or content quality and (iii) usefulness, that is the effective educational support that the system could provide to the patient. the general feedback of this first evaluation was positive, with a good level for all the three measurements. however, the expert suggested to improve the system in three directions: (i) to integrate the med score with information about macro/micronutrients (i.e. cholesterol, proteins, etc.); (ii) to provide more details about the ingredients; (iii) to enhance the personalization considering the patient's bmi. a second preliminary and still ongoing evaluation was performed only for italian language to have the patients' feedback. similarly to the first evaluation, drg generated four texts for four different patients, on the basis of a simulation consisting of randomly selected dishes. moreover, we built a baseline text by simply listing all the information contained in the text plan (cf. figure 2 ). in the evaluation was set up in the form of an online form with the testing hypothesis that the users would prefer highly personalized report over the italian version english version drg ciao, davide. questa settimana hai ottenuto un med score pari a 23 su 50 e, inoltre, sei peggiorato dalla scorsa settimana. non mollare! la quantità di patate, pesce ed olio era quasi eccellente. e inoltre hai fatto un lavoro fantastico con cereali e verdura. la merenda di venerdì era una scelta eccellente perché il piatto king ranch chicken casserole ha una buona quantità di cereali e verdura. gli esperti sconsiglierebbero il piatto creamy au gratin potatoes che hai mangiato il lunedì scorso a colazione perché la quantità di latte e derivati non è buona. ricorda: una pessima dieta uccide più del fumo. hi davide. this week you got a med score of 23 out of 50 and, furthermore, you have not improved since last week. do not give up! the amount of potatoes, fish and oil was almost excellent. furthermore, you've done a fantastic job with cereal and vegetables. friday's snack was an excellent choice because the king ranch chicken casserole dish has a good amount of grains and vegetables. experts would advise against the creamy au gratin potatoes dish you ate for breakfast last monday because the amount of milk and derivatives is not good. remember: a bad diet kills more than smoking. baseline questa settimana hai ottenuto i seguenti punteggi: -med score: 23 su 50 -carne rossa, latticini e carne bianca: 0 su 5 -legumi e frutta: 1 su 5 -pesce: 3 su 5 -olio e patate: 4 su 5 -cereali e verdura: 5 su 5 -migliore piatto: king ranch chicken casserole -peggior piatto: creamy au gratin potatoes this week you obtained the following scores: ## conclusions and ongoing work in this short paper we presented the main properties of drg, that is a symbolic natural language generation system for building weekly report on mediterranean diet. we are still evaluating our sys-readability accuracy usefulness drg 5.65 5.3 5.45 baseline 5.45 5.75 5.55