Variables

Variables let you document the expected inputs for your prompt templates. They're stored as metadata on the prompt configuration and displayed in the PromptDeploy UI.

Defining variables

Add a variables array to any prompt in your .promptdeploy.yml:

prompts:
  - path: prompts/system.txt
    name: System Prompt
    variables:
      - name: tone
        description: Voice tone for responses
        default: professional
      - name: language
        description: Output language
        default: en
      - name: max_length
        description: Maximum response length in tokens
        default: "500"

Variable fields

Field Required Description
name Yes Variable identifier — should match what your code expects
description No Human-readable description of what the variable controls
default No Default value, shown in the UI for reference

How variables are used

Variables in PromptDeploy are metadata only. They document the template variables your application uses when rendering the prompt, but PromptDeploy doesn't perform any template substitution itself.

For example, if your prompt file contains:

You are a helpful assistant. Respond in a {{tone}} tone.
Always reply in {{language}}.

The variables in your config document what {{tone}} and {{language}} mean, their defaults, and their purpose. Your application code is responsible for actually substituting the values at runtime.

Viewing variables

Variables appear on the prompt detail page in the PromptDeploy UI, giving editors context about what the prompt expects and how it's used in your application.