Over the past few weeks I have been using GPT-4 to help me cook. Need a substitute for an ingredient you forgot to buy? GPT can suggest an alternative. Time to clear out the cupboards? Simply type: “Please create a recipe using two eggs, a jar of borlotti beans, a potato, a leek, and the scrapings on the bottom of a jar of pickle.” I’m always polite, and so is GPT. It thinks for a moment – then whips up the instructions for an unusual but edible hash and even wishes me bon appétit. But that’s not all it can do.
On a recent trip to Venice, I wanted to know what sort of fish I should eat. “One of the local speciality fish is the branzino, or European sea bass,” GPT explained, without mocking my ignorance. And much as image generation models such as Stable Diffusion and Midjourney can imitate popular artists, you can input well-known chefs to influence the results. When I asked for “beans on toast in the style of Yotam Ottolenghi”, for instance, I received a recipe for “spiced beans on sourdough toast” which included cumin, za’atar and greek yoghurt, among about 12 other components. The feeling of reading the long list of ingredients before realising I didn’t have the energy was almost like-for-like.
But, when asked for a simpler version of the recipe, GPT provided. It gave me alternatives in the style of Jamie Oliver (grated cheddar cheese), Martha Stewart (navy beans and chicken stock), and Salt Bae (garlic, sumac, and red pepper flakes). The results aren’t always revolutionary. This became clear when YouTube chef Joshua Weissman challenged GPT to a cook-off. His blindfolded taste testers found the formulaic recipes for burgers, fried chicken and chocolate-chip cookies didn’t nearly match Weissman’s – though I would argue that the formulaic choice of dish was part of the problem too, one that AI may well help us overcome.
There are, of course, plenty of issues with AI models. The New York Times’ food staff reporter Priya Krishna complained the output was too “white and western”. There was the recent controversy caused by a chatbot designed for eating disorders that began offering weight loss advice. There’s no guarantee the machine won’t hallucinate something you’re allergic to into a recipe, and without skilled prompting, the food may be painfully bland.
Yet the convergence of cooking and computation makes a lot of sense. Recipes are algorithms, after all. They are variable instructions intended to solve a problem (what should I cook and how?) complete with “if-then” statements that make room for the ingredients, skills and preferences at hand (for instance, “If you don’t like spicy food, leave out the chilli”).
Finnish engineer Sami Matilainen captures the complexity of food preparation in Flowchart Recipes, a book of Nordic classics “visualised using flowcharts for better readability/understanding and usability than what you get from a traditionally formatted cookbook”. The recipes there resemble a program. Drawing the comparison even more literally, the esoteric programming language Chef, by Australian cartoonist-physicist David Morgan-Mar, uses a syntax derived from cookery to make computer programs.
Instead of asking GPT to provide a version of dishes I’d be cooking anyway, I decided to try for something new. Two of my favourite cuisines are Iranian and Sichuan Chinese. When I asked the GPT to fuse the two, I was first offered “kung pao jeweled rice”, which seemed pretty lame, two classics side by side on the same plate. When I asked it to try again, however, it suggested “mapo bademjan” – a combination of spicy mapo tofu and hearty khoresh bademjan. The result was a sort of lasagne in which the simmering, tongue-numbing Chinese sauce was layered between the khoresh’s fried aubergines. It was hot and slimy but boasted a little vegetal density that the mapo couldn’t otherwise provide.
I may be the first person ever to have cooked this dish – but the recipe now lives on OpenAI’s servers, and I have no doubt a platform will spring into existence to record AI-human collaborations in the future. Most recipes no longer exist. Either they have been forgotten, or more likely, were never written down to begin with. When we have large language models that can record and recall information installed in our homes, there will be ample opportunity for all the accidents, experiments, family recipes and tricks to endure and thrive.
The tradition of written recipes began about 4,000 years ago, when Mesopotamians began stamping simple lists of ingredients on clay tablets, each preceded by the word “take” (later translated into the Latin, recipe). By the late middle ages, not much had changed. It was still assumed that whoever picked up such a list would know what to do with it. By the 18th century, however, with the falling cost of printing and the rise of universal measurements, home economics books proliferated, stuffed with elaborate recipes accompanied by detailed instructions.
Artificial intelligence makes cooking an oral tradition once more, creating space for adjectives – “meaty”, “chewy”, “sticky” – and more nuanced responses to food that go far beyond today’s bratty comments and star ratings. It can convert imperial to metric, or remind you how hot pork loin ought to be before it’s served, but it can go further. My colleague Andrea Provenzano, with whom I run the food research platform Black Almanac, noted how his Italian mother tracked the progress of her apple pies by the time it takes for its smell to fill the house – a measure that resists standard measurement, but nonetheless worked very well.
I hope this is the sort of personalisation and detail that AI can reintroduce as cookbooks that constantly refresh and learn. Perhaps we are about to redefine entirely what it means to cook, operating in a kitchen that listens, logging all the tweaks, experiments, fusions and improvisations so that others can access them – expanding the scope of culinary experience from the bottom up.
• Philip Maughan is a writer based between London and Berlin. Cooking Earth by Black Almanac is available now