Example

Examples of Prompt Templates for Grammaticality Judgment

Grammaticality judgment can be reframed as a text generation task by using a prompt template, which often uses a placeholder like {*sentence*} for the text to be evaluated. The prompt's structure can vary significantly. For instance, given a sentence, several formats are possible:

  1. Question First: The query precedes the sentence. Question: Is this sentence grammatically correct? John seems happy today.

  2. Sentence First with Answer Cue: The sentence is followed by the question and a cue for the model's response. John seems happy today. Question: Is this sentence grammatically correct? Answer:

  3. Command-based Instruction: The prompt is phrased as a command followed by the sentence. Read the following sentence, and answer whether it is grammatically correct. LLMs are powerful models but are expensive to build.

  4. Sentence First with Natural Question: The sentence is presented, followed by a more conversational question, often on a new line. LLMs are powerful models but are expensive to build. Does this sentence make sense grammatically?

Image 0

0

1

Updated 2026-05-02

Contributors are:

Who are from:

Tags

Ch.2 Generative Models - Foundations of Large Language Models

Foundations of Large Language Models

Foundations of Large Language Models Course

Computing Sciences

Related