Skip to main content

Scenario 1: Question-Answer

This scenario is the most common way to use AI products. Taking ChatGPT as an example, you simply ask a question, and ChatGPT provides an answer, like this:

Q&AExample.png

For this scenario, prompts just need to follow the basic principles I covered earlier. But note different AI models have different strengths, so prompts may need tweaking per model. Also, current AI can't do everything - no prompt optimization will get an answer for some questions. For ChatGPT:

  • It's better at factual questions, like "What is Newton's Third Law?" But not subjective ones like "Who is the best soccer player?"
  • Its data cuts off September 2021. So questions after that like "Who is the current US President?" get "As of September 2021, the president is Joe Biden."
🔴 Help Needed

This type of direct questioning prompt is called a zero-shot prompt. The model uses general prior knowledge or patterns learned during training to make inferences and predictions for new tasks or domains. You will learn more about this in the advanced section, along with other interesting use cases.

As mentioned in the basic usage section, multi-turn conversations are important for question-answering. You can ask followups on a topic.

Tip 1: To Do and Not To Do​

caution

The tips I provide can actually be applied to various scenarios. I explained them in a specific scenario because I believe they are more likely to be used in that scenario, and making them easier to remember. It does not mean that these tips can only be used in that specific scenario. Additionally, mixing multiple tips is also a good approach.

In the question-answer scenario, to make AI's answers more accurate, it is common to include conditions in the questions. For example, asking AI to recommend a movie to you, e.g. "Recommend a movie to me." However, this prompt is too broad, and AI cannot provide a direct answer. Instead, it will ask you what type of movie you're interested in, resulting in a time-consuming conversation.

To be more efficient, prompts often say something like:

DO NOT ASK FOR INTERESTS. DO NOT ASK FOR PERSONAL INFORMATION.

With that, ChatGPT's latest API will just recommend a movie instead of asking you questions:

Certainly! If you're in the mood for an action-packed movie, you might enjoy "John Wick" (2014), directed by Chad Stahelski and starring Keanu Reeves. The movie follows a retired hitman named John Wick who seeks vengeance against the people who wronged him. It's a fast-paced and stylish film with lots of thrilling action sequences and an engaging story. If you're looking for something that will keep you on the edge of your seat, "John Wick" is definitely worth a watch!

But older models like Davinci-003 may still ask about your interests:

Sure, I can recommend a movie based on your interests. What kind of movie would you like to watch? Do you prefer action, comedy, romance, or something else?

So OpenAI's best practices say:

Instead of just saying what not to do, say what to do instead.

In my experience, though new models understand "Not To Do", for decisive answers it's more efficient to state allowed actions. Back to the movie example:

Recommend a movie from the top global trending movies to me.

Of course, this doesn't mean that "Not Todo" should never be used:

  • If you've clearly constrained the task already and want to narrow it further.
  • For exploration, when you only know what not to include. Add Not To Dos to help the AI respond, then optimize later.

Here are some examples of Less Effective vs Better prompts to try:

ScenarioLess EffectiveBetterReason
Recommend essential English words for IELTSPlease suggest me some essential words for IELTSPlease suggest me 10 essential words for IELTSThe latter prompt is more specific. The former prompt may provide around 20 words. There is still room for improvement, such as adding more qualifying words like words starting with the letter "A".
Recommended places to visit in Hong KongPlease recommend me some places to visit in Hong Kong. Do not recommend museums.Please recommend me some places to visit in Hong Kong including amusement parks.The latter prompt provides more accurate and efficient recommendations. However, if you want to explore more options, the former prompt can also be used.