Multi-Shot (Multiple Examples)
TLDR: Multi-shot prompting, also known as few-shot prompting, is a technique used in generating prompts for ChatGPT. It involves providing multiple example inputs or prompts to guide the model's responses. By exposing the model to a few different prompts, it can learn and generalize patterns, enabling more context-aware and diverse responses.
Also known as: Single-shot, Few shot, multiple examples
What is a Shot?
A shot is used in prompt engineering and it means 'examples' or 'prompt inputs'.
What is Multishot?
Multi-shot means multiple examples. It involves providing multiple examples in a prompt to train an LLM to respond in a structured manner. The structure it responds with is defined in the examples/shots provided.
When should you use it?
Suppose you want ChatGPT to summarize multiple analyst reports authored by different banks. You want the summary output to look in a particular way, e.g., [Bank 1] - [Rating - Sell/Buy], [Bank 2] - [Rating - Sell/Buy], etc.
In your prompt, you will then provide examples of the desired structure to guide ChatGPT into generating outputs based on those examples.
Common scenarios where it is utilized
Technical translation
Generating summaries/content based on a set structure
Customer service interactions
Examples
Translation
If you are developing a language translation system that aims to accurately translate technical documents across various disciplines. By providing the AI with multiple examples of well-translated technical documents, you enable it to grasp the nuances of different terminologies and domain-specific language.
Prompt: You are going to translate technical text from English into Chinese using technical Chinese in the translation.
I will provide three examples of a technical paragraph in English and its corresponding translation in Chinese. Follow a similar structure when translating a new paragraph.
Paragraph 1: English Text
Translation: Chinese Translation
Paragraph 2: English Text
Translation: Chinese Translation
Paragraph 3: English Text
Translation: Chinese Translation
Now Translate the following document: Document to translate
Specific Structure
Let's explore a different scenario: imagine you are developing a news summarization system that needs to compile concise summaries of news articles. To train the AI in generating structured summaries, you can provide a few examples of well-structured summaries in the desired format. This allows the AI to learn the underlying structure and apply it to summarize new articles effectively.
Prompt: You are going to summarize news articles into concise summaries I will provide three examples of news articles and their corresponding summary. Follow a similar structure when summarizing different news articles.
Article 1: Text
Summary: Article Summary
Article 2: Text
Summary: Article Summary
Article 3: Text
Summary: Article Summary
Summarize the following news article: Article to summarize
Last updated