Learn Before
Example of Instantiating a Placeholder in a Grammaticality Judgment Prompt
To create a complete input for a language model, a placeholder variable within a prompt template is substituted with the actual text provided by a user. For example, consider the following template designed to evaluate a sentence's grammar:
{*sentence*}
Question: Is this sentence grammatically correct?
Answer:
By replacing the {*sentence*} placeholder with a specific user input, such as the sentence "John seems happy today.", the finalized input is ready to be processed by the language model.
0
1
Tags
Ch.2 Generative Models - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Examples of Prompt Templates for Grammaticality Judgment
Example of Instantiating a Placeholder in a Grammaticality Judgment Prompt
Example of a Prompt for Grammaticality Judgment
A developer is building a system that uses a language model to summarize news articles. They need to create a single, reusable instruction that can work for any article provided by a user. Which of the following options correctly uses a placeholder to create such a flexible template?
Creating a Reusable Prompt Template
Match each term related to creating dynamic instructions for a language model with its correct description.
Examples of Prompt Templates for English-to-Chinese Translation
Example of a Sentence-First Prompt for Grammaticality Judgment with Answer Options
Example of a Constraint-First Prompt for Grammaticality Judgment
Learn After
An automated grammar-checking tool uses a predefined template to structure its requests. The template is:
Please evaluate the grammaticality of the following sentence: {*text_input*}. A user submits the sentence 'The book are on the table.' for evaluation. Which option below shows the correctly constructed final request after the user's sentence is inserted into the template?A system uses the template
Analyze the following sentence for grammatical errors: "{*user_sentence*}". If a user provides the sentenceThe childrens plays in the park., the complete input sent for analysis would be: ____.Constructing a Final Prompt from a Template
Example of LLM Output Generation for Grammaticality Judgment