Prompt Template

Last updated on November 12, 2024

Prompts are often constructed using prompt templates. A prompt template contains 1 or more variables that are filled in with specific values to create a prompt. For example, a prompt template for sentiment analysis might be "Classify this tweet as positive or negative: [TWEET]". The variable [TWEET] is filled in with the content of a tweet to create a prompt. Note that templates are not limited to text.

Footnotes

  1. Shin, T., Razeghi, Y., Logan IV, R. L., Wallace, E., & Singh, S. (2020). Autoprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv Preprint arXiv:2010.15980.


© 2025 Learn Prompting. All rights reserved.