Instantiating a Variable in a Prompt Template
A variable in a prompt template, such as {∗premise∗}, serves as a placeholder that is filled with specific information. For instance, to use the template If {∗premise∗}, what are your suggestions for a fun weekend., a user might provide the input premise = the weather is nice this weekend. This substitution replaces the variable to generate the final, contextualized prompt: If the weather is nice this weekend, what are your suggestions for a fun weekend.

0
1
Tags
Ch.3 Prompting - Foundations of Large Language Models
Foundations of Large Language Models
Foundations of Large Language Models Course
Computing Sciences
Related
Instantiating a Variable in a Prompt Template
A developer is building an application that generates personalized weekend activity suggestions. The application must use two specific pieces of user information: their budget (e.g., 'low', 'high') and their location (e.g., 'city', 'countryside'). Which of the following text structures is best designed to be programmatically filled with this information to consistently generate the most relevant suggestions?
Designing a Conditional Prompt Template
Improving a Prompt Template for Better Weekend Suggestions
Learn After
A user is working with a pre-defined text structure that includes a placeholder for a specific piece of information. The final, completed text that is processed is as follows:
Translate the following sentence into French: The quick brown fox jumps over the lazy dog.Given that the original structure was
Translate the following sentence into French: {sentence_to_translate}, what specific text was used to replace the{sentence_to_translate}placeholder?Completing a Prompt Structure
A system uses the text structure
Summarize the following email for {recipient_name}: {email_body}to generate requests. If the placeholder{recipient_name}is filled with the textAlexand the placeholder{email_body}is filled with the textThe team meeting has been rescheduled to 3 PM on Friday., the final, complete text generated by the system will be: ____