One-shot Prompt

Definition

A prompting technique that provides the model with a single example of the task before asking it to perform a similar task. This approach gives the model context about the expected input-output format and style.

Characteristics

Example

Prompt:

Translate the following English sentence to French:
English: "Hello, how are you?"
French: "Bonjour, comment allez-vous?"

Now translate this sentence:
English: "Good morning."
French:

Expected Response: "Bonjour."

Use Cases

Benefits

Limitations

Best Practices

When to Use