What is zero-shot prompting? | IBM

What is zero-shot prompting? | IBM


In contrast to zero-shot prompting, few-shot prompting provides the model with examples of expected input and output for the task.1 The preceding image diagrams the difference between zero-shot prompting and few-shot prompting, with one-shot prompting also shown as a special case. 

By using the same IBM granite-3-8b-instruct model, examples of “Issues” and their corresponding “Classes” for this task are provided.2 The three examples of input and output that are provided illustrate the few-shot prompting strategy. In response to this prompt, the model makes a reasonable prediction of the class “Medium” (as highlighted in bold).

Note: The prompt was executed with IBM watsonx.ai Prompt Lab by using the “Freeform” mode.

Set the Class name for the issue described to either High, Medium or Low. I’ve provided a few examples of issues and their corresponding Class names. Predict only the Class name for the last issue. Give a short description for why that Class name was chosen.

Class name: High

Description: An issue that has a high business cost, impacts many users or both.

Class name: Medium

Description: An issue that falls somewhere in between high and low.

Class name: Low

Description: An issue that has an impact on a few users, does not have a high business cost or both.

Issue: New users report that they cannot create accounts.

Class: High

Issue: A user reports that labels are rendering overlapping in the app’s analytics function.

Class: Low

Issue: Users in the United States are reporting that the app is crashing when trying to make a purchase.

Class: High

Issue: Users report that images are not loading in the app.

Class: Medium

Explanation: The issue of images not loading in the app impacts users’ experience and might cause frustration, but it does not have a high business cost or impact many users. Therefore, it is classified as a medium-level issue.

Few-shot prompting, which is a strategy derived from the few-shot learning paradigm, is typically used to improve the performance of the model over zero-shot prompting on a task.1 In this example, the AI model produces useful inferences in both the zero-shot and few-shot scenarios. In deciding whether to use zero-shot or few-shot prompting, one should consider the constraints of the problem and the demonstrated performance of both strategies. Reynolds and McDonell (2021) have found that with improvements in prompt structure, zero-shot prompting can outperform few-shot prompting in some scenarios.4 Schulhoff et al. (2024) find different results comparing the performance of several prompting strategies.5



Content Curated Originally From Here