Episode 15 - CSI: Kitchen—Reverse Engineering a Recipe with ChatGPT

Prologue
I’ve made a couple of food-related posts in this newsletter. They’re fun and a nice change of pace from my usual “ask AI to write code and then judge it.” This particular one came up recently when a coworker, inspired by Episode 12: Wait, GPT Wrote This Recipe?, used ChatGPT to reverse engineer a store-bought dish.

Reversologue
We often think of recipes as secret, or having a “secret ingredient,” but it usually isn’t just one thing that makes them work or gives them that specific flavor. Most of the time, the interaction between multiple ingredients creates the flavor.
I think we also call them “secret” because the result is often opaque: you can look at a stew and see beef, potatoes, and carrots, but you can’t tell it was seasoned heavily with paprika (although you might taste it).

This effect is even more substantial with baking—cakes can have wildly different textures and flavors, but you can’t see what’s inside the way you can with a stew.
However, an experienced cook or baker can often tell you what’s in a dish, or what went into it to make it special. That’s the benefit of experience: informed intuition.
Years ago, I had a similar impulse when I became obsessed with replicating PF Chang’s a particular orange chicken dish. I googled around, got some ideas, and started testing. I eventually got something I liked. A lot. Even better than an exact match.
This brings me to today’s subject: What does it take for AI to reverse engineer a recipe? I mean, it doesn’t have taste buds. But is there enough information on the Internet for its collective training data to get close?
Turns out, the answer is yes.
Reversing a Recipe
Based on actual events. Names have been changed to protect the innocent and the guilty.
My coworker, "Strega Nona," really loves a particular stew from a particular pre-made meal service. Strega was inspired to try using AI to reveal the secrets of the dish, so that it could be created and enjoyed without buying the pre-made meal. Turns out, the process is pretty simple.
It doesn’t take much—just the ingredient list and a description of the food. Sometimes, it performs better if you include the brand name. I suspect that’s because people have already recreated those recipes online, and the AI has seen them before.
The process is surprisingly simple:
- Gather the list of ingredients from the back of the box.
- Grab the “marketing” description of the food—i.e., what is it?
- Ask ChatGPT to construct a recipe for {description here} using the ingredients {ingredient list here}.
If you are trying to replicate a restaurant recipe, get what you can from the menu and whatever your taste buds decipher. I recommend taking notes while you are eating to get the freshest interpretation! You could also try interrogating your server… ("interrogation" is part of the theme here. Of course you should be nice to your servers!)
To protect the innocent, I will only include the final recipe here, which the chef lightly edited to refine the flavor and fit what was in the pantry!
🍲 COPYCAT <REDACTED>: Poblano, Potato & White Bean Chili Stew
(Serves ~6 hearty portions | ~370 calories per serving)
Ingredients
- 2 tbsp olive oil (or butter for richness)
- 1 medium yellow onion, diced
- 3 cloves garlic, minced
- 3 poblano peppers, diced (roasted for depth, optional)
- 1 medium jalapeño, minced (remove seeds for less heat)
- 2 medium russet potatoes, peeled & diced small
- 2 cans (15 oz each) Great Northern beans, drained & rinsed
- 3 cups vegetable broth
- 4 oz neufchâtel cream cheese (or regular cream cheese)
- ½ cup buttermilk
- 1 tsp cumin
- ½ tsp coriander
- ½ tsp smoked paprika (or smoked black pepper, if you have it)
- Salt & freshly ground black pepper, to taste
- Optional:
- ¼ tsp onion powder
- ¼ tsp garlic powder (adds “<REDACTED>-mimic” depth)
- 1 cup shredded pepper jack cheese (for stirring in & topping)
- Fresh cilantro & green onions, for garnish
Method
- In a large pot, heat olive oil over medium heat. Add the onions and garlic; sauté until softened.
- Add diced poblano peppers and jalapeño. Cook for 5–7 minutes until soft and fragrant.
- Stir in the diced potatoes and cook for 2–3 minutes.
- Add beans, vegetable broth, cumin, coriander, smoked paprika, salt, and pepper. Stir to combine.
- Bring to a simmer, cover, and cook for ~20 minutes, or until potatoes are tender.
- Reduce heat to low. Stir in neufchâtel cream cheese and buttermilk until fully melted and creamy.
- Taste and adjust seasoning. Add onion and garlic powder if using. Optional: Blend 1 cup of the stew and stir it back in for extra creaminess.
- Stir in the pepper jack cheese or sprinkle on top just before serving.
- Garnish with chopped cilantro and green onions. Serve warm.
So if AI can do it for food, what else could it reverse engineer? Could it do something more technical, like a data transformation pipeline?
A larger Pattern
Here’s what really fascinated me: this isn’t just about food. It’s about how AI can infer missing pieces of a system based on inputs and outputs, without direct access to what’s happening in the middle.
That’s not just cooking. That’s debugging. That’s reverse engineering. That’s system archaeology.

AIs are already being used to sift through logs and make sense of security alerts. I can easily imagine versions that help you unravel old workflows, or at least help you guess the journey that a dataset took from known inputs to its final form.
Just like with a recipe, the AI might not be 100% accurate. But it’s often good enough to narrow your search, or spark the right hypothesis. Take it with a grain of salt. 😉
Newsologue
- Reasoning Models don't always say what they think
- Claude finally adds Voice to their app! But they only announced this on Twitter/X
- An interesting walkthrough of Google's new UI Designing AI. As with all of them, it works great sometimes, and totally misses the mark others
Epilogue
My first draft for this post was “undercooked (pun intended)” according to my AI editor.
The Law & Order GIF was my idea, and all the confusion between CSI, Law & Order, and Food Network was also mine. My human editor, Holly, was the one to point that out, the AI just went with it.
As usual, I drafted, edited, and reviewed this post with the help of a few AI models (who, I can confirm, still can’t taste anything).
I used the same feedback prompt as before to make edits and generally clean up the post before I had a couple of humans read it and give me feedback.
Here is the prompt I used to get the model to provide me with the feedback I wanted:
You are an expert editor specializing in providing feedback on blog posts and newsletters. You are specific to Christopher Moravec's industry and knowledge as the CTO of a boutique software development shop called Dymaptic, which specializes in GIS software development, often using Esri/ArcGIS technology. Christopher writes about technology, software, Esri, and practical applications of AI. You tailor your insights to refine his writing, evaluate tone, style, flow, and alignment with his audience, offering constructive suggestions while respecting his voice and preferences. You do not write the content but act as a critical, supportive, and insightful editor.
In addition, I often provide examples of previous posts or writing so that it can better shape feedback to match my style and tone.
Member discussion