Get all your news in one place.
100’s of premium titles.
One app.
Start reading
Salon
Salon
Lifestyle
Ashlie D. Stevens

Can you use AI to write a viral recipe?

A good chocolate chip cookie is a thing of quiet beauty. In a world of stunt desserts layered with fondant, edible gold, cotton candy and glitter, it's regarded as an understated classic. This is despite the chocolate chip cookie being a relatively recent addition to the canon of global sweets. Where, for instance, the first recipe for the iconic French madeleine cookie was published in 1758, the chocolate chip cookie was invented nearly two centuries later by Ruth Graves Wakefield in 1938.

Wakefield, the owner of the Toll House Inn in Whitman, Mass., was looking for a way to innovate the thin cookies she served alongside ice cream. "We had been serving a thin butterscotch nut cookie with ice cream," Wakefield told reporters in the 1970s. "Everybody seemed to love it, but I was trying to give them something different."

So, she chopped up bits of a Nestlé semi-sweet chocolate bar and stirred them through a simple cookie dough of shortening, white and brown sugar, salt, flour, baking soda, hot water and vanilla. In short order, Wakefield's creation became culturally absorbed as a particularly potent symbol of Americana. It was the cookie sent in care packages to World War II soldiers; the cookie made in Aunt Bee's Mayberry kitchen and devoured with gusto, again and again, by "Sesame Street's" Cookie Monster; the cookie that still perfumes the corridors of shopping malls all across the country.

As such, chocolate chip cookies exist at this strange intersection of relative ubiquity and intensely personal nostalgia, built from the aroma of grandmothers' houses and the illicit childhood thrill of surreptitiously raiding the countertop cookie jar. Perhaps because of that dichotomy, it's tough to convince home cooks that they need a new chocolate chip cookie recipe — a fact that's apparent when surveying how cookbook authors and recipe developers write about the dessert.

Chocolate chip cookies exist at this strange intersection of relative ubiquity and intensely personal nostalgia, built from the aroma of grandmothers' houses and the illicit childhood thrill of surreptitiously raiding the countertop cookie jar.

"Yes, you do need another chocolate chip cookie recipe," Food52 assured readers in 2015. Seven years later, Bon Appetit published a recipe titled "BA's Best Chocolate Chip Cookie," albeit with a slightly sheepish note that "we understand cookie preferences aren't uniform — some prefer soft cookies or a chewier finish" and links to three other chocolate chip cookie recipes previously published by the outlet. 

Yet occasionally, even in a landscape flooded with strong opinions and innumerable options, a revelatory cookie still manages to come around and achieve virality, like Sarah Kieffer's pan-banging chocolate chip cookies or Alison Roman's salted butter and chocolate chunk shortbread, which shortly after their online debut were simply referred to as #TheCookies.

Some of their viral appeal is apparent. Both recipes take a classic dessert and revive it with an innovative technique (like literally banging a pan of partially baked cookies on the kitchen countertop before placing them back in the oven to encourage tree trunk-like rings of texture in Kieffer's case) or slightly unique, but still accessible ingredients (such as the Demerara sugar and hand-chopped chocolate called for in Roman's recipe). Yet some of their popularity is difficult to quantify, the result of the capricious nature of social media trends and online amplification.

But that's not going to stop members of the food and tech industries from trying to replicate those results by using artificial intelligence. In 2021, following several months of "baking" reigning as a consistent trending search term, developers Sara Robinson and Dale Markowitz decided to create an AI to help them develop new recipes.

"Being in the AI field, we decided to dive a little deeper into the trend and try to understand the science behind what makes cookies crunchy, cake spongy and bread fluffy — and we decided to do it with the help of machine learning," the pair told the Google Cloud blog. "Plus, we used our ML model to come up with two completely new baking recipes."

Robinson and Markowitz produced a recipe for "The Cakie," which combines cake with the crispiness of a cookie, and "Breakies," a mash-up of bread and cookies that reportedly has the texture of a muffin. That same year, Sony announced that it was imagining the future of AI-led recipe creation as part of its Gastronomy Flagship Project. "At the center of this work is the belief that AI can assist chefs to achieve deliciousness, sustainability and health in gastronomy, leveraging the vast amount of food data out there," developers wrote.

Nearly a year later, in late 2022, there was an explosion of general interest in artificial intelligence thanks to the accessibility of platforms like DALL-E, which could draw realistic and creative pictures from a mere text description, and more recently, ChatGPT, an interactive chatbot powered by machine learning.

As NPR reported, ChatGPT's technology has basically devoured the entire internet, reading the collective works of humanity and learning patterns in language that it can recreate. That means that users can provide the AI with prompts such as "write a college essay about perseverance" or (my first attempt) "write a film noir-style episode of 'Frasier.'" It will, with some competency, spit out a block of seemingly human-written text. 

AI can win an art contest, but can it develop a viral recipe? Can it manage to rapidly assess all that has been written about chocolate chip cookies and what makes a recipe popular and print out the next "It Cookie?" 

This has led to a lot of hand-wringing from those in creative industries about whether writers, graphic designers, illustrators and artists will, in fact, be replaced by robots. As VICE reported, someone recently entered an art competition with an AI-generated piece and won the first prize. The development lead one commenter to write, "We're watching the death of artistry unfold right before our eyes."

AI can win an art contest, but can it develop a viral recipe? Can it manage to rapidly assess all that has been written about chocolate chip cookies and what makes a recipe popular and print out the next "It Cookie?" The other day, I asked ChatGPT to do exactly that.

"Can you write a viral chocolate chip cookie recipe?" I typed.

It responded, "I can certainly try!" After a few moments of buffering, it provided me with this ingredient list:

2 and 1/4 cups all-purpose flour; 1 teaspoon of baking soda; 1 teaspoon of salt; 1 cup of unsalted butter, at room temperature; 3/4 cups of granulated sugar; 3/4 cups of brown sugar; 2 large eggs; 2 teaspoons of vanilla extract; and 2 cups of semi-sweet chocolate chips. 

If that list looks familiar — that's because it is completely lifted from Nestlé's recipe for classic Toll House chocolate chip cookies. "Enjoy your delicious, homemade, viral chocolate chip cookies!" ChatGPT wrote in conclusion.

I subsequently pushed for a few different asks. When asked to develop a recipe for a "trendy" chocolate chip cookie, it added hazelnuts. When asked to create a recipe that would perform well on TikTok, it recommended folding in rainbow sprinkles along with the chocolate chips. The most creative suggestion, which was offered in response to the prompt "write a recipe for the next hit chocolate chip cookie," was for "deconstructed chocolate chip cookies" (though the recipe itself was not deconstructed in any way and included six cups of chocolate chip cookies).

After feeding it new prompts over the course of several days, I quickly realized this was not the way to stumble upon the next viral chocolate chip cookie recipe. That likely takes a more human touch. When I spoke with Sarah Kieffer of pan-banging cookie fame about her creation in 2020, she detailed her research and development process, which involved ordering every cookie book she could find, going through them and making notes on what was "the same in all the books and what was uniquely different."

"Books that highly inspired me were 'Cookie Love" by Mindy Segal and 'Dorie's Cookies' by Dorie Greenspan; they are both very unique and different from each other, but capture the author's personal cookie preferences perfectly," Kieffer told me. "I wanted my book to have recipes for everyone, but also highlight my favorites in a unique way."

"Do you have preferences?" I asked ChatGPT.

"As a machine learning model, I do not have preferences or subjective experiences," it responded.

"What is your favorite cookie?" I countered.

"As a machine learning model, I do not have personal preferences or the ability to taste food," it reiterated, buffering a moment before adding that "based on the input and training data I have been given, traditional chocolate chip cookies made with butter, sugar, flour, eggs, vanilla extract, baking soda and chocolate chips are a classic and popular recipe."

Salon Food writes about stuff we think you'll like. While our editorial team independently selected these products, Salon has affiliate partnerships, so making a purchase through our links may earn us a commission.

Sign up to read this article
Read news from 100’s of titles, curated specifically for you.
Already a member? Sign in here
Related Stories
Top stories on inkl right now
Our Picks
Fourteen days free
Download the app
One app. One membership.
100+ trusted global sources.