Group Abstract Group Abstract

Message Boards Message Boards

[WSG26] Daily Study Group: Computational Food and Nutrition

Posted 5 months ago
POSTED BY: Gay Wilson
10 Replies
Posted 2 months ago
POSTED BY: Gay Wilson

During the presentation today Gay used several LLM related functions. In order to use these functions you will need a subscription to the LLM Kit or an API key from an LLM provider like OpenAI.

You can read more about the LLM kit here: https://www.wolfram.com/notebook-assistant-llm-kit/

The support articles below walk through the steps use an API key from an LLM provider, or how to set up the LLM kit.

https://support.wolfram.com/67504 https://support.wolfram.com/62525

POSTED BY: Luke Titus
Posted 3 months ago

Thanks so much Jim for the excellent suggestion yesterday to offer a food and nutrition course that incorporates the Wolfram Language quiz and assessment functions (https://reference.wolfram.com/language/ref/AssessmentFunction.html). Great idea, and I look forward to following up on that.

POSTED BY: Gay Wilson
Posted 3 months ago

Today's session "Recipe Management with LLMs" will include three resource functions from the Wolfram Function Repository: RecipeGraph, RecipeRiskAnalysis and BlendSpices. I have downloaded and attached the source notebooks from the repository if you would like to review the LLM prompts for each. I'm hoping these prompts will be a good starting point for you to design your own recipe, food or nutrition LLM functions. Please let me know if you see ways I can improve my prompts.

POSTED BY: Gay Wilson
Posted 3 months ago

To follow up on our discussion of nutrients in raw vs cooked carrots, I created the attached notebook, which demonstrates how to compute the difference in beta-carotene using the entities for "raw carrot" and "cooked carrot." Since beta-carotene is a precursor of vitamin A, I converted the results to vitamin A and compared with the RDA for vitamin A.

Also in the notebook, lycopene in tomatoes is another good example of higher concentration in cooked form, due to breakdown of the cell walls and water loss during cooking.

I hope the notebook is a good template for investigating more nutrients and foods!

Attachments:
POSTED BY: Gay Wilson
Posted 3 months ago

Gay,

Thanks very much for the notebook about carrots! Very interesting.

Bob

POSTED BY: Bob Renninger
Posted 3 months ago

Hi Bob,

I'm glad the notebook is useful. Cooking method is such an important part of nutrient content, but it's been tricky to make nutrient retention computable. I would love to see any work you do in this area.

Gay

POSTED BY: Gay Wilson
Posted 3 months ago

Thanks today for the question about customizing a nutrition report to include fiber. Here's an example of how to specify which nutrient properties you want in the report:

ResourceFunction["NutritionReport"][{"250g oats", "100g sugar"}, 
 "NutritionProperties" -> {EntityProperty["Food", 
    "AbsoluteTotalCaloriesContent"], 
   EntityProperty["Food", "AbsoluteTotalCarbohydratesContent"], 
   EntityProperty["Food", "AbsoluteTotalFiberContent"]}]

A notebook is attached.

Attachments:
POSTED BY: Gay Wilson
Posted 3 months ago
POSTED BY: Gay Wilson
Posted 3 months ago

Thanks so much to everyone who attended today's Daily Study Group! I had a great time and look forward to our discussion tomorrow, including informative and creative ways to visualize nutrition data.

POSTED BY: Gay Wilson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard