News for hackers. Stuff that matters.
Re:Show HN: Nutrient insights through your grocery receipts by shafyy on Sunday January 21, 2024 @08:39AM (#39078327)
This is cool. As you said, my recommendation would be to not use ChatGPT to get the nutrition data, but use one of the databases that have good APIs such as USDA's Food Data Central [1]. This is domain where there's structured data and it's important that the output is deterministic, so a LLM is not a good choice.

I once started working on something similar, but the goal was to suggest a list of ingredients for me to buy for the week so that I had a good total nutritional values. I don't work on it anymore though.

1: https://fdc.nal.usda.gov/index.html

Re:Show HN: Nutrient insights through your grocery receipts by sanitycheck on Sunday January 21, 2024 @09:15AM (#39078584)
I'd second this, I just gave it a try and many of the results in the receipt breakdown did not seem to align with the nutritional information available from other sources.

Also, if it's going to give protein advice it should probably recognise meat - unless it's aimed solely at vegetarians & vegans. My receipt had a whole chicken, a lamb shoulder, and a couple of different kinds of fish - but it said I was getting 0 protein and recommended quinoa.

Re:Show HN: Nutrient insights through your grocery receipts by shafyy on Sunday January 21, 2024 @09:53AM (#39078944)
Haha, love its passive-aggressiveness. Lowkey pushing people to plant-based diets :D
Re:Show HN: Nutrient insights through your grocery receipts by throwup238 on Sunday January 21, 2024 @12:22PM (#39080430)
This is how we eventually get Soylent Green.
Re:Show HN: Nutrient insights through your grocery receipts by lelandfe on Sunday January 21, 2024 @01:58PM (#39081612)
“Fun tip, you have plenty of protein right at home!”
Re:Show HN: Nutrient insights through your grocery receipts by assadk on Sunday January 21, 2024 @02:26PM (#39081979)
> I once started working on something similar, but the goal was to suggest a list of ingredients for me to buy for the week so that I had a good total nutritional values. I don't work on it anymore though.

Cronometer has a feature that does this – it checks to see where you aren't hitting your daily targets for macro/micronutrients and then suggests foods that would allow you to hit those targets. Quite nifty.

Re:Show HN: Nutrient insights through your grocery receipts by shafyy on Monday January 22, 2024 @08:42AM (#39089406)
Yes, that's what I ended up using, too! The goal for my project was just to build something as a side project (I was experimenting with Deno and Fresh at that time), not necessarily because I couldn't find an existing alternative.

I tracked my intake for 1-2 weeks with Cronometer and it helped me see what kind of minerals and vitamins I might be missing. I mean, these things are "ballpark" only anyways, and I wouldn't have the discipline to track my every meal. But good to get a general idea - kind of like a check-up, just doing it from time to time.

Re:Show HN: Nutrient insights through your grocery receipts by elchead on Tuesday January 23, 2024 @02:15AM (#39100458)
I had this database in mind too, thanks! Btw Bard has deterministic output as I learned