
Catalogue Kitchen
Generative AI Recipes from Catalogue Specials
I need to build a thing to recalculate ingredients - the prices on the non-catalogue items are wrong, the macro counts are wrong, or there’s things like “1 broccoli” when it should be “100g broccoli” (or whatever one broccoli roughly weighs so you can recalculate at home). There’s also inconsistency, where one recipe will mention “flour” at three prices, or “flour”, “all purpose flour”, “white flour”, etc. and it’s the same thing but again at three prices.
A good example is a schnitzel recipe and a parmigiana recipe that give “Bread crumbs” and “Breadcrumbs” at two different prices


Regeneration Steps
So, I think the steps to recalculation are as follows:
-
Add ability to edit ingredient name in dashboard (done)
-
Dump all ingredients to CSV / editable screen
-
Read CSV back in and recalculate prices and:
- Recalculate pricing and macros for each ingredient
- Recalculate pricing and macros for total and per serving
Challenges:
- Mixed units in the pricing information in the generated recipes - eg, 2 eggs from $3/dozen, 200g from $4/kg. I can’t just do A*B=C
- I should update the prompt for recipe generation so that it outputs “Special / Item price” and “per unit” price. Like, the special might be "2x1kg packs for $3" and so the price is then $1.50 per kg, but the actual "unit" might be grams.
- should I just send the recipe back to chatGPT with the updated information (and leave it at $1.50 per kg) or attempt to do the math programatically? I feel like there are only so many edge cases for this - tsp/tbsp/mL/L, g/Kg, and then a bunch that are "per item" (eggs and...? others. Tortillas? Baguette?)
- And baguette isn't a standard unit of measurement. They come in all sizes. So if I want to give users a calculator at the end of this, do I need to allow them to say "(1) x (400)(g) baguette is (1000)cal 20(g) protein, 20(g) fat, 200(g) carb"... an extra qty field? Oh man, and what about the US and all their weird fucking measurements for things. Use metric. Seriously. These sort of questions make me want to burn it all down. Need to stay focused on critical path.
- How to add extra ingredients to a recipe. I’ve noticed some of the recipes are missing some very obvious ingredients. I think this is an effort to keep pricing low, but like, this banh mi is clearly missing ingredients (no pate for example). And there are other cases where the meal is like $13 cost for 4 serves but looks kinda bland/boring. Rather than me doing this manually I should add another flag to send the recipe back to AI with new ingredients

I've been keeping a devlog in notion, but I think it's time to move it here. The question is really whether this is a suitable platform for creating devlogs.
Like can I create an image? I can't see any formatting options. If I hit paste from my clipboard, no image gets pasted in. This is probably intentional.
Okay, markdown is supported, so means I need to throw things on imgur first I guess

Truth be told, that's kinda annoying. I like the timeline feature of IH, but man some editing tools would be rad
2 Likes
Comment
About
After writing an insanely complex ChatGPT prompt to generate recipes from a local grocer's weekly specials catalogue, I thought to myself, "I bet other people would find this useful" and so built a thing

Comment