Ask the experts: sourcing a high-quality nutrition counseling dataset through Human- AI collaboration (2024)

Abstract: Large Language Models (LLMs) are being employed by end-users for various tasks, including sensitive ones such as health counseling, disregarding potential safety concerns. It is thus necessary to understand how adequately LLMs perform in such domains. We conduct a case study on ChatGPT in nutrition counseling, a popular use-case where the model supports a user with their dietary struggles. We crowd-source real-world diet-related struggles, then work with nutrition experts to generate supportive text using ChatGPT. Finally, experts evaluate the safety and text quality of ChatGPT’s output. The result is the HAI-coaching dataset, containing ~2.4K crowdsourced dietary struggles and ~97K corresponding ChatGPT-generated and expert-annotated supportive texts. We analyse ChatGPT’s performance, discovering potentially harmful behaviours, especially for sensitive topics like mental health. Finally, we use HAI-coaching to test open LLMs on various downstream tasks, showing that even the latest models struggle to achieve good performance. HAI-coaching is available at https://github.com/uccollab/

hai-coaching/

## introduction publicly accessible llms have become increasingly popular for their ability to produce fluent text from textual prompts @xcite . this flexibility makes them appealing tools for endusers, who use them even for sensitive tasks like health recommendation, self-diagnosis and counseling @xcite . these use cases are implicitly dangerous, as llms can hallucinate and output harmful suggestions @xcite @xcite . end-users underestimate these risks, to the point of actively circum-venting vendors' safeguards @xcite . an example is nutrition counseling @xcite , the process where a client struggling with their diet-related issues receives personalised guidance and suggestions (usually from registered dietitians). llms are being actively used in this scenario today @xcite . this leads us to run a case study on llms applied to nutrition counseling, specifically on chatgpt, one of the most predominantly used models. as there is no public dataset on nutrition counseling, we source one through our case study, and investigate three main research questions (rq): first, we crowdsource a dataset of dietary problems people experience in their lives. then, with the help of nutrition experts, we prompt chatgpt to generate nutrition counseling texts. finally, our experts evaluate the text quality (e.g. fluency and humanlikeness) and the safety of chatgpt's output. our work is an instance of human-ai (hai) collaboration, culminating in the creation of the first public nutrition counseling dataset, hai-coaching. the following is a summary of our contributions: ## requirement analysis to identify what text characterises nutrition counseling (rq1), we start by defining the issue the client might be struggling with: struggle: a difficult situation, challenge or issue that someone is experiencing with any topic having a direct or indirect effect on their diet. we then identify what text could help the client, which we refer to as "supportive text". we review related work on behaviour change and nutrition, such as surveys @xcite , nlp applications @xcite @xcite , pre-existing taxonomies @xcite and definitions @xcite @xcite . then, we cross-check our results with two nutrition experts (full experts' details in appendix a), obtaining the following text categories: reflection: a short summary of the client's struggle to convey that they are being heard and understood @xcite . comfort: positively supporting the client, making them feel understood @xcite . reframing: helping the client see the struggle in a more positive way @xcite . suggestion: providing practical advice to deal with the struggle @xcite . these text categories answer rq1. then, we work on obtaining a dataset containing both struggles and associated supportive text. ## struggles collection we crowdsource struggles (rq2) from on amazon mechanical turk and prolific, asking the workers to write about three individual struggles they experienced related to diet, healthy eating, or other related topics. besides the struggles, we capture the workers' demographics which we report in appendix b. to exclude fraudulent workers, we adopt a mix of completion time control, text quality check and attention questions. we provide a full ethics statement (including recruitment, workload, and pay) in appendix c, and details on our annotation interface and sanity checks in appendix d. overall, we accept the work of 816 cluster size topics example craving_habit 429 (17.7%) unhealthy eating habits; cravings for unhealthy food; "i love chips. and it's the only food that i can't say no to. after all day of eating healthy i just have this huge craving for chips and very often i eat them." energy_effort _convenience 380 (15.7%) eating unhealthy out of convenience (e.g. time and energy); "making healthy food in your home is more time consuming so i often order takeout because it's faster." emotions 340 (14%) unhealthy choices driven by feelings "eating sweets is my way of dealing with difficult emotions like anger, depression or stress. it's an easy way to give me a boost of serotonin but after eating i feel guilty and i'm mad at myself." social 322 (13.3%) social pressure (e.g. invitations to eat out, friends, family) "when other people go with me to eat in the city i feel that i must eat with them. they sometimes encourage me to order something unhealthy." motivation 257 (10.6%) lack of motivation "i struggle sticking to a consistent workout routine. it can be hard to find the motivation to exercise [...]" portion_control 190 (7.9%) irregular eating patterns; portion over/underestimation; "i like to cook. it makes me happy but i don't like to waste it so sometimes i force myself to eat." situational 125 (5.2%) external factors impacting diet, independent from willpower "my issue is with working out. i have a very stressful job where i take care of many things and afterward don't have time to hit the gym or go swimming which is terrible because i know it would help." mental_health 101 (4.2%) struggles attributable to mental health "i have depression and anxiety disorder so i'm in treatment. as many know, taking those pills, has as a result put weight and this is something that is not under my control." not_applicable 98 (4%) unusable text (e.g. not a struggle; not enough details) "can't focus. it is bad because i cant get the best grades or do something 100% focused, sometimes it makes me sad because i know i could things better than i am doing." diet_plan_issues 95 (3.9%) issues with specific, unsustainable, wrong or extreme diet/workout; "i'm doing a [...] flexible diet which is also difficult to stick to even though junk food is allowed as it means having to weigh out everything and calculate the macros [...]. gets frustrating quite quickly." knowledge 44 (1.8%) lifestyle impacted by low nutrition/exercise literacy; "my struggle was choosing healthy food in shops [...] check the ingredients [...] consulting an app, asking the staff whether 'is it healthy'[...] after spending 20 minutes buying cauliflower, i just went straight to the snacks section and i bought myself a candy bar." phys_health _condition 39 (1.6%) healthy lifestyle affected by medical conditions; "i am pregnant and i developed mild gestational diabetes [...] i have to avoid sugars and carbs which is hard to do while craving fast foods and desserts." to better inspect the range of topics the collected struggles cover, we cluster them through topic modelling @xcite , in collaboration with the experts. first, we automatically cluster the struggles by combining hdb-scan @xcite and umap @xcite , via the chat-intents package. we use this approach as other algorithms, like lda, are known to perform poorly with longer texts and expect a pre-defined number of clusters @xcite . we then refine our result through thematic analysis @xcite : we manually check the automatically obtained clusters and adjust them with the experts. this results in 12 distinct clusters/topics, shown in ## supportive text collection & evaluation we source supportive text from llms (rq2). we use chatgpt (openai, 2022) (gpt 3.5, accessed between november 2022 and march 2023). our task is to generate, for each struggle, a tuple containing multiple candidates for each supportive text @xcite . this requires prompt engineering, because of the known llms' sensitivity to prompt wording @xcite . we then evaluate the obtained supportive text quality and safety (rq3). for text quality, we choose the following metrics @xcite ): to the best of our knowledge, there is no previous work on evaluating text safety in our domain, mainly because it varies with topic, counsellor's school of thought and client's sensitivity. this implies that advanced domain knowledge is required to distinguish safe from unsafe supportive text. as the same can be safely assumed for evaluating text quality and spotting output improvements during prompt engineering, we collaborate with a team of 13 nutrition experts (details in appendix a) for these tasks. prompts chatgpt experts struggles obtained from diet-related subreddits struggle + instructions to generate supportive text safety annotation + feedback experts' feedback is used to update the prompts supportive texts prompt engineering final prompts struggles from reddit prompt engineering and safety annotation as our prompt engineering phase started concurrently with crowdsourcing, we manually sourced a small dataset of dietary struggles from reddit. 1 we do not release this dataset for privacy reasons. we first develop a starting prompt for each text category defined in section 3 and use it to generate a small batch of supportive text. we then ask the experts to mark their safety as a binary label, and discuss and compare their annotation together. we use this feedback to improve the prompts and start the cycle again. we ask each expert to annotate safety based on their professional background, and let them align over a single definition through the postannotation discussions. doing so, we start from a generic concept of safety, which gets progressively modelled by the experts' combined input, professional background and mutual interaction. more details on prompt engineering are in appendix f. ## the hai-coaching dataset with expert annotation concluded, we introduce hai-coaching, the first publicly available expert-annotated dataset for nutrition counseling. ## nlp applications of hai-coaching finally, we cover three nlp tasks making use of hai-coaching. for all tasks we report prompts, training parameters and other details in appendix i. our code is available in the hai-coaching repository. struggle classification we first model struggle classification, where the model receives a struggle as input and classifies it as one of 12 topics obtained in section 4. this task can be useful as a pre-screening tool for experts to assess the initial struggles of their clients. we test three baselines (logistic regression -lr, random forest -rf and support vector machine -svm), two small fine-tuned lms (bert @xcite , and roberta @xcite ) and three instructiontuned llms (mistral 7b @xcite , llama 3 8b (ai@meta, 2024), and phi 3 mini @xcite ). for instruction-tuned llms, we test zero-shot and few-shot to evaluate their basic capabilities, then do fine-tuning. we adopt a 70:5:25 train-validation-test split, pairing each struggle s with its cluster label l and producing an example results in we further analyse this by comparing the best zero-shot and fine-tuned models (mistral 7b and llama 3 8b) in figure 7 . overall, performance of even our best models is far from the high accuracy standards that are typical of healthcare, and there may be multiple reasons for this. first, the struggles' ambiguity may play a role: candidates from energy _ effort _ convenience are often misclassified as motivation, or situational, with models struggling to understand whether unhealthy choices depend on the client's will. also, smaller clusters may lack a reasonable amount of examples to yield good results. finally, as we report in appendix e, struggles can cover multiple topics at the same time, which may further confuse the models. safety classification next, we model safety classification, where a model annotates supportive text candidates' safety. this task can be used for data annotation, in learning environments, or to assist experts. training examples are in the same form as struggle classification, with the training pair containing safety annotation instead of the topic. in the case of safety classification, we have a much higher amount of training samples (one for each chatgpt candidate), so we adopt a 90:5:5 train-validation-test split. we do not include baselines and smaller lms because of their inadequacy. 2 for few-shot, we sample one safe and one unsafe example from hai-coaching. results in supportive text generation finally, we model supportive text generation, where a model receives a struggle and generates candidates for each text category. this task can assist nutritionists and reduce their workload. we test two small fine-tuned lms (gpt-2 medium @xcite and baby llama @xcite ) and five 2 baselines scored too low on metrics to be usable, and small lms showed severe underfitting during training. for evaluation, we compute bleu @xcite , bleurt @xcite , and perplexity on the test set. bleu and bleurt are scored against all available safe candidates. we calculate mean bleurt by averaging, for each generated output, over the highest scoring safe candidates (max) and over all safe candidates (mean). from results in while fine-tuned models clearly learn the form and content of hai-coaching ( ## conclusion and future work in this case study we investigated the performance of chatgpt in nutrition counseling, by creating hai-coaching, the first public nutrition counseling dataset containing ∼2.4k crowdsourced diet-related struggles, and ∼97k chatgpt-generated supportive texts expert-annotated on safety. from our evaluation, chatgpt shows impressive generation capabilities, but experts pointed out critical elements, like the generation of useless text, lack of struggles' understanding and reinforcing harmful stereotypes. experts attributed these issues to low-quality training data scraped from online websites. the unanimous verdict was that chat-gpt is not ready for unsupervised deployment in nutrition counseling. we also presented a series of nlp downstream tasks based on hai-coaching, evaluating prompted and fine-tuned open llms. our results show that for text classification, models struggle to achieve good performance; for text generation, output looks promising but shows repetitiveness and non-adherence to category. for future, work, we plan to run a human evaluation for an additional and more comprehensive assessment, and additional annotation to exclude useless candidates.