Zero-Shot Prompting: Asking Without Examples
Let us start with Zero-Shot prompting, the most fundamental of the prompting techniques.
What Is Zero-Shot Prompting?
In AI learning, a shot means an example. So zero-shot refers to handling a new task that the model was not specifically trained on, relying solely on what the AI learned during pre-training.
Zero-Shot Prompt Examples
Explain the difference between aerobic and anaerobic exercise in 200 characters or fewer.
Tell me the name of the tallest mountain in the world and its height.
When AI is asked to interpret a prompt and produce a result using only its pre-trained data, with no additional examples, this is called zero-shot prompting.
Most everyday prompts that do not include separate examples are classified as zero-shot prompts.
Note: A prompt that includes a few examples, like the one below, is called a
Few-Shotprompt.
Below are examples of news articles, each classified into a specific category.
Article: "Trade negotiations between countries are making progress. Economic experts view this positively."
Category: Economics
Article: "A famous actor has announced they will appear in a new film. Fans are thrilled."
Category: Entertainment
Now classify the category of the article below.
Article: "According to a recent study, a healthy diet can reduce the risk of heart disease."
Category:
We will cover Few-Shot prompting in detail in the next lesson.
What Are the Advantages of Zero-Shot Prompting?
-
Fast results: Minimizes the time spent writing prompts and allows you to quickly leverage an existing model without additional training on new domains or tasks.
-
Flexibility: Not limited to specific examples or data, it can flexibly respond to a wide range of tasks across different fields based on the user's prompt.
What Are the Disadvantages?
-
Accuracy and expertise issues: For tasks in domains the model has not yet learned, answer accuracy may be lower.
-
Time wasted due to ambiguity: When there are no clear guidelines, it can be difficult for AI to provide the right answer. In those cases, more back-and-forth between the user and AI is needed, which can waste time.
Want to learn more?
Join CodeFriends Plus membership or enroll in a course to start your journey.