Categories
AI AI: Large Language Models AI: Prompting Bing Chat ChatGPT Claude Google Bard Haiku

Crafting Effective Prompts for Your AI Assistant (Claude, ChatGPT, Bard, etc.)

webpage of chatgpt a prototype ai chatbot is seen on the website of openai on iphone or smartphone
Photo by Sanket Mishra on Pexels.com

Interacting with an AI assistant like Claude is a two-way conversation. To get the most out of your digital assistant, you need to know how to provide useful prompts that set it up for success. Follow these prompt writing tips when chatting with your AI:

Be Direct and Clear

Don’t beat around the bush when posing questions or requests to your AI assistant. Vague or ambiguous prompts will lead to vague and ambiguous responses from the AI. Get straight to the point and be as specific as possible about what you want it to do. Break down complex instructions into simple, step-by-step prompts to guide the AI.

Provide Sufficient Background

Don’t assume your AI assistant has any implied common sense or knowledge about your request. The AI only knows what’s in its training data! Give sufficient background and context in your prompts to set the AI up to respond appropriately. If you’re asking about a specific person or event the AI isn’t likely familiar with, give a brief explanation.

Ask Focused Questions

Open-ended questions can sometimes lead your chatbot down useless tangents. If you want specific info, ask specific follow-up questions rather than overly broad ones. You’ll get better results by being laser-focused on the information you need.

Check Responses and Follow Up

Your AI assistant is learning all the time. Check its responses to see if they actually provide what you were looking for, and follow up if it seems off track. You can rephrase your original prompt or ask clarifying questions to get the AI back on a useful path. Consider it a collaborative process.

Test the Limits

Feel free to get creative in testing the limits of your AI assistant’s capabilities. Novel prompts encourage the AI to expand what it can handle. Just be sure to provide plenty of guidance and background if you’re requesting something unusual or complex.

Give Your AI a Role to Play

When chatting with your AI assistant, it can be hugely beneficial to explicitly give it a role to play, such as teacher, travel agent, cooking assistant, or even friend. Defining a role provides necessary context that your AI needs to adapt its responses and language appropriately.

Without any framing, your assistant has no way of knowing how to act or what kind of information you need. A vague conversation with an undefined AI assistant can quickly go off the rails. But when you assign a clear role, it focuses the dialogue and reduces misunderstandings.

The role you give your AI doesn’t have to be rigid or limiting. Think of it as providing a general framing, tone, and personality that fits your needs for that particular conversation. Just tell your assistant “Act as my tutor and explain this concept to me.” Or “Pretend you’re a museum tour guide and describe this painting.”

Taking on a role allows your AI to access the right knowledge, terminology, and communication style to have a productive, natural dialogue. With the power of role-playing, your AI assistant can become an even more effective conversation partner!

Some Prompt Examples You Can Try

To see your AI assistant’s skills in action, give some longer, more descriptive prompts like these a try:

  • “Imagine you are an art museum tour guide named Sam leading a group through the impressionist gallery. In an enthusiastic but professional tone, explain the key characteristics of Monet’s painting style and describe what makes his Water Lilies painting a quintessential example of impressionism.”
  • “Act as a friendly chess tutor named Alex teaching me, a novice player, strategies for the first 10 moves as white in a classic game opening. Use simple, straightforward language to clearly explain the objectives of different standard openings and why they are solid foundational openings for white.”
  • “Pretend you are a home repair specialist named Jamie and I’m a customer needing help fixing my broken kitchen faucet. Walk me step-by-step through how to remove the faucet handle, disassemble and inspect the internal parts, replace any faulty washers or O-rings, and reassemble everything to get the faucet working again.”
  • “You’re an accomplished pastry chef named Pat teaching me how to bake chocolate chip cookies from scratch. Explain in a warm, patient tone the key steps from mixing dry and wet ingredients properly to getting the baking time and temperature right. Share any tips to ensure the cookies turn out perfectly chewy.”
  • “Imagine you are a professional genealogist named Gene helping me trace my ancestry. I’ve hit a roadblock finding records about my great-grandfather who I believe was born in Ireland around 1885 before immigrating to New York City. In a warm, encouraging tone provide step-by-step guidance for how to locate passenger manifests, naturalization records, birth/marriage/death certificates, and other documents that could shed light on his origins and immigration journey. Feel free to ask clarifying questions if you need any additional details from me. Your role is to patiently coach me through breaking through this genealogy brick wall using targeted record searches.”

Prompt for Haiku

To showcase your AI’s creative writing skills, try a prompt like:

  • “Write a haiku poem about viewing cherry blossoms in spring. Describe the delicate pink flowers blooming on branches and scattering in the wind. Convey a tranquil, reflective mood. Follow the 5-7-5 haiku structure with 3 lines and appropriate season word.”

This provides context about the haiku’s theme, asks the AI to use descriptive language and imagery, gives guidance on mood and structure, and defines the specific creative writing form. Framing poetic prompts in this way allows your AI to tap into its artistic expression. You can guide it to compose haiku, limericks, sonnets, and more on any topic you choose!

See also my post about writing haiku with ChatGPT.

Summary

Giving longer prompts with more conversational detail and specific instructions allows your AI assistant to generate richer, more natural responses. Don’t be afraid to really set the scene and adopt a persona when framing your requests! For even more, see my post Multi-step prompting for Claude.

Please share what you’ve learned about effective prompts that you’ve discovered!

Credit: Drafted with the assistance of Claude, an AI assistant created by Anthropic.

Categories
AI AI: Large Language Models Bing Chat ChatGPT Claude Creativity Google Bard

Hacking Creativity with AI

Abstract surface of Multicolored splash watercolor blot. Artistic hand-painted vector, element for banner, poster, card, cover, brochure.

On my walk this morning I listened to the latest episode of Cal Newport’s podcast Deep Questions which was about “creativity hacking”. He reviewed a couple of his techniques, shared a few links to good articles related to the topic, etc. For example, he talked about using different venues for working – such as moving between multiple locations in a single day. He cited several other techniques that he’s used all of which involved helping lift your mind out of the mundane to stimulate its ability to get creative.

Listening to Cal stimulated my mind to make the bridge between something like working on a whiteboard in front of a group of colleagues and, in lieu of humans, working on a topic with an AI chatbot like Claude, Bard, ChatGPT, etc.

I’m drawn to this approach because of just how low the overhead is to start to use chatbots for helping in my thinking and creativity processes. Unlike other humans, the chatbots are always available – 24×7 – and generally they’re pleasant and polite to interact with. Sometimes humans are too but they can also be unpleasant and impolite!

The speed of the interaction with a chatbot is probably slower than with another human or group of humans but I don’t find that to be an issue. In some ways, the ability to just pause, give me time to think, and then interact again with a chatbot is more pleasant and completely eliminates any peer pressure I might be feeling.

I can also use chatbots to respond to challenging questions I might ask or have it brainstorm wild ideas, or roleplay different perspectives – all of which help to get my creative juices flowing. A friend would do the same – but, again, the low overhead nature of creativity hacking with a chatbot is very attractive to me. I can also spread my chatbot interactions around between the various AI chatbots. They’ll bring different perspectives, just like a group of my friends might. I might also ask a chatbot to help me think about an idea from the perspective of a particular historical figure (e.g., “what would Steve Jobs say about this idea?”).

I’m increasingly finding the benefits of this chatbot approach helping me in my creative work. For example, while writing this blog post, I asked for a critique of it from one of the chatbots. Over a few interactions, I was able to gain some new insights to include which hopefully made it even better.

Update: this morning Andrew Chen posted a great article titled “How I use AI when blogging and writing” which explores his experiences using AI chatbots to help with blog posts, generating topic ideas/questions, and even starting a book outline. Definitely worth reading!

Categories
AI AI: Large Language Models Bing Chat ChatGPT Claude Google Bard

How Much Pepperoni?

pizza on brown wooden board
Photo by Brett Jordan on Pexels.com

I was intrigued by this sentence in a recent column by Bloomberg’s Matt Levine: The stereotypical way that a management consulting interview works is that you get asked questions like “how much pepperoni  is sold in the US every year,” and then you reason your way to some estimate of the answer.

When I read this, I thought it would be fun to play with my favorite chatbots again and see if they might help me reason my way to an answer. I got very different results – not surprisingly. The prompt I used was:

The stereotypical way that a management consulting interview works is that you get asked questions like “how much pepperoni  is sold in the US every year,” and then you reason your way to some estimate of the answer. Let’s reason step by step to try to find an answer to this question.

First, here’s what I got back from Google Bard:

Sure, here is a step-by-step process of how to reason our way to an estimate of how much pepperoni is sold in the US every year:

  1. Gather some basic facts. We know that the average American eats 24 pounds of pizza per year, and that pepperoni is the most popular pizza topping, accounting for about 30% of all pizza orders. We also know that there are about 330 million people in the US.
  2. Make some assumptions. We need to make some assumptions about how much pepperoni is used per pizza. A conservative estimate might be that each pizza uses 1 ounce of pepperoni. This means that the average American eats about 2.4 ounces of pepperoni per year.
  3. Do some math. We can now estimate that the total amount of pepperoni sold in the US every year is about 800 million ounces. This is equivalent to about 250 million pounds.

This is just an estimate, of course, but it is based on some reasonable assumptions. It is likely that the actual amount of pepperoni sold in the US is higher than this, but it is also possible that it is lower. More accurate estimates could be made by collecting more data and making more refined assumptions.

Here are some additional factors that could be considered to improve the accuracy of the estimate:

  • The amount of pepperoni used per pizza can vary depending on the size of the pizza, the type of pizza, and the restaurant.
  • The popularity of pepperoni may vary from region to region in the US.
  • The amount of pepperoni imported into the US may also be a factor.

By considering these factors, it is possible to make a more accurate estimate of the amount of pepperoni sold in the US every year.


Next up was ChatGPT:

Of course, I’d be glad to guide you through the process of reasoning to estimate the amount of pepperoni sold in the US every year. It’s important to note that management consulting interviews often focus on assessing your problem-solving skills and ability to think logically. Let’s break down the problem step by step:

Step 1: Clarify the Scope Before we begin, it’s essential to clarify the scope of the question. Are we looking for the total weight of pepperoni sold, or the total revenue generated from its sales? This distinction will influence the data sources we’ll need to consider.

Step 2: Identify Relevant Data Sources To estimate the amount of pepperoni sold in the US, we’ll need to gather data from reliable sources. These could include industry reports, government statistics, market research firms, and food industry associations. Some possible sources might be the U.S. Department of Agriculture (USDA) and organizations like the American Meat Institute.

Step 3: Estimate Total Consumption One approach could be to start with the total meat consumption in the US and then estimate what percentage of that is likely to be pepperoni. You might need to consider factors such as the popularity of pizza, sandwiches, and other dishes that use pepperoni. Additionally, think about variations in consumption due to cultural and regional preferences.

Step 4: Break Down Consumption Break down the total estimated consumption of pepperoni into categories such as retail sales (supermarkets and grocery stores) and food service (restaurants, pizzerias, etc.). This can help refine your estimate by considering different distribution channels.

Step 5: Estimate Quantity per Serving and Servings Estimate the average quantity of pepperoni used per serving. For example, how many slices of pepperoni are typically used on a pizza or in a sandwich? Then, multiply this by the estimated number of servings sold in a year.

Step 6: Adjust for Factors Consider any factors that might affect the estimate, such as seasonal variations in consumption (for instance, more pepperoni might be consumed during holidays or certain events) or any recent trends that might have impacted consumption patterns.

Step 7: Calculate the Estimate With all these factors in mind, you can proceed to calculate your estimate. Make sure to show your calculations and assumptions clearly.

Step 8: Validate and Compare After arriving at your estimate, it’s a good practice to validate it against any available data, if possible. Compare your estimate to industry reports or official statistics to assess its accuracy.

Remember, the goal of this exercise is not necessarily to arrive at an exact figure, but to showcase your ability to logically reason through a complex problem using available information. Feel free to ask questions if you need further clarification on any of these steps.


Next up is Claude:

Okay, let’s break this down:

First, we need to estimate how much pizza is sold in the US each year. Pizza is a very popular food, so let’s assume that on average, each American eats pizza once per week. With a population of around 330 million, that’s about 330 million pizzas sold per week, or around 17 billion pizzas per year.

Next, we need to estimate what percentage of those pizzas have pepperoni. Pepperoni is a very common pizza topping, so let’s assume it’s on 50% of all pizzas sold. That brings us to around 8.5 billion pepperoni pizzas per year.

Now we need to estimate how much pepperoni is on each pizza. Let’s assume an average pepperoni pizza has around 50 pepperoni slices. If each slice is roughly 1 ounce, that’s about 50 ounces or around 3 pounds of pepperoni per pizza.

With 8.5 billion pepperoni pizzas per year, each with around 3 pounds of pepperoni, that gives us an estimate of around 25.5 billion pounds of pepperoni sold annually in the US.

Of course this is just a rough estimate with a lot of assumptions. The actual amount may vary quite a bit. But walking through the logical steps and making reasonable assumptions is generally the approach for these types of brainteaser questions. Let me know if this helps explain the thought process!


Finally is Bing Chat:

That’s an interesting question. To estimate how much pepperoni is sold in the US every year, we can use some assumptions and data from the web search results. Here are some possible steps to follow:

  • First, we can assume that most of the pepperoni sold in the US is used as a pizza topping, since it is one of the most popular pizza toppings.
  • Second, we can use the data from 7 to estimate how much pepperoni is used on a pizza of different sizes. For example, a 12-inch pizza uses about 1.75 ounces of pepperoni, and a 18-inch pizza uses about 3 ounces of pepperoni.
  • Third, we can use the data from 6 to estimate how many pizzas are sold in the US each year. According to this source, there are 3 billion pizzas sold in the US each year.
  • Fourth, we can use the data from 13 to estimate what percentage of pizzas ordered are pepperoni. According to this source, 36% of people order pepperoni on their pizzas.
  • Fifth, we can multiply the number of pizzas sold by the percentage of pepperoni pizzas, and then multiply by the average amount of pepperoni per pizza. To simplify the calculation, we can assume that the average pizza size is 14 inches, which uses about 2.5 ounces of pepperoni according to 7.
  • Therefore, the estimated amount of pepperoni sold in the US each year is:

3 billion x 0.36 x 2.5 = 2.7 billion ounces

  • To convert this to pounds, we can divide by 16, since there are 16 ounces in a pound. This gives us:

2.7 billion / 16 = 168.75 million pounds

  • This is our final answer, based on the assumptions and data we used. Of course, this is only an approximation, and there may be other factors that affect the actual amount of pepperoni sold in the US each year.

I hope this helps you understand how to approach this kind of question. Do you have any other questions for me? 😊


Bard estimated 250 million pounds. Claude estimated 25.5 million pounds. Bing estimated 168.75 million pounds. ChatGPT didn’t provide an estimate – it just discussed a methodology to get to an answer (which is what’s more important in a job interview!).

What’s the correct answer? Some quick Google searching finds results around 250 million pounds a year – closest to Bard’s answer.

What can we learn from this little exercise? I would have expected both Bard and Bing Chat to have an advantage as they’re both capable of doing web searches while ChatGPT (3.5) and Claude aren’t. Bing actually cites specific web references. But the most useful result actually isn’t the final value – all of the chatbots demonstrated steps to go through to get to an answer and it’s the ability to demonstrate those steps that answers the interview question. I’m sure by continuing each of the conversations I could have gotten more insights from each of the chatbots. Meanwhile, I’m now hungry for a pepperoni pizza!