NLP

[Prompt Engineering] 2. Zer0-shot Prompting

dongsunseng 2025. 1. 2. 17:36
반응형

What is Zero-shot prompting?

  • In artificial intelligence, a "shot" refers to an example.
  • Therefore, zero-shot means the AI processing a new task without examples, in other words, handling tasks it hasn't specifically learned.
  • Zero-shot prompting refers to how AI like ChatGPT processes responses to prompts without specifically trained data or example answers.
  • Simply put, AI performs the requested task without seeing any examples.
  • It processes responses to prompts using only the knowledge learned during model training.

Examples

1. Text Classification

Classify the following text as either "Business", "Technology", or "Health":
"New research shows that regular meditation can reduce stress levels and improve sleep quality."

 

2. Sentiment Analysis

Determine if the following customer review expresses a positive, negative, or neutral sentiment:
"After waiting for 45 minutes, the food arrived cold and the waiter was nowhere to be found."

 

3. Language Translation

Translate the following English text to French, maintaining a formal tone:
"We look forward to meeting you at the conference next week."

 

4. Question Answering

Based on the following text, answer the question below:

Text: The Industrial Revolution began in Britain in the late 18th century and spread to other parts of Europe and North America during the 19th century. It marked a major turning point in human history.

Question: Where and when did the Industrial Revolution begin?

 

5. Summarization

Provide a brief summary of the following paragraph in no more than two sentences:

The Great Barrier Reef is the world's largest coral reef system, stretching over 2,300 kilometers along the northeast coast of Australia. It consists of nearly 3,000 individual reefs and 900 islands, supporting an incredibly diverse ecosystem of marine life including over 1,500 species of fish, 400 species of hard coral, and 4,000 types of mollusks.

 

6. Intent Classification

Identify the user's intent in the following customer service query as either "Request Information", "Technical Support", "Complaint", or "Account Management":

"I've been trying to log into my account for the past hour but keep getting an error message."

Furthermore

  • This is called zero-shot prompting, where AI interprets prompts and generates results using only pre-trained data without being given example answers.
  • Most prompts you use daily without examples are classified as zero-shot prompts.
  • So what about prompting with examples?
  • The method of performing tasks using a few examples is called Few-shot prompting.
  • The advantages of zero-shot prompting are:
    • Minimizes time spent preparing prompts
    • Can quickly utilize existing models without separate training for new fields or tasks
  • While zero-shot prompting specializes in quick and flexible interaction with AI, it may have lower performance or accuracy compared to models pre-trained for specific tasks.
  • A representative prompting engineering technique to compensate for this is the Few-shot prompting mentioned in the previous post of mine:
 

[Prompt Engineering] 1. Few-shot Prompting

What is Few-shot Prompting?In artifical intelligence, a "shot" refers to an exampleTherefore, Few-shot means a few examples.Few-shot prompting is a method that helps AI models better understand and perform new tasks by providing a small number of examples

dongsunseng.com

 


Great companies are built on great products.
- Elon Musk -
반응형