Parameters
Learn how to use parameters in your prompts.
What are parameters?
Parameters are dynamic values that you can use in your prompts to make them more flexible and reusable. Instead of hardcoding specific information into your prompts, you can use parameters as placeholders that can be filled with different values each time the prompt is used.
How to use parameters
To use parameters in your prompts, follow these steps:
-
Define the parameter: Use double curly braces
{{}}
to define a parameter in your prompt. For example:{{user_name}}
. -
Use the parameter: Include the parameter in your prompt text where you want the dynamic value to appear.
-
Provide values: When calling the prompt, provide values for each parameter you’ve defined.
Using parameters in the playground
When testing your prompt in the playground, you can easily set parameter values:
- In the playground, you’ll see a “Parameters” section next to the prompt input.
- For each parameter you’ve defined in your prompt, an input field will appear.
- Enter the desired value for each parameter in these fields.
- As you type, you’ll see the parameter values update in real-time within the prompt text.
This allows you to quickly test different parameter values and see how they affect your prompt’s output.