Treat prompt templates like code: define a stable variable contract, review changes, and version updates before release.
Why This Matters
Variable Access Styles
You can access runtime arguments in two equivalent ways:Use
args.* for most custom business fields. It makes prompts easier to maintain as your variable set grows.General Jinja-Style Guidelines
Rapida prompt rendering uses Pongo2 (Jinja-style syntax).Use this safe subset for predictable behavior:
Supported patterns above are validated by parser tests in
pkg/parsers/pongo2_template_parser_test.go.Built-in Variables (What + Why)
system.*
assistant.*
conversation.*
message.*
Practical Production Example
Runtime Argument Example (from your app/backend)
{{ args.customer_name }}{{ customer_name }}
Use one canonical style in production prompts (recommended:
args.*) even though both styles resolve.