Skip to main content
Crowdfunding
Python + AI for Geeks
Practice

Asking Directly Without Examples - Zero Shot Prompting

Chapter 2 introduces key terms and techniques frequently mentioned in prompt engineering.

If you're interested in AI, you've likely come across terms like Zero-shot/Few-shot prompting and the next-gen search method called RAG (Retrieval Augmented Generation). This chapter helps you explore various terms and techniques related to prompt engineering.

Let's start by learning about the fundamental technique in prompt engineering known as Zero Shot prompting.


What is Zero Shot Prompting?

In AI learning, Shot means example. So, zero shot refers to handling new tasks, not specifically trained for, by leveraging what the AI has learned beforehand, i.e., without providing specific examples.


Examples of Zero Shot Prompting

Zero Shot Prompt Example 1
Please explain the difference between aerobic and anaerobic exercise in under 200 words.
Zero Shot Prompt Example 2
Tell me which is the highest mountain in the world and its height.

In the above cases, AI interprets the prompt and generates outcomes solely based on pre-trained data, a process known as Zero Shot Prompting.

Everyday prompts without examples are usually categorized as zero shot prompts.

Note: Prompts that include a few examples, like the one below, are called Few-Shot prompts.


Few-Shot Prompt Example
Here are examples of a few news articles. Each article is categorized under a specific category.

Article: "The trade negotiations between nations have made progress. Economic experts view this positively."
Category: Economy

Article: "A famous actor announced their role in a new film. Fans are thrilled."
Category: Entertainment

Now, categorize the following article.

Article: "Recent studies indicate that healthy eating habits can reduce the risk of heart disease."
Category:

We will cover Few-Shot prompting in more detail in the next lesson.


What are the advantages of Zero Shot Prompting?

  • Quick Result Generation: Minimizes the time it takes to draft prompts and allows rapid utilization of existing models without the need for additional training in new fields or tasks.

  • Flexibility: Not bound by specific examples or data, it can flexibly respond to user prompts and tackle various fields of tasks.


What are the drawbacks?

  • Accuracy and Expertise Issues: For tasks in unlearned fields, there might be a decrease in the accuracy of responses.

  • Time Wastage Due To Ambiguity: Without clear guidelines, AI may struggle to provide correct answers. This may necessitate more interaction between the user and AI, leading to unnecessary time expenditure.


Practice

Send in prompt examples and compare AI's responses.

Want to learn more?

Join CodeFriends Plus membership or enroll in a course to start your journey.