01 · Zero-shot

No examples. Just ask.

01Zero-shot

Group 01 · 12 techniques

Zero-shot

No examples. Just ask. Ask the AI one question. Example: 'Write a poem about trees.'

Each slide shows one technique: the plain prompt, the same prompt with the technique applied, and what changed. Use the arrows, the keys ← →, or pick a technique on the left.

Zero-Shot Prompting

Task done with zero exemplars - instruction only.

The prompt

Write a poem about trees.

What happened

In the Prompt Report MMLU test (gpt-3.5-turbo) Zero-Shot beat all Zero-Shot-CoT variants.

Role Prompting

Assign a specific role or persona to the model in the prompt.

Before

Write a travel article about Lisbon.

After · new words marked

Act like a travel writer and write a travel article about Lisbon.

What happened

Can create more desirable outputs for open-ended tasks; in some cases may improve accuracy on benchmarks.

Style Prompting

Specify the desired style, tone or genre in the prompt to shape the output.

Before

Write about the ocean.

After · new words marked

Write about the ocean in a lyrical, melancholic style, like a sea shanty.

What happened

Similar effect achievable via role prompting; style instruction shapes tone directly.

Emotion Prompting

Add psychologically resonant phrases (e.g. importance to the user) to the prompt.

Before

Solve this math problem: [problem]

After · new words marked

This is important to my career. Solve this math problem: [problem]

What happened

May lead to improved LLM performance on benchmarks and open-ended text generation (EmotionPrompt, Li et al. 2023).

System 2 Attention (S2A)

Two-step: the LLM first rewrites the prompt removing information unrelated to the question, then answers the rewritten prompt.

Before

Answer the question, ignoring the distracting story around it: [long prompt]

After · new words marked

First rewrite the question removing all information unrelated to it, then answer the rewritten question.

What happened

Removes distracting / irrelevant context before answering (Weston & Sukhbaatar 2023).

SimToM

For multi-person questions: establish what one person knows, then answer using only those facts (two-prompt process).

Before

What does Alice think is in the box? [story with several characters]

After · new words marked

First, list only what Alice knows from the story. Then, using only those facts, answer: what does Alice think is in the box?

What happened

Can help eliminate the effect of irrelevant information (Wilf et al. 2023).

Rephrase and Respond (RaR)

Instruct the LLM to rephrase and expand the question before answering.

Before

What is the capital of Australia? [ambiguous question]

After · new words marked

Rephrase and expand the question, and respond.

What happened

Demonstrated improvements on multiple benchmarks (Deng et al. 2023).

Re-reading (RE2)

Add 'Read the question again:' and repeat the question in the prompt.

Before

Solve: [complex question]

After · new words marked

Read the question again: [complex question repeated]. Now solve it.

What happened

Shown improvement in reasoning benchmarks, especially with complex questions (Xu et al. 2023).

Self-Ask

The LLM first decides if follow-up questions are needed; if so it generates them, answers them, then answers the original question.

Before

Who was the US president when the first iPhone was released?

After · new words marked

Decide what follow-up questions you need, answer them, then answer the original question.

What happened

Decomposes via self-generated sub-questions (Press et al. 2022).

Prompt Template

A prompt template is a function with variables that are replaced by media (usually text) to create a prompt; that prompt is an instance of the template.

Before

Write a new prompt for each tweet.

After · new words marked

Use one template: 'Classify this tweet as positive or negative: [tweet]' - insert each tweet in turn.

What happened

One template, many instances; the Prompt Report's Fig. 1.2 shows tweet binary classification this way (Shin et al. 2020).

Six Components of a Prompt

A prompt is built from: Directive, Examples, Output Formatting, Style Instructions, Role / persona, Additional Information.

Before

Write a prompt with just the question.

After · new words marked

Directive: write a poem. Examples: [one example]. Output formatting: Markdown. Style: lyrical. Role: poet. Additional info: sign it 'Muse'.

What happened

The Prompt Report's six-component model (section 1.2.1); structuring may reduce performance (Tam et al. 2024) or improve it (Kurt 2024).

Put Key Information at the Start or End (Lost in the Middle)

Models use information at the beginning (primacy) or end (recency) of a long context best, and worst in the middle.

Before

Put the key document in the middle of 20 documents, then ask the question.

After · new words marked

Put the key document first or last, and put the query before AND after the documents.

What happened

GPT-3.5-Turbo multi-document QA accuracy fell below its 56.1% closed-book score when the answer document was in the middle - worse than with no documents at all.