fbpx

I Made This AI-Generated Sourdough Bread Recipe, and It Actually Wasn’t Too Bad

This post might include affiliate links. See my policy.

As a software engineer, I love technology, efficiency, and precision. At the same time, as a sourdough bread baker, I value things that take time, using my hands to work with and form dough, and on-the-fly adaptations to accommodate an organically developing dough—all more analog than digital. 

I’ve kept these two sides of myself mostly separate. They each satisfy what I see as two diametrically opposed personalities inside my head. But as the rise of conversational artificial intelligence has become mainstream, I wondered, how would AI generate a sourdough bread recipe, and would it be any good?

…while the AI can generate a recipe that’s technically correct most of the time, the resulting loaf is mostly uninspired and dull.

This year I’ve been exploring ChatGPT (the best conversational AI at the moment), Midjourney (similar to Stable Diffusion, effective at generating graphics), and other AI software, using them to plan sample itineraries for trips, create graphics, define terms, and even teach me new tasks. Some responses floored me in their correctness and creativity, while others were lackluster, vague, or flat-out wrong. The challenge with AI right now is that it’s not quite infallible, yet it spews out responses with 100% confidence. It’s like that friend who thinks they know everything and isn’t afraid to share with bravado, even if they’re wrong.

AI-Generated Sourdough Bread Recipe Internal Crumb
The interior of the AI-generated sourdough bread recipe was tight due to the low hydration.

I saw this characteristic on display when I asked ChatGPT to generate a few sourdough bread recipes. Most of the recipes were okay, but occasionally I’d get one with a drastically low or high salt percentage, or a low hydration that I knew would certainly result in a tough, hard-to-work dough. While these very erroneous replies were rare, they did happen. And yet, the AI was confident the result would be a “delicious loaf of homemade sourdough bread” anyway. I had to rely on my instinct as a baker to tell me something wasn’t right.

Midjourney AI-generated art of a machine creating loaves of bread.
Midjourney prompt: “An intelligent machine creating an assembly line of rectangular loaves of delicious bread like a loaf of wonder bread, no people, in the style of Makoto Shinkai.”

This post needs a disclaimer upfront:

Will I use ChatGPT to generate more sourdough recipes anytime soon? Nope. At this time, it lacks creativity, nuance, and inspiration. The generated recipes are simplistic and one-sided despite advanced prompt engineering—the AI simply wants to generate an answer to fit a pattern rather than create a recipe that will excite and taste delicious. In other words, while the AI can generate a recipe that’s technically correct most of the time, the resulting loaf is mostly uninspired and dull.

And that’s exactly the result of the AI-generated sourdough bread recipe in this post.

But perhaps most importantly, it’s hard to trust whether the AI-generated sourdough bread recipe will work as-is in the kitchen. The recipe still requires the check of a baker’s instinct to verify the baker’s percentages and method.

In this post, I’ll:

  • Discuss what AI software I used to generate a sourdough bread recipe
  • Talk about how I prompted the AI to create recipes
  • Go over the recipe the AI-generated and how I would change it for the better
  • Provide the recipe for you to bake at home

What is ChatGPT?

ChatGPT is a large language model (LLM) developed by OpenAI, based on the GPT (Generative Pre-trained Transformer) architecture. It is designed to understand natural language and generate human-like responses to questions (also known as prompts; more below). ChatGPT can perform various tasks, such as language translation, question-answering, summarization, and more. It has been trained on a massive amount of internet data and can generate responses based on the context of the given input.

I used ChatGPT because, at the moment, it’s the leading “conversational AI” software. OpenAI made using it incredibly easy—it’s just like chatting with someone via text message or chat room.

When I asked for a sourdough bread recipe, ChatGPT drew on its extensive knowledge of culinary techniques, ingredients, and proportions to create a detailed recipe incorporating a mix of white and whole wheat flour. The model correctly considered the unique characteristics of sourdough bread, such as using a fermented starter (though my preference would be to use a dedicated levain), and provided step-by-step instructions to make the loaf.

ChatGPT can answer many questions on many subjects, but how can we get it to create a good sourdough bread recipe? By using the right prompts.

AI-generated sourdough bread recipe dough at the end of bulk fermentation.
AI-generated sourdough bread recipe dough at the end of bulk fermentation. The dough was tight and very strong due to the low hydration.

AI Prompts That Didn’t Work

Initially, I tried providing ChatGPT with detailed prompts to help guide it toward the style of sourdough bread I typically make. For example, I prompted it as follows:

Detailed ChatGPT prompt for sourdough bread recipe

“Please give me a recipe for a single hand-mixed loaf of sourdough bread with a levain preferment, mix of whole wheat and white flour, moderate salt percentage, and with a room temperature bulk fermentation that’s finally fermented in shape overnight in the refrigerator. Aim to maximize depth of flavor above all else.”

Here was the response:

AI-Generated sourdough bread recipe that wasn't great

Its reply was okay, except that it called for an incredibly long bulk fermentation at 6 to 8 hours. That’s a long fermentation time, even though it called for 15% levain in the final dough, which is on the lower end. Additionally, it used a high amount of ripe sourdough starter in the overnight levain at 50% to total flour, where I would typically call for 10 to 20% to total flour for that fermentation timeline.

After trying numerous other prompts, it seemed that the more specific and complicated my prompt, the more incorrect ChatGPT’s recipe replies became. This was counterintuitive. I thought by being more specific, I was helping to guide it toward a balanced and successful recipe. So, I then wondered if by trying to handhold it with a narrow prompt, I prevented it from finding the best pattern for the query.

Where AI Stumbled When Creating a Bread Recipe

In running through many tests, I found ChatGPT introduced the same errors repeatedly. It seems it doesn’t understand the relationship between ingredients in a sourdough bread recipe and how the ratios between these ingredients affect dough workability, fermentation, and eventually flavor.

Here’s where the AI stumbled most often:

Dough Hydration

The amount of water in bread dough is incredibly important; unfortunately, it’s never static. The flour you choose to use might result in a recipe needing more or less water than a baker who chooses a different flour. ChatGPT picked reasonable dough hydrations for most recipes, usually between 65% and 75%, but in some cases where it called for “strong bread flour,” I would have increased the dough hydration a bit to compensate.

In my experience, using higher protein white flour, such as bread flour, will require more water when mixing to hydrate the dough properly.

Salt

One problem that popped up repeatedly was the salt percentage in a recipe. ChatGPT would sometimes return reasonable salt percentages at around 2.0% to total flour, but at times, that percentage ranged from 0.6% to 3.0% to the total flour weight in a recipe. That’s a big deal! Every 10th of a percent change in the salt of a recipe greatly impacts the perceived flavor, dough workability, and fermentation.

My Most Successful AI Prompt For a Sourdough Bread Recipe

Surprisingly, ChatGPT had the best output from my simplest prompt. In fact, the output was so similar to how I write recipes here at The Perfect Loaf that I wonder if ChatGPT might have been trained on the material I have published here over the years—save for a few differences.

Here’s the prompt I used:

ChatGPT Prompt for Sourdough Bread

That’s it; that’s the entire prompt. With the simplest prompt, I elicited a recipe and method in the style of bread I like to make.

Let’s look at ChatGPT’s recipe response.

The AI-Generated Sourdough Bread Recipe

Instead of going through my usual steps to show the bread formula and method, I’ll first show you the entire AI-generated recipe word for word, then discuss what I would change at each step for improvement.

If you want to print this recipe and try to bake this bread for yourself, be sure to read on to the end of the post.

ChatGPT generated sourdough bread recipe

All-in-all, not a bad sourdough bread recipe! Let’s look at this recipe in a way we bakers can more easily understand: in baker’s percentages.

AI-Generated Sourdough Bread Vitals

The bones of this recipe are not bad, and technically correct. The prefermented flour percentage, starter in the final dough, and hydration are all reasonable. Though, as I’ll discuss in a bit, the hydration is on the low end if you take into account the whole wheat flour used in the recipe (and even lower if you use high protein white bread flour, which typically requires even more water).

The recipe makes a single loaf of sourdough bread, and I’ve listed the flour I chose to use for the recipe. Since the AI responded with “white bread flour,” which is vague and could be flour with a medium protein or high protein, I went with my typical medium protein white flour at 11.5% protein.

Total dough weight960 grams
Prefermented flour10.0%2
Sourdough Starter in final dough20.0%
Hydration70.0%
YieldOne loaf

AI-Generated Sourdough Bread Total Formula

The AI did not specify a desired or final dough temperature, so I stuck with my typical 78°F (25°C) (see my post on the importance of dough temperature for why).

WeightIngredientBaker’s Percentage
350gWhite bread flour (11.5% protein; Central Milling Artisan Baker’s Craft Plus)70.0%
150gWhole wheat flour (Cairnspring Mills Organic Whole Grain Expresso)30.0%
350gWater70.0%
10gFine sea salt2.0%
100gRipe sourdough starter, 100% hydration20.0%

Baking Schedule

This AI-generated sourdough bread recipe can be baked all in one day or spread over two. ChatGPT suggested baking this as a same-day recipe, allowing the final shaped dough to proof for 1 to 2 hours at room temperature before baking. If baking the same day, I would use the poke test to determine when the dough is ready.

When I baked this bread I opted for the overnight proof in the refrigerator because it’s more convenient (especially for a single basket of dough) and will result in a deeper flavor profile.

Making ChatGPT sourdough bread in the kitchen.
Following ChatGPT’s sourdough bread recipe in the kitchen.

What Did I Like About This AI-Generated Sourdough Bread Recipe?

Surprisingly, there was a lot to like about how the AI approached making this sourdough bread. It used many correct ingredients and in relatively reasonable percentages (though the hydration was low; more below). Additionally, the language it picked out for assessing sourdough starter readiness (“active” and “bubbly”) and the fermentation time for each step were acceptable.

Dissolving the Sourdough Starter

Dissolving the sourdough starter in water.
Dissolving the sourdough starter in water helps dispersion.

One thing it did recommend, which I’ve done in the past but rarely do these days because it’s just another step, is to dissolve the sourdough starter in the mixing water to help it disperse evenly throughout the dough during mixing. Many bakers do this, and while I don’t, it’s a step that might be beneficial for some bakers.

No Dividing and Preshaping

The AI correctly skipped the dividing and preshaping step with this dough, even though it’s usually used in most bread recipes. There obviously was no need to divide the dough since the mix was for a single loaf, but where it might have incorrectly applied the pattern to this step, it did not.

The AI also omitted a preshape step, which was correct for this dough since the hydration is low and the dough was firm and strong. Preshaping bread dough is not mandatory, even if it’s commonly performed.

What Would I Change with This Recipe?

While ChatGPT did a great job of generating this sourdough bread recipe, I found myself shaking my head as the output printed on the screen. There were several points in the recipe—such as the salt percentage, how it recommended adding the salt, the dough hydration, and more—I did not agree with.

Here are the changes I would recommend to make this recipe better.

AI-generated Recipe Step or IngredientHow I Would Change ItWhy I Would Make the Change
10g fine sea salt9g fine sea saltA small change, but I prefer lower salt percentages. Reducing the salt to 1.8% (9 grams) to the total flour in the recipe results in a loaf that’s sufficiently salted for flavor, but doesn’t rely on high salt percentages to make up for insufficient fermentation flavor.
Using sourdough starter directlyMake a dedicated levainThis is a personal preference and not mandatory, but I prefer making a levain for each bake for numerous reasons.
“Add the fine sea salt to the dough and mix it in thoroughly by squeezing and folding the dough in the bowl.”Reserve some of the mixing water to help incorporate the salt.It can be hard to ensure the salt will fully dissolve and become evenly distributed through the dough if it’s not moistened with water.
350g water (dough hydration)400 to 425g waterI would increase the hydration of the dough from 70.0% to 80% or 85%, depending on the flour used.
“Allow the dough to ferment at room temperature for 3-4 hours, folding it every 30 minutes for the first 2 hours.”Reduce the stretches and folds to 2 to 3 depending on the final dough hydration.At the current dough hydration of 70%, only two sets of stretches and folds will be needed to strengthen the dough sufficiently.
“Preheat your oven to 475°F (245°C) with a lidded Dutch oven or cast-iron pot inside.”Reduce baking temperature to 450°F (230°C).In my experience, baking at 475°F (245°C) is too hot and will burn the bottom of the loaf.
“…bake for an additional 20-25 minutes, or until the crust is golden brown and the internal temperature of the bread reaches at least 190°F (88°C).”Bake until the internal temperature is around 204°F (95°C).An internal temperature of 190°F (88°C) is suitable for enriched loaves and pastry, but it’s a little low for large, hearth loaves and might result in under-baked bread.
AI-generated sourdough loaf
It sure did have a beautiful crust.

Final Thoughts

While the current state of artificial intelligence software like ChatGPT is remarkable, especially in its perceived creativity and speed, it’s not magic. It is software trained to form relationships and detect patterns in a large corpus of public internet data. When a prompt is given later, these patterns are picked out as the AI decides what response best fits based on the probability it would appear in a human’s response to the given prompt or query.

Great sourdough bread isn’t simply a pattern that can be detected and replicated; it requires a human touch to guide it in the right direction.

When I prompted ChatGPT to give me a sourdough bread recipe, I have to wonder if it has crawled The Perfect Loaf at some point in the past, using my recipes and guides as data points to help it respond with the sourdough bread recipe in this post. Much of the language is the same, and the steps are similar. But, it can also be said that because humans have been making bread for thousands of years, we all make the same bread in the end.

Will I use AI to generate a sourdough bread recipe for me in the future? As I said in the beginning: not a chance. 

To me, sourdough recipes are best created by leveraging human inspiration, creativity, and experience, not neural networks or machine-learning decision trees. Recipes can sometimes seem like algorithms in their repetitiveness or during iterative development (I’ve said this often), but that’s a reductive statement. During development, recipes evolve based on subjective assessments in the kitchen by the baker as the dough is mixed and fermented, and the resulting bread is tasted.

Great sourdough bread isn’t simply a pattern that can be detected and replicated; it requires a human touch to guide it in the right direction.

Print
clock clock iconcutlery cutlery iconflag flag iconfolder folder iconinstagram instagram iconpinterest pinterest iconfacebook facebook iconprint print iconsquares squares iconheart heart iconheart solid heart solid icon
AI-Generated Sourdough Bread Recipe Final Loaf

AI-Generated Sourdough Bread Recipe

5 Stars 4 Stars 3 Stars 2 Stars 1 Star No reviews
  • Author: Maurizio Leo
  • Prep Time: 24 hours
  • Cook Time: 50 minutes
  • Total Time: 24 hours 50 minutes
  • Yield: 1 loaf
  • Category: Lunch, Dinner, Bread
  • Cuisine: American

Description

This sourdough bread recipe was generated by ChatGPT-4 with the following prompt:

“Please give me a recipe for one loaf of sourdough bread using a mix of white and whole wheat flour.”

Note that I find the dough could use increased hydration. I would add around 30 to 50g of water.


Ingredients

  • 100g active sourdough starter (fed and bubbly)
  • 350g white bread flour
  • 150g whole wheat flour
  • 350g water
  • 10g fine sea salt

Instructions

  1. Feed your sourdough starter about 6-8 hours before you plan to mix your dough. Make sure it’s bubbly and active before using it.
  2. In a large mixing bowl, combine the white bread flour and whole wheat flour.
  3. In a separate bowl or measuring cup, mix 350g water with the active sourdough starter, stirring until well combined.
  4. Pour the water-starter mixture into the bowl with the flour, and mix until all the flour is incorporated. Let the dough rest for 30 minutes to allow for autolysis, which helps the dough develop structure and flavor.
  5. After the 30-minute rest, add the fine sea salt to the dough and mix it in thoroughly by squeezing and folding the dough in the bowl.
  6. Begin the bulk fermentation process by covering the bowl with a damp cloth or plastic wrap. Allow the dough to ferment at room temperature for 3-4 hours, folding it every 30 minutes for the first 2 hours. To fold the dough, wet your hands and grab the dough from underneath, stretching it up and folding it over itself. Rotate the bowl 90 degrees and repeat this process until you’ve folded the dough from all sides.
  7. After the bulk fermentation, gently transfer the dough onto a lightly floured surface. Shape it into a round loaf by folding the edges towards the center, then flip it seam-side down and use your hands to create surface tension by tucking the dough under itself.
  8. Place the shaped dough seam-side up into a well-floured banneton or a bowl lined with a floured cloth. Cover with a cloth and let it proof at room temperature for 1-2 hours, or until it has risen slightly and passes the finger dent test. Alternatively, you can proof the dough in the refrigerator for 12-16 hours for a more pronounced sour flavor.
  9. Preheat your oven to 475°F (245°C) with a lidded Dutch oven or cast-iron pot inside. Once heated, carefully remove the Dutch oven from the oven and gently transfer the dough into it, seam-side down. Use a sharp knife or razor blade to score the top of the dough to allow for expansion during baking.
  10. Cover the Dutch oven with the lid and bake for 25 minutes. Then, remove the lid and bake for an additional 20-25 minutes, or until the crust is golden brown and the internal temperature of the bread reaches at least 190°F (88°C).
  11. Allow the bread to cool on a wire rack for at least 1 hour before slicing and enjoying your homemade mixed flour sourdough bread.


FAQs

What is a prompt in AI?

A prompt is a question or task you give to artificial intelligence software. An example would be “Please give me a recipe for sourdough bread with raisins inside.”

What is ChatGPT?

ChatGPT is a large language model created by OpenAI. It is a specific type (and subset) of artificial intelligence that focuses on the understanding of human-like text that’s trained on largedatasets using machine learning.

Will you use ChatGPT for sourdough bread baking?

While ChatGPT’s responses were mostly accurate and resulted in a decent loaf of bread, the truth is, the best bread is made through experience and human intuition.


What’s next?

If you want to make an easy and delicious loaf of bread, my Beginner’s Sourdough Bread is one of my favorites (and it was created, tested, and baked by a human).

Happy baking!


  1. Assumes 100% hydration sourdough starter, equal water to flour.

  2. Assumes 100% hydration sourdough starter, equal water to flour.

Picture of Maurizio Leo
Maurizio Leo
Maurizio Leo is a home baker, James Beard Award winning and New York Times Bestselling author, and the creator of the award-winning sourdough website, The Perfect Loaf. He has spent the past decade baking sourdough bread in Albuquerque, New Mexico.

Contents