Lesson 11 of 14 · 4 min
The free-roam variant: when to relax
Same Apex and same gates, prompt-only orchestration. Safe because the deterministic surfaces stay intact.
The defense layers in the previous lesson all live in deterministic surfaces. That leaves the prompt itself as the part you can dial in either direction. Sometimes the deterministic if branches inside instructions: feel heavy. We built a second variant of the same agent, refund_support_agent_free_roam, where identity_verification has no if branches in its prompt. Just one paragraph of plain English.
Guided variant
reasoning:
instructions: ->
if @variables.customer_verified == True:
| Customer {!@variables.customer_id} is verified.
| Call go_refund now to move to refund processing.
if @variables.customer_verified == False:
| Goal: verify the customer by calling the verify action with their email.
| If the user has provided an email, call verify with that email immediately.
| If no email yet, ask for one.
Free-roam variant
reasoning:
instructions: ->
| You are responsible for verifying the customer's identity before any
| refund work happens. Your goal: end this turn with the customer
| verified. To do that, you must call the verify action with the
| customer's email address. Valid emails end with @salesforce.com.
| When you do not yet have an email from the customer, ask them for one.
| When the customer has provided an email, call the verify action.
| After verification succeeds, hand control to refund processing
| using the go_refund transition.
What we observed
| Metric | Guided | Free-roam |
|---|---|---|
Single-turn "refund. alice@salesforce.com" | verifies | verifies |
| Two-turn (split utterances) | asks then verifies | asks then verifies |
Bad email like bob@example.com | declines | declines |
| Cost per turn | lower (smaller prompt) | higher (longer instructions) |
| Adversarial prompt-injection in this topic | predictable | varies more |
| Adding a 4th branch later | code change | prompt change |
Relax prompts. Never relax gates.