πŸ’¬ AI Training Tuesday: Let's take a shot at better prompting

Your ChatGPT, Copilot, and AI tools can be lackluster. Let's improve that!

πŸ’¬ AI Training Tuesday: Let's take a shot at better prompting
A simple prompt may get you an answer, but not the one you want.

What is a prompt?

ChatGPT, Claude, Copilot, Mistral, Perplexity, and all other so-called LLMs (or Large Language Models) start with a prompt.

That simple little blinking cursor has the backing of trillions of bits of information, which we will refer to as knowledge. That knowledge can be used in many ways. Here are just a few business examples:

Use Case Description
Customer Support Chatbots, FAQs
Content Creation Blogs, articles
Employee Training Guides, support
Sales Assistance Follow-ups, emails
Project Management Tasks, risk analysis
HR Management Recruiting, onboarding
Business Planning Forecasts, reports

Bill, I have tried prompting, and it is terrible!

When Apple released the iPhone 4 in 2010, they introduced a leap forward in cellular signal strength by putting the primary antenna system around the frame of the iPhone. Following the phone's release, people could hold it a certain way and watch the bars of cellular strength quickly dissipate.

Steve Jobs's famous response was simple: "Just avoid holding it in that way."

A picture of Steve Jobs announcing the new antenna in the iPhone, which did not go over well, with Steve Jobs famously responding with "Just avoid holding it in that way."
Steve Jobs introduced the iPhone 4 and responded to antennae problems, courtesy of Apple, Inc. and Engadget.

An excellent prompt signals that you want to articulate your expectations; you are probably using it wrong 🫒.

ℹ️
Throughout this article, I refer to LLMs (large language models). I am referring to AI chatbots like ChatGPT, Copilot, Claude, Mistral, etc.

🎯 Let's start with some shots

One of the most important things to know when conversing with an LLM is that it will always attempt to give you a thoughtful response, no matter what you type for a prompt. Therefore, your prompt matters a lot.

For example, if you type "Tell me a story," the LLM will likely respond with an incredibly bland story. That example of "Tell me a story" is what people in AI and machine learning call a zero-shot prompt.

I will share the following three baseline prompt types so you can better understand how the LLM works and receive higher-quality responses. At the end of this article, I will combine everything you learn with a real-world example.

  • Zero-shot (ambiguous)
  • One-shot (add context)
  • Few-shot (articulating your expectations)

🀞 Zero-shot prompts (or probably why you think ChatGPT and other LLMs are terrible)

In this scenario, you create an open-ended prompt without telling it to draw on specific knowledge.

Let's pretend you are a parent. You say, "Go outside." What does that mean to you compared to what the child thinks?

Does "Go outside" mean "Stay in the backyard?" or "Go on a bike ride" or "Mow the lawn?" This is to say most zero-shot prompts follow the adage "garbage in, garbage out."

❌
Here are zero-shot examples that will give you poor results:

"Write me an essay."

"How can I drive this?"

"What is the best way to solve all problems?"

That is not to say zero-shot prompts don't work. For example, if the parent says, "Do your homework" or "Clean your room." A child likely has enough knowledge of what that means to go ahead and take action without further clarification.

βœ…
Here are some zero-shot examples that will likely give you decent results:

"What are some ways to handle stress?"

"Translate 'no onions' to Spanish."

"Explain meteorology."

πŸ˜Άβ€πŸŒ«οΈ One-shot prompts (let's add a little context)

In this scenario, you prompt the LLM with a single example of the task to perform. This provides guidance and sets an expectation of what you want the result to look like.

You are still the parent in this example, but now you say, "Go outside and play on the swings with your sister."

Notice how, this time, you did not simply say, "Go outside," but instead, you specified what to do. That is an example of a one-shot prompt.

βœ…
Here are some examples of one-shot prompts:

"What are some ways to handle the stress of my manager giving me too much work?"

"Give me a polite translation for 'No onions on my tacos.'"

"Explain meteorology as it relates to clouds."

Imagine someone you don't know walking up to you, looking you in the face with no readable expression, and their hands are at their side. They then go on to say, "What's that?" Think about how you would react and respond. You might look behind you, worried that something is happening, or maybe you say, "Oh, that is my coffee from across the street; you should check it out; they make a great macchiato!"

If that same person asks, "What's that on your shoulder?" You can confidently respond, "Oh, that's my pet parrot!" That tiny bit of context meant everything, so a one-shot prompt will almost always be better than a zero-shot prompt.

Few-shot prompts (articulating your expectations)

In this scenario, you provide the LLM with more than one example of what you require in the response.

As a parent, we first gave our child a zero-shot (ambiguous) prompt of "Go outside." We then modified that to add context, like a one-shot prompt: "Go outside and play on the swings with your sister."

Using the few-shot method, we can tell our child, "Go outside and play on the swings with your sister. Don't forget you can also use the slide and play in sandbox. If you use the sandbox, you can create a castle!"

βœ…
Here are some examples of few-shot prompts to help you get the results you want:

"What are some effective strategies for managing the stress caused by an overwhelming workload from my manager? Could you suggest how I might approach my manager to discuss feeling overburdened without causing conflict or appearing incompetent? What are some signs that the workload is becoming too much, and it might be time to seek additional help or resources?"

"Give me a polite translation for 'No onions on my tacos.' But also share how I can tell them I am not allergic to onions. For example, share that I am okay with pickled or cooked onions."

"Explain meteorology as it relates to clouds. For example, how do different types of clouds impact weather forecasting?"

As you can see, adding a little extra clarification to your prompt will help improve the response you receive.

πŸ’¬ Let's not forget LLMs can chat

In my experience, if you are doing anything of consequence, you rarely get the exact response you want from your prompt the first time. That is why you want to embrace the "chat" part of ChatGPT and other LLMs.

Just for fun, let's kick off the conversation by creating an invitation for a corporate retreat using a few-shot prompt:


Prompt: We just launched our first product and must take it to the next level. To this end, we will draw inspiration from the great outdoors and retreat to a lodge for a long weekend. Create a one-paragraph professional invitation representing having fun but in a business setting.

LLM response: We are thrilled to announce an exciting retreat to celebrate our first product launch and plan our next big steps. Join us for a long weekend at a charming lodge in the great outdoors. This retreat promises a perfect blend of productive sessions, team-building activities, and relaxation amidst nature's beauty. We will brainstorm innovative ideas, strengthen our bonds, and recharge for the challenges ahead. Let's embrace this opportunity to connect, collaborate, and have fun in a professional yet invigorating setting.
We look forward to seeing you there and taking our success to the next level.


πŸ’‘
It might look good to you now, but I see some problems. For example, I did not share the date or an RSVP link or tell people that this is a company event only, so no family or friends. Let's improve it!

Prompt: Whoops! I forgot to mention it will be Thursday through Monday; it is a corporate event, so there will be no family, friends, or pets. Also, mention a link I will include to RSVP.

LLM Response: We are thrilled to announce an exciting retreat to celebrate our first product launch and plan our next big steps. Join us for a corporate event from Thursday through Monday at a charming lodge nestled in the great outdoors. This retreat promises a perfect blend of productive sessions, team-building activities, and relaxation amidst nature's beauty. Together, we will brainstorm innovative ideas, strengthen our bonds, and recharge for the challenges ahead. Please note this is a corporate event, so family, friends, and pets are not permitted. Let's embrace this opportunity to connect, collaborate, and have fun in a professional yet invigorating setting. Click [here] to RSVP. We look forward to seeing you there and taking our success to the next level.


πŸ’‘
The LLM gave me a decent message, but this charming lodge nestled in the great outdoors and strengthening our bonds seems a little too much like a date than a corporate retreat. Let's see if we can improve that.

Prompt: The language you use, like strengthening our bonds and being nestled in the great outdoors, sounds too much like a date. Try again, keeping the language more professional but definitely making it upbeat!

Response: We are excited to invite you to a special corporate retreat to celebrate the launch of our first product and strategize for future success. Join us Thursday through Monday at a well-appointed lodge in a beautiful outdoor setting. This retreat will offer a productive mix of strategic planning sessions, team-building activities, and opportunities to relax and recharge. Please note this is a corporate event, so family, friends, and pets are not permitted. Your participation is critical as we look to innovate and drive our next growth phase.
We look forward to a productive and enjoyable weekend together! Click [here] to RSVP.


There! That looks great. The LLM followed – and remembered – the entire conversation so I could iterate on different ways to communicate the corporate retreat. I might now include that content in an email with my spin on the communication and add more detail, but I have a head start!

πŸŽ‰ Final thoughts

When you converse with the LLM, chat with it like you would a person. After all, the LLMs are trained on how people speak and respond to each other!

While I do not expect you to remember zero-shot, one-shot, or few-shot theories, I hope these concepts get you closer to improving your use of LLMs to enhance your interactions and get better results.

Have an idea? Want to share this newsletter with others?

If you have an idea for a topic you'd like me to cover, please get in touch with me at bill@billtalksai.com. Also, if you found this article helpful, please ask them to subscribe for free at https://billtalksai.com.