A Practical Guide to Dynamic Variables in Prompts
A static prompt answers one question. A templated prompt answers a hundred. The trick is variables — placeholders you fill in at send time. Here are the five types and when to reach for each.
1. Free text — {{Recipient}}
The everyday workhorse. Use it for names, topics, short phrases.
2. Multi-line text — {{...Context}}
When the input is a paragraph — background, a snippet of an article, meeting notes — give yourself room to type.
3. Number — {{#Count}}
For quantities and limits: "Give me {{#Count}} ideas." Keeps the model from guessing how many you want.
4. Single select — {{formal|casual|neutral}}
When there's a fixed set of choices, a dropdown beats free text. No typos, no ambiguity.
5. Multi select — {{+Python|Java|TypeScript}}
Pick several at once. Perfect for "Review this code in {{+Python|Java}}."
The payoff
Write the prompt once, fill the form, send. The same Code Review prompt now works for every language and every file — no rewriting, no hunting through history.