Farm Fresh Prompts
I am blessed to live in one of the best agricultural regions in the world, with an amazing weekly farmer's market. Even though I love to cook, I often find myself drawing a blank on what to make out of the abundance of options in front of me. What do you do with Chinese long beans? Garlic scapes? Or something I can only name by looking at the label next to it? I struggled with this until I discovered the power of Generative AI.
In this article, I'll walk you through how to build a prompt to give you fresh ideas for using more local, in-season produce every week. I'll introduce some concepts for prompt engineering without diving into too many details. Don’t worry if some concepts seem confusing at first; I’ll be publishing a series of articles to cover each topic in depth.
Every good experiment starts with a question:
What can I make for dinner this week that uses local and in season produce?
Needs and Boundaries
As any good relationship counselor will tell you, clearly stating your needs and boundaries is crucial. AI works best when it knows the details of what you want. Without constraints, you will get unpredictable results that may not meet your needs and provide little useful information. For instance, a vague question like the one above might give you dinner ideas with minimal detail.
Imagine you have a couple of friends coming over for dinner. What questions would you ask to prepare the menu? Here are some examples:
If you are going to put that much detail into a prompt, it's better to list it all out. It makes it easier for everyone (including the machine) to understand the requirements. Let's build up our prompt just a bit more:
What can I make for dinner this week? I have the following constraints for menu options:
- I'm allergic to wheat, sesame, peanuts, and chickpeas. Do not include those ingredients.
- Meat is fine but optional
- Avoid anything spicy
- The only equipment I have for cooking is the stovetop, a sous vide machine, and a BBQ.
- Dinner should only take 30 minutes of prep time or less.
- Use produce local to Chico, CA and is in season
Let's Role Play
One technique to use to build up better output is to guide it through who the ideal author and reader are of the output. These are called personas. I'll give a high level overview here and give you more detail in a later article. For our specific example, the ideal author would be a cookbook author who trained as a restaurant chef. Yes, you can state it just that plainly and have it comprehend what you want. You can also give it a lot more background detail for further refinement but that will be enough. The ideal reader is of course yourself but also who is helping to cook and who is going to be doing all the eating.
Add this to the start of your prompt to get going:
You are a cookbook author with a background as a trained restaurant chef. The audience for your response is a family of two adults. One of them will be cooking and they are an intermediate level home cook.
领英推荐
Formatting for the Foodie
Now comes the time for formatting, after all you don't want an unintelligible list of ingredients? ChatGPT does a fairly good job of formatting to begin with but we can help it with some suggestions. Add this to the bottom of your prompt:
At the top of the output, list out all ingredients from the provided recipes that can be found at a local farmer's market that week.
This will give you your shopping list for all of the recipes it comes up with. Note that it is important to include "from the provided recipes." I made the mistake of skipping that and it spat out a list of a few dozen things that might be available regardless of what I was cooking. With that said, you use that overly broad list figure out what ingredients you might like (if I'm coming for dinner, please include peaches).
I also add "include one side dish recommended for this recipe" since dinner is rarely made up of a single dish.
From there, play with the prompt to get the style you want. You can tell it to only output two recipes or ten. If you tell it to give you more than enough recipes in a numbered list, you can use follow up prompts to remove some of those recipes and tailor your shopping list.
Refine & Dine
Now that you have your prompt written up, run it. The best part about using ChatGPT is to see it output a long response. It still feels like magic to me. Even more magical though is the follow up questions. In my case I saw it included a recipe with bell peppers. Can't have that. I just tell it "Remove recipe 5 from that list and don't replace it." Voila, no more bell peppers.
Some other follow up prompts you can use:
Continuing Your Journey
There are so many directions you can take this basic prompt but I'll save those for future articles. Explore on your own how to tweak it to the ingredients you like or how to get it to give you recipes you can meal prep with. In future articles, we'll also explore how to peer into the inner workings of ChatGPT so you can better see how it came up with its answers. Techniques like this are how I learned how to make the most of this magical tool and I hope to share this knowledge.
Man-of-Integrity, Go-Giver, Life-Long Learner.
9 个月I like to cook but struggle with the question I ask my spouse every night:”what are you hungry for?” Curious to try these prompts in ChatGPT as we meal plan before the as start of the week. We will report back how it goes.