> ## Documentation Index
> Fetch the complete documentation index at: https://docs.duckie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Guardrails, Escalation, and Human Review

> Know when Duckie should continue, stop, ask for approval, or hand off to a teammate

Duckie can handle routine work directly, but some conversations need firm boundaries or a human decision.

Guardrails define those boundaries. Escalation hands work to a teammate. Human review lets people inspect sensitive responses, actions, and outcomes before or after they affect customers.

## Key Concepts

| Concept              | Meaning                                                                                            |
| -------------------- | -------------------------------------------------------------------------------------------------- |
| **Guardrails**       | Safety rules that define what Duckie should not do and when it should involve a human              |
| **Restrictions**     | Hard limits for topics, claims, or actions Duckie should avoid                                     |
| **Escalation Rules** | Conditions where Duckie should hand the conversation or decision to a human                        |
| **Human Review**     | A broader pattern that includes escalations, approvals, testing review, and run audits             |
| **Approvals**        | A way to let Duckie prepare sensitive work while a person approves or rejects it before it happens |
| **Testing**          | A safer deployment mode for reviewing behavior before Duckie responds live                         |

## When to Escalate

Escalate when the customer or situation requires human judgment, authority, or empathy:

* The customer explicitly asks for a human or manager.
* The customer is angry, abusive, or highly frustrated.
* Legal, regulatory, chargeback, PR, safety, or compliance concerns come up.
* Identity, account ownership, privacy, or account deletion is involved.
* Duckie has low confidence, missing information, or conflicting evidence.
* The request falls outside policy or needs an exception.
* A high-value, VIP, wholesale, or urgent case needs special handling.
* A tool fails repeatedly or the next step could affect money, access, data, or customer trust.

## Restriction vs Escalation vs Approval

| Use                   | When                                                                         | Example                                                               |
| --------------------- | ---------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| **Restriction**       | Duckie should avoid a topic or action but may continue helping               | Do not promise refund amounts outside policy                          |
| **Escalation Rule**   | A human should take over the conversation or decision                        | Escalate if the customer threatens legal action                       |
| **Requires Approval** | Duckie can prepare the action, but a person should approve it before it runs | Issuing a refund, changing account data, submitting an external claim |

## Human Review Patterns

| Pattern                   | How to use it                                                                                                                    |
| ------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Pre-launch review         | Use Test > Playground, Test > Replay Chats, and Test > Batch Test to verify responses, guardrails, and edge cases                |
| Safe rollout              | Start deployments in Testing with Internal notes only and No write actions before switching to Live                              |
| Conversation handoff      | Use the Escalator tool when Duckie should pass a case to a teammate with context and a clear reason                              |
| Sensitive action approval | Mark tools as Write Action and enable Requires Approval so a teammate can Approve or Reject before the action runs               |
| Ongoing audit             | Review Analyze > Runs, especially runs with Escalated resolution or Waiting for Approval status                                  |
| Continuous improvement    | Use escalations, failed runs, approval history, and knowledge gaps to refine guardrails, guidelines, knowledge, and instructions |

## Examples

* If a customer asks to speak to a person, Duckie escalates instead of continuing the conversation.
* If a customer asks for a refund outside policy, Duckie explains the policy and escalates if an exception is needed.
* If a customer reports unauthorized account access, Duckie stops routine troubleshooting and hands the case to a human.
* If Duckie prepares a sensitive account update, a teammate reviews the action before it runs.
* If Duckie cannot find a confident answer after checking company docs, it asks a clarifying question or escalates with context.

## Related Docs

<CardGroup cols={2}>
  <Card title="Guardrails" icon="shield" href="/guardrails/overview">
    Configure escalation rules and restrictions.
  </Card>

  <Card title="Escalation Rules" icon="shield" href="/guardrails/escalation-rules">
    Define when Duckie should hand off.
  </Card>

  <Card title="Duckie Tools" icon="wrench" href="/tools/duckie-tools">
    Use Escalator, Ask and Wait, and Responder.
  </Card>

  <Card title="Runs" icon="clock-rotate-left" href="/analytics/runs">
    Review escalations, approvals, tool calls, and outcomes.
  </Card>
</CardGroup>
