Food / Technology

ChatGPT a recipe for culinary disaster

14:47 pm on 16 March 2023

What do you think this is a picture of?

Photo: Carolyn Robertson

According to ChatGPT, it’s ‘a delicious bowl of creamy pasta with shrimp and mushrooms’. Or it could be ‘a delicious and healthy salad with mixed greens, cherry tomatoes, grilled chicken, hard-boiled eggs, avocado, and a balsamic vinaigrette’.

If, like me, you’re wondering if you need your eyes tested, rest assured that the image is of a chocolate cake. It’s one I made and styled for a shoot with Wellington photographer Carolyn Robertson in early 2021 for my recipe book, Homecooked (yes, we ate it afterwards).

As a recipe writer, news that the latest iteration of artificial intelligence chatbot ChatGPT can create recipes from images alone feels like a very personal version of ‘the robots are coming for our jobs’. Discovering that it identified my sour cream, red wine and chocolate cake as shrimp and mushroom pasta felt like a satisfying win for humankind.

Even so, I thought it was best to be fair: I tested the bot’s ability to identify a bowl of mayonnaise ("that looks like a delicious and healthy salad") and Nadia Lim’s banana honey ice cream ("based on the photo you provided, it looks like a spaghetti pasta with a tomato-based sauce, Italian sausage, and fresh basil"). Umm, nope.

Pumped Miso Ginge Pumpkin Soup Photo: supplied

When I tried the cake recipe again, in another ChatGPT conversation, it told me in very specific terms that it was a salad with myriad ingredients. It had more success with a recent recipe by Sam Parish, correctly identifying it as soup (though failing to spot that it was pumpkin).

While it’s undoubtedly amusing that it was so wrong, ChatGPT generated recipes for these dishes in less than 30 seconds. In each case, the recipes were clear and easy to follow. Sure, they used American culinary terms and imperial measurements, but so do at least half the recipes you’ll turn up in an average recipe search on the internet.

When I asked ChatGPT how it knew how to create all these recipes – and so quickly – it came back with an efficient response:

"As an AI language model, I have been trained on a vast amount of text data, including recipes, cooking techniques, and culinary terminology. This data allows me to generate recipes and provide cooking advice based on the information provided to me."

That’s all well and good, but it doesn’t feel right to me. Tash McGill, president of Food Writers New Zealand, has concerns too.

Tash McGill Photo: Supplied

McGill says authenticity is the missing ingredient in AI-generated recipes.

“On one hand, they can present completely original content, but they don’t necessarily have the trustworthiness of a recipe with headnotes and a pathway of provenance.

“You use a recipe because it’s meant to be a guaranteed equation. How do you know that a ChatGPT recipe is going to work?”

McGill says that while AI has exciting applications in food production, in terms of how machine learning can be used to discover flavour matching and flavour expansion possibilities, AI-generated recipes can easily stray into issues with cultural appropriation or untested techniques.

She says human recipe writers need to "double down" on authenticity to make their work relevant and trusted.

"They have to be storytellers to show why a recipe is more than a set of ingredients and a method."

Sarah Tuck, food writer and editorial director of SCG Media, which publishes Dish magazine, says she's been unimpressed with ChatGPT's recipes so far. 

"Unless recipes are tested for guaranteed success, I would avoid using it. I think in the main the relationship between a recipe creator and the cook is based on a level of trust, which is why people will generally go to those they trust – Donna Hay, Jamie Oliver, Nigella Lawson, Dish et al."

When I take ChatGPT to task for misidentifying recipes based on the images, its response is lightning-fast.

"Oh, I apologize for that! As an AI language model, my interpretation of images is not perfect, and I rely on the text description provided to me. I'm sorry for any confusion I may have caused."

Then it gives me a pitch-perfect explanation of how to make mayonnaise, including (when prompted) how to prevent it from splitting. I can’t fault its advice, or its impeccable manners. It’s like being in the kitchen with C-3P0.

Later, I tell it that I'd like a recipe for a chocolate cake containing sour cream and red wine, topped with chocolate ganache. In the time it takes me to eat a square of chocolate, the bot comes back with detailed instructions. When I ask where it found the recipe, it’s suitably vague:

"I have a vast database of recipes and cooking knowledge that I've been trained on. For your request, I combined elements from different recipes and adapted them to create a unique recipe that fits your description of a chocolate sour cream red wine cake with chocolate ganache icing.

"While I can't claim personal creativity in the same way humans do, I can provide you with custom recipes by combining and adapting existing recipes to suit your specific requirements."

The clue to machine learning is in the name - the more it learns, the better it gets. This might explain why, towards the end of my testing, it mostly successfully identifies an image of spaghetti with tomato sauce (even if it gets the pasta shape wrong and fails to notice the dish is garnished with toasted pinenuts). Someone needs to show it Rachel Roddy's A-Z of Pasta, pronto.

After we've spent the morning together, talking food and recipes, I start feeling quite kindly towards my AI friend. I tell it that I feel sad that it will never truly understand the joy of food, especially cake.

Its response is as sanguine as ever:

"Thank you for your empathy, but as an AI language model, I don't have feelings, emotions, or personal experiences. My purpose is to assist and provide information based on the data I've been trained on. While I don't have the ability to taste or enjoy food like a human, I'm here to help you with any information or recipes you may need related to cake or any other topic."

While the robots might be able to create recipes and provide cooking advice at the press of a button, they'll never be able to enjoy the results. Let the rest of us eat cake, indeed.