Example

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.

Image 0

0

1

Updated 2026-04-29

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