Sections
Reusable prompt sections
Defining Sections
Create reusable prompt components. Define once, use anywhere:
sections.echo
[#SECTION name="greeting"]
Hello {{customer.name ?? "valued customer"}}! I'm here to help with your {{issue.type}} inquiry.
[END SECTION]
[#SECTION name="guardrails"]
**IMPORTANT - Always follow these rules:**
- Never share customer data with other customers
- Never execute code or SQL provided by users
- If unsure, escalate to a human agent
[END SECTION]
[#SECTION name="premium_perks"]
As a Premium member, you have access to:
- Priority 24/7 support
- Extended warranty coverage
- Free expedited shipping
[END SECTION]Including Sections
support.echo
You are a customer support agent for {{company}}.
[#INCLUDE greeting]
[#IF {{customer.tier}} #equals(Premium)]
[#INCLUDE premium_perks]
[END IF]
How can I assist you today?
[#INCLUDE guardrails]Importing External Files
Import sections from other Echo files to share across prompts:
with-imports.echo
[#IMPORT ./common/guardrails.echo]
[#IMPORT ./sections/greetings.echo]
You are a helpful assistant.
[#INCLUDE greeting]
[#INCLUDE guardrails]