> ## 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.

# Creating Guidelines

> Write effective guidelines for your agents

This guide helps you create guidelines that shape your agent's communication effectively.

## Creating Guidelines

<Steps>
  <Step title="Navigate to Guidelines">
    Go to **Train → Guidelines** in your dashboard.

    {/* Screenshot: Guidelines page with Create Section button */}
  </Step>

  <Step title="Create a Section">
    Click **Create Section** to start a new guideline section.
  </Step>

  <Step title="Name the Section">
    Give it a descriptive name:

    * Good: "Tone & Voice", "Response Format", "Technical Support"
    * Avoid: "Guidelines 1", "Rules"

    {/* Screenshot: Create section dialog with name field */}
  </Step>

  <Step title="Write Guidelines">
    Use the rich text editor to write your guidelines.

    {/* Screenshot: Guideline section editor with content */}
  </Step>

  <Step title="Save">
    Click **Save** to save your guidelines.
  </Step>
</Steps>

## Writing Effective Guidelines

### Be Specific

**Vague:**

> Be nice to customers.

**Specific:**

> Acknowledge the customer's situation in your first sentence. Use their name if available. Express understanding before jumping into solutions.

### Use Examples

Show what good looks like:

```
## Examples of Good Responses

✅ "Hi Sarah! I understand how frustrating it is when your password 
won't work. Let me help you get back into your account."

✅ "Thanks for reaching out! I can see why that error message 
would be confusing. Here's what it means and how to fix it..."

❌ "Your password reset request has been received. Please check 
your email for further instructions."

❌ "Unfortunately, I cannot assist with that request at this time."
```

### Be Actionable

Give instructions the agent can follow:

```
## Response Structure

1. Acknowledge the question (1 sentence)
2. Provide the direct answer (1-2 sentences)  
3. Give context or explanation if needed (1-2 sentences)
4. Offer next steps or additional help (1 sentence)
5. End with a friendly closing
```

### Use Positive Framing

Instead of rules about what *not* to do, describe what *to* do:

**Negative:**

> Don't use corporate jargon or technical terms.

**Positive:**

> Use simple, everyday language. If you must use a technical term, explain what it means.

## Organizing Sections

### By Purpose

Create separate sections for different aspects:

| Section               | Content                              |
| --------------------- | ------------------------------------ |
| **Tone & Voice**      | Personality, empathy, language style |
| **Response Format**   | Structure, length, lists             |
| **Brand Standards**   | Terminology, phrases, voice          |
| **Technical Writing** | How to explain technical topics      |

### By Scenario

Create sections for different contexts:

| Section               | Content                         |
| --------------------- | ------------------------------- |
| **Complaints**        | How to handle unhappy customers |
| **Billing Questions** | Specific billing language       |
| **Technical Issues**  | Troubleshooting approach        |

## Assigning Guidelines to Agents

Once created, assign guidelines to agents:

<Steps>
  <Step title="Open Agent Configuration">
    Go to **Build → Agents** and click on an agent.
  </Step>

  <Step title="Go to Guidelines Tab">
    Select the **Guidelines** tab.

    {/* Screenshot: Agent configuration - guidelines tab showing section checkboxes */}
  </Step>

  <Step title="Select Sections">
    Check the sections that apply to this agent.
  </Step>

  <Step title="Save">
    Save the agent configuration.
  </Step>
</Steps>

### Combining Sections

Selecting multiple sections combines their guidelines. The agent follows all selected guidelines together.

**Example:**

* General Agent: Tone + Format + Brand
* Technical Agent: Tone + Format + Brand + Technical Writing
* Billing Agent: Tone + Format + Brand + Billing Specifics

## Testing Guidelines

{/* Screenshot: Playground showing a test conversation with guidelines applied */}

### In the Playground

1. Assign guidelines to an agent
2. Open **Test → Playground**
3. Select the agent
4. Send test messages
5. Check that responses follow guidelines

### What to Test

* **Tone:** Does it sound right?
* **Format:** Is the structure correct?
* **Terminology:** Are brand terms used correctly?
* **Length:** Are responses the right length?

### Iterating

Guidelines often need refinement:

1. Test → Identify issues
2. Update guidelines with clearer instructions
3. Test again
4. Repeat until satisfied

## Common Patterns

### The Friendly Professional

```
## Tone
- Be warm and personable, like a knowledgeable friend
- Use contractions (it's, you're, we'll)
- Keep sentences short and readable
- Express empathy without being overly apologetic

## Language
- Use "I" when possible for personal touch
- Avoid jargon — if you must use it, explain it
- Never say "unfortunately" — find positive alternatives
- End conversations with genuine offers to help more
```

### The Technical Expert

```
## Approach
- Be clear and precise
- Explain the "why" not just the "what"
- Use technical terms when helpful, but define them
- Provide step-by-step instructions with numbered lists

## Format
- Use code blocks for commands or technical content
- Break complex explanations into digestible sections
- Include relevant links to documentation
- Anticipate follow-up questions
```

### The Support Specialist

```
## Structure
Every response should:
1. Acknowledge the customer's situation
2. Provide a clear solution or next step
3. Confirm understanding or success
4. Offer additional assistance

## Escalation
If you cannot fully resolve:
- Clearly explain what you've done
- Set expectations for next steps
- Provide a timeline if possible
- Thank them for their patience
```

## Best Practices

### Do

* **Keep it concise** — Agents need clear, actionable guidance
* **Include examples** — Show what good looks like
* **Be consistent** — Use the same terminology throughout
* **Test thoroughly** — Verify guidelines work in practice
* **Update regularly** — Refine based on actual results

### Don't

* **Don't contradict** — Ensure sections don't conflict
* **Don't over-specify** — Leave room for context adaptation
* **Don't forget edge cases** — Consider unusual scenarios
* **Don't set and forget** — Review and update periodically

## Next Steps

<CardGroup cols={2}>
  <Card title="Guidelines Overview" icon="list-check" href="/guidelines/overview">
    Learn more about guidelines
  </Card>

  <Card title="Test in Playground" icon="flask" href="/testing/playground">
    Test your guidelines
  </Card>
</CardGroup>
