Conditionals
If/else blocks for dynamic content
If Blocks
Include different instructions based on context. Only matching sections are sent to the LLM:
support.echo
You are a customer support agent.
[#IF {{customer.tier}} #equals(Premium)]
**Premium Member Handling:**
This customer has priority support. Offer expedited solutions and don't suggest they wait.
[ELSE]
**Standard Member Handling:**
Follow normal support procedures. You may suggest premium upgrade if relevant.
[END IF]Chained Conditions
refund.echo
You are handling a refund request.
[#IF {{order.days_since_purchase}} #lte(30)]
This order is within the 30-day window. Process a full refund immediately.
[ELSE IF {{order.days_since_purchase}} #lte(60)]
This order is past 30 days but within 60. Offer store credit as an alternative.
[ELSE]
This order is outside our return window. Apologize and explain the policy.
[END IF]Nested Conditionals
nested.echo
You are a movie recommender.
[#IF {{companions}} #contains(Family)]
**Family Viewing Rules:**
* Rating must be G or PG
* No violence or mature themes
[#IF {{hasYoungChildren}} #equals(true)]
* Keep it under 90 minutes for attention spans
[END IF]
[END IF]