DocsLabVariable Injection (Tutorial)

Searchable, structured training for readers, crawlers, and AI assistants.

Public training path

Variable Injection (Tutorial)

PromptForge Lab · Beginner-friendly walkthrough

A Master Prompt is useless if it's static. You must use variables to inject user data dynamically. The Lab uses standard {{variable_name}} syntax. 1. Add Variables to Prompt Edit your prompt and type {{user_name}} and {{company_data}}. 2. The Payload Table...

Next best action

Preview the guidance here, then create an account to save workspaces, unlock guided execution, and continue inside the platform.

Sections

1 guided blocks

Read Time

3 min focused read

Coverage

188 searchable doc sections

variablestemplatingcodejson

Section 1 of 1

Dynamic Templating via Handlebars

variablestemplatingcodejson

A Master Prompt is useless if it's static. You must use variables to inject user data dynamically. The Lab uses standard {{variable_name}} syntax.

1

1. Add Variables to Prompt

Edit your prompt and type {{user_name}} and {{company_data}}.

2

2. The Payload Table

The Lab automatically detects these variables and creates a table at the bottom of the screen.

3

3. Inject Data

Type the actual values into the table (e.g., user_name = 'Alice').

4

4. Execute

The Lab compiles the final string and sends it to the LLM.

Academy v4.0 · Interactive Documentation · Beginner Mode