mirror of
https://github.com/by-jp/www.byjp.me.git
synced 2025-08-09 18:06:07 +01:00
Chef-GPT
This commit is contained in:
parent
0fa5d94c21
commit
85795b1513
6 changed files with 85 additions and 19 deletions
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: "Chef GPT"
|
||||
title: "ChefGPT"
|
||||
emoji: 🤖
|
||||
date: 2024-03-15T19:13:34.952Z
|
||||
summary: I asked ChatGPT to give me a recipe for ingredients I had, cooked it and was unsurprised.
|
||||
|
@ -25,31 +25,97 @@ Thus the scene is set for my ChefGPT challenge…
|
|||
|
||||
## `sudo make me a meal`
|
||||
|
||||
I'm _extremely_ skeptical about Large Language Models (LLMs, or what the world is calling "AI" tis decade). They're eerily lifelike at responding to human questions, and can get in the right ballpark for answers most of the time, but their energy consumption (both producing and using them), their ethics (selective application of copyright), and their "intelligence" are all _highly_ questionable. But leaning about how they work, their limtations, and ow to recognise what they produce are all things I think will be very useful in the months and years ahead.
|
||||
I'm _extremely_ skeptical about Large Language Models like ChatGPT (LLMs, or what the world is calling "AI" this decade). They're eerily lifelike at responding to human questions, and can get in the right ballpark for answers most of the time, but their energy consumption (both producing and using them), their ethics (selective application of copyright), and their "intelligence" are all _highly_ questionable. But learning about how they work, their limtations, and how to recognise what they produce are all things I think will be very useful in the months and years ahead.
|
||||
|
||||
So I decided to ask [ChatGPT](https://chatgpt.openai.com) to give me a recipe to cook. I'm not the first and I won't be the last, but I want to document the process, the results, and my tasting notes so that I can look back and laugh in 25 years.
|
||||
|
||||
I wrote a prompt (and re-wrote it ~10 times, fiddling with the output) so that I'd end up with a recipe I could use in my favourite recipe app, [Mela](https://mela.recipes). In my prompt I included my general request (including my Zoe-taught guidelines), the ingredients I had to hand, and some details of [Mela's (awesome) file format](https://mela.recipes/fileformat/index.html), so it'd be easy to import
|
||||
I wrote a prompt (and re-wrote it a few times, fiddling with the output) so that I'd end up with a recipe I could use in my favourite recipe app, [Mela](https://mela.recipes). In my prompt I included my general request (including my Zoe-taught guidelines), the full list of ingredients I had to hand, and some details of [Mela's (awesome) file format](https://mela.recipes/fileformat/index.html), so it'd be easy to import and use.
|
||||
|
||||
> Give me a tasty recipe, that keeps glucose levels low, which I can make with any of the following ingredients I have:
|
||||
<details>
|
||||
<summary>If you like reading prompts meant for LLMs you can peek in here.</summary>
|
||||
|
||||
> Give me a tasty recipe, that keeps glucose levels low, which I can make with any of the following ingredients I have available:
|
||||
>
|
||||
> Smoked salmon
|
||||
> Gnocchi
|
||||
> Broccoli
|
||||
> Brussel Sprouts
|
||||
> Onions
|
||||
> Sweet Potato
|
||||
> Mushrooms
|
||||
> Butter beans
|
||||
> Almonds
|
||||
> Sunflower seeds
|
||||
> Hazelnuts
|
||||
> Sweetcorn
|
||||
> Chickpeas
|
||||
> Tuna
|
||||
> Smoked salmon\
|
||||
> Gnocchi\
|
||||
> Broccoli\
|
||||
> Brussel Sprouts\
|
||||
> Onions\
|
||||
> Sweet Potato\
|
||||
> Mushrooms\
|
||||
> Butter beans\
|
||||
> Almonds\
|
||||
> Sunflower seeds\
|
||||
> Hazelnuts\
|
||||
> Sweetcorn\
|
||||
> Chickpeas\
|
||||
> Tuna\
|
||||
> Tomatoes
|
||||
>
|
||||
> Give your answer in JSON format with the keys: `id` (a UUID), `title`, `text` (the description of the recipe), `images` (an empty array), `categories` (an empty array), `yield` (the yield as a string, eg. "4 people"), `prepTime` (the prep time, in the format 3h 30m), `cookTime` (the time to cook, in the format 3h 30m), `totalTime` (the total time to cook, in the format 3h 30m), `ingredients` (a list of ingredients, in metric measurements, separated with `\n`), `instructions`(one paragraph per step, separated by `\n\n`. It's very important you don't use numbers), `notes` (written in markdown, containing any other notes if any are needed), and `nutrition` (an empty string).
|
||||
|
||||
</details>
|
||||
|
||||
## Importing into Mela
|
||||
|
||||
ChatGPT _is_ impressive, in that it did produce a recipe for "Smoked Salmon and Vegetable Gnocchi Stir-Fry". It's definitely a low-glucose recipe, and in exactly the right structure to import into Mela. I copied it's response, put it in a text editor, saved it with a `.melarecipe` extension and openned it in Mela.
|
||||
|
||||
{{< figure src="recipe.webp" title="Mela's gorgeous user interface, inviting me to start a-cookin'. If you'd like to try the same recipe (🫣) then you can use the mela recipe data below, or [grab the PDF](recipe.pdf)." alt="A simple and elegant screenshot of the Mela recipe app showing the recipe generated by ChatGPT. You can read the recipe in the PDF linked to in this image's caption.">}}
|
||||
|
||||
<details>
|
||||
<summary>If you're the kind of person who likes reading JSON recipe files (hi friend!), then get a load of this!</summary>
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "bf30de65-8497-4d8a-93d1-fdcb9fc7b8ad",
|
||||
"title": "Smoked Salmon and Vegetable Gnocchi Stir-Fry",
|
||||
"text": "This recipe offers a delicious stir-fry featuring smoked salmon, gnocchi, and an array of low-glycemic vegetables. The combination of flavors and textures makes it a satisfying and balanced meal that won't spike glucose levels.",
|
||||
"images": [],
|
||||
"categories": [],
|
||||
"yield": "4 servings",
|
||||
"prepTime": "15 minutes",
|
||||
"cookTime": "20 minutes",
|
||||
"totalTime": "35 minutes",
|
||||
"ingredients": "200g smoked salmon\n400g gnocchi\n1 cup broccoli florets\n1 cup brussel sprouts, halved\n1 onion, sliced\n1 medium sweet potato, cubed\n200g mushrooms, sliced\n1/4 cup almonds\n2 tbsp sunflower seeds\n2 tbsp hazelnuts\n1/2 cup sweetcorn\n1/2 cup chickpeas\n150g butter beans\n1 can tuna, drained\n2 tomatoes, diced\n2 tbsp olive oil\nSalt and pepper to taste",
|
||||
"instructions": "Begin by boiling gnocchi in a large pot of salted water until they float, then drain and set aside. In a large skillet, heat olive oil over medium heat. Add sliced onions and cook until translucent. Next, add sweet potatoes, broccoli, and brussel sprouts, cooking until slightly tender. Stir in mushrooms, sweetcorn, chickpeas, and butter beans. Once the vegetables are cooked to your liking, add the cooked gnocchi and smoked salmon, stirring gently to combine. Toss in diced tomatoes and tuna, then sprinkle with almonds, sunflower seeds, and hazelnuts. Season with salt and pepper, and cook for an additional 2-3 minutes until everything is heated through. Serve hot and enjoy!",
|
||||
"notes": "* Feel free to adjust the vegetables based on personal preference or availability.\n* This recipe is versatile - you can add additional herbs or spices for extra flavor.\n* Ensure to check the label when purchasing smoked salmon to ensure it doesn't contain added sugars or sauces.",
|
||||
"nutrition": ""
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
So, the fact that it looks so good is _definitely_ Mela's fault (did I mention how much I like that app?), but nothing here looked like it'd kill me so I dug out my large skillet and got to work.
|
||||
|
||||
## The proof is in the eating
|
||||
|
||||
As I followed the recipe (I made sure not to read ahead too closely, to keep the sense of suspense alive) I began to realise ~~ChefGPT's first mistake~~ why a statistical word-picker won't be making your most loved recipes any time soon. It turns out my prompt "with any of the following ingredients I have available" ended up being interpreted more like "using exactly all of these ingredients".
|
||||
|
||||
So I got a _Smoked salmon, Gnocchi, Broccoli, Brussel Sprout, Onion, Sweet Potato, Mushroom, and Butter bean_ stir fry with _Almonds, Sunflower seeds, Hazelnuts, Sweetcorn, Chickpeas, Tuna, and Tomatoes_ on top. 🤷♂️
|
||||
|
||||
I kept going. For science.
|
||||
|
||||
I appreciated that the instructions were trivial to follow, and there was room for my expression as a sous-chef too. I decided to add a little water in the middle of step 3 to help the diced sweet potato soften up, and I ended up taking the advice in the notes and dropping the chickpeas and sweetcorn, to keep the carbohydrate count lower. All the while my apprehension was growing.
|
||||
|
||||
Finally, just over 35 minutes later (good timing guesses!), I plated up and got out my notepad.
|
||||
|
||||
{{< figure src="plating.webp" title="" alt="A photo of a serving of ChefGPT's work, smartly plated up in a pasta bowl, knife and fork either side." >}}
|
||||
|
||||
It… wasn't bad? I mean, there aren't many ways you can screw up a stir fry, so a safe choice there for sure. It was definitely edible, and even enjoyable perhaps?… to a point.
|
||||
|
||||
Where it started to fall down is the exact same place I see LLMs fall down when I've used them as a "co-author" of software. A statistical word-picker isn't _thinking_, so has no sense of composition or balance.
|
||||
|
||||
This was very clear as I smelled my creation — _wow_, definitely tuna there. It wasn't gross by any means, but there's no part of that tuna which was matched or blended into other aromas to make something interesting and new. Even the "pepper to taste" didn't keep that initial dominating smell at bay.
|
||||
|
||||
As I took my first mouthful I noticed that the butter beans, slightly undercooked, combined with the various nuts made for a very aggressive texture mismatch; soft, silty beans with hard, crunchy almonds and hazelnuts was definitely a novel experience.
|
||||
|
||||
But, after these few eyebrow-raising moments, I realised I could stop cringing, it was actually pretty tasty; the flavours were all good, even if they weren't exactly jamming together.
|
||||
|
||||
{{< figure src="joey-trifle-good.webp" alt="An animated clip from the TV show Friends. Joey is describing the layers of an uncoventionally constructed trifle as he eats it: \"Custard, good. Jam, good. Meat… gooooood!\"" >}}
|
||||
|
||||
Despite the lingering dominance of the tuna, the total absence of the smoked salmon, and those textural WTF moments, I really enjoyed this adventure, and might even get ChatGPT to offer ideas in the future—in emergencies, and with some heavy editing.
|
||||
|
||||
Even so, this recipe did give me some interesting ideas around adding hazelnuts into other dishes; the mellow flavour that came from them spending a little time steaming next to the veg was really enjoyable. I'd probably toast and crush them though, to minimize that jarring texture clash.
|
||||
|
||||
This recipe did become a member of the [clean plate club](https://www.youtube.com/playlist?list=PLdAiyt6EtZP4wkMoQIHp2h00Ta9PyBtdi), but it's not one that'll be staying in my library. When I put the recipe into Zoe it declared a commendable score of 65/100 in matching my dietary needs, putting it squarely in the "Enjoy regularly" category. Thanks, but no thanks Zoe.
|
||||
|
|
BIN
content/posts/chef-gpt/joey-trifle-good.webp
Normal file
BIN
content/posts/chef-gpt/joey-trifle-good.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 581 KiB |
BIN
content/posts/chef-gpt/plating.webp
Normal file
BIN
content/posts/chef-gpt/plating.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 117 KiB |
BIN
content/posts/chef-gpt/recipe.pdf
Normal file
BIN
content/posts/chef-gpt/recipe.pdf
Normal file
Binary file not shown.
BIN
content/posts/chef-gpt/recipe.webp
Normal file
BIN
content/posts/chef-gpt/recipe.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
|
@ -13,7 +13,7 @@
|
|||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||
<figcaption>
|
||||
{{ with (.Get "title") -}}
|
||||
<p>{{ . }}</p>
|
||||
<p>{{ . | markdownify }}</p>
|
||||
{{- end -}}
|
||||
{{- if or (.Get "caption") (.Get "attr") -}}<p>
|
||||
{{- .Get "caption" | markdownify -}}
|
||||
|
|
Loading…
Reference in a new issue