Example

Example of a One-Shot Prompt for Grammar Correction

A one-shot prompt for grammar correction enhances a basic prompt by including a single, complete example of the task, known as a demonstration. This allows the language model to learn from the provided context. The structure typically involves defining the model's role and task, presenting one correct input-output pair, and then providing the new input for the model to process. For example:

DEMO Input: There is many reasons to celebrate. Output: There are many reasons to celebrate.

USER Input: She don’t like going to the park. Output:

0

1

Updated 2026-05-02

Contributors are:

Who are from:

Tags

Ch.3 Prompting - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences