Templates & Variables
Make your prompts dynamic with template variables. Use double curly braces like {{topic}} to insert placeholders that get filled in when running the prompt.
Add and edit variables
Click the { } button in the top-right corner of the editor to insert a new variable. A {{variable}} placeholder appears in your text, highlighted with a colored background. Click any highlighted variable to edit its name, type, constraints, default value, and description.
Variable types
| Type | Description | Example syntax |
|---|---|---|
| string | Basic text input | {{name}} |
| int | Integer with optional min-max range | {{count\\|int:1-100}} |
| float | Decimal number with optional min-max range | {{temp\\|float:0-1.5}} |
| enum | Dropdown with predefined options | {{tone\\|enum:formal,casual}} |
Set defaults and descriptions
Add a default value to pre-fill the variable when users run the prompt. Add a description to show hint text explaining what the variable expects. Both are optional.
Full syntax reference
The complete syntax for a variable is:
{{name|type:constraints:default:description}}
All parts after the name are optional. A simple {{topic}} works as a string variable with no constraints.
Fill in variables
When you run a prompt with variables in the Playground or Test Matrix, a Variables section appears where you can fill in each field. Variables render as the appropriate input for their type — text fields for strings, sliders for numbers with ranges, and dropdowns for enums.