How Google AI helped a Pittsburgh bakery make the best gluten-free chocolate chip cookie

Buy them in Garfield, or bake them yourself.

Jeanette Harris does a cooking demo for the cookies created by Google AI.

Jeanette Harris does a cooking demo for the cookies created by Google AI.

MJ Slaby / the incline
MJ Slaby

At first, baker Jeanette Harris wasn’t sure — two teaspoons of cardamom, a spice usually in Indian foods, seemed like a lot for a batch of chocolate chip cookies.

But it was in the best recipe out of the dozens that Harris, founder and owner of Gluten Free Goat Bakery and Cafe in Garfield tried in an experiment with Google researchers.

“We have biases as bakers,” Harris said, adding that there are things she never would have tried without this experiment. Like that amount of cardamom.

Machine learning and artificial intelligence are usually used by big tech companies, said Greg Kochanski, a Google software engineer. But he and other members of the Google Brain Team in Pittsburgh wanted to find a way to make AI more accessible to small businesses.

So they started with cookies. Could AI come up with a great-tasting and original chocolate chip cookie recipe?

To find out, they partnered with Google’s Pittsburgh Chef John Karbowski and used a Google-powered research tool that isn’t available yet to the public, though researchers hope it will be one day.

mj slaby / the incline

Before partnering with Harris on a gluten-free cookie, the researchers and Karbowski tested a basic chocolate chip cookie in the spring to see if AI could make a recipe for cookies that tasted better than Chips Ahoy and the Betty Crocker chocolate chip cookie.

The Google team started with a cookie recipe and adjusted it for different amounts and combinations of ingredients. After taste testing, Google staffers rated the recipes. Those ratings were entered into a Google form so the software could readjust the recipe on its quest to best Chips Ahoy and Betty Crocker.

AI doesn’t have biases like a human baker, but it also doesn’t have prior knowledge, so it was no surprise that the first few batches were duds, said Daniel Golovin, a Google software engineer on the Brain Team. But in the end, the software learned what makes a really good cookie — not just what people say they like.

Golovin said similar machine learning is used for designing airplane wings and spacecrafts’ antenna.

After out-baking the two supermarket staples, Karbowski wanted to try a gluten-free cookie. He reached out to Harris, who makes gluten-free, vegan, soy-free and corn-free treats. She had been a guest chef at Google and gave Karbowski and the software team a chocolate chip cookie recipe she’d been working on as a starting point this summer.

A few weeks and 60 batches of cookies later, they had their recipe.

You can get those AI-perfected chocolate chip and cardamom cookies at Gluten Free Goat, or bake them yourself. Gluten Free Goat takes holiday orders, with a 3 p.m. Dec. 17 deadline.

“At first, it can be scary to bring AI into the kitchen,” Karbowski admitted, saying chefs might think they’ll be replaced. But instead, he said, it helps cooks and bakers be more creative. Harris added that it helps cut down the time spent in the test kitchen, saying that takes up a lot of her time as a bakery owner.

Now that Google AI has mastered basic and gluten-free chocolate chip cookies, what’s next? Kochanski and Karbowski said they have something in the works, but they aren’t ready to share just yet.

Bake AI-perfected chocolate chip cookies


1/2 cup and 2 tbsp tapioca starch
1/2 cup brown rice flour
3/4 cup and 1.5 tbsp OG sugar
2 tsp cardamom
1.5 tbsp flaxseed meal
1/4 cup sorghum flour
1/4 cup raw sugar
1.5 tsp xanthan gum
1.5 tsp sea salt
1 tsp baking soda
1 cup chocolate chips
3/4 cup water
3/4 cup safflower oil


  1. Preheat the oven to 350 degrees.
  2. Mix all dry ingredients, except chocolate chips.
  3. In another bowl, combine wet ingredients.
  4. Add wet ingredients to dry, and mix.
  5. Fold in chocolate chips, until just mixed.
  6. Spoon cookies onto a parchment-lined sheet pan.
  7. Bake at 350 degrees for 12 minutes.