## Discover

Three sets of rules shape your assistant: **Guardrails** decide which questions it answers, **Response Guidelines** decide how its replies sound, and **Scenarios** tell it what to do in specific situations.

Plan & access: Startups, Business or Enterprise [Pricing & Plans](https://www.chatwoot.com/pricing). Administrators edit them. They are part of every Captain account, on every paid plan.

| Rule set            | Use it for                                                           | Example                                                                                                            |
| ------------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| Guardrails          | Keeping the assistant on topic and away from off-limits questions    | "Do not give legal or medical advice."                                                                             |
| Response Guidelines | Tone, length and structure of replies                                | "Keep replies under three sentences. Be friendly, not formal."                                                     |
| Scenarios           | Step-by-step handling of a situation, optionally using a custom tool | "When a customer asks for a refund, ask for the order number, check it with the order lookup tool, then hand off." |

## Set up & try

### Before you start

* An assistant. See [Create and connect an assistant](https://chatwoot.help/hc/user-guide/articles/1791891407-create-and-connect-an-assistant).

* For scenarios that call your systems, a custom tool. See [Custom tools](https://chatwoot.help/hc/user-guide/articles/1791891418-custom-tools).

### Add guardrails and response guidelines

1. Go to **Captain**, open the assistant, and go to **Settings**.

2. Open **Guardrails** or **Response guidelines**.

   ![](https://app.chatwoot.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCQnFGRmdjPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--cee8d94c07192eb0fa56e36c057018d140204eaa/captain-5-g1-guardrails.png?cw_image_width=695px)

3. Click **Add a guardrail** or **Add a response guideline**, type the rule as one short sentence, and click **Create**.

   ![](https://app.chatwoot.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCR2FGRmdjPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--1261f9513960ae14caf5d9521dbab040d9236889/captain-5-g3-add-guardrail.png?cw_image_width=699px)

   *[Screenshot: captain-5-g3-add-guardrail.png]*

4. To add rules from the examples, type in the box under the examples and click **Add and save (↵)**, or press Enter.

   ![](https://app.chatwoot.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCSmVGRmdjPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--959794de274686c31cbfef33beed98c5464a60ad/captain-5-g2-guidelines.png?cw_image_width=707px)

5. To change a rule, click its pencil icon, edit the text, and press Enter.

### Add a scenario

1. Go to **Captain**, open the assistant, and go to **Scenarios**.

   ![](https://app.chatwoot.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCTU9GRmdjPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--58128ee5ffaf9b61364d0f6d4ee4bbef7e45168d/captain-5-s1-scenarios.png?cw_image_width=729px)

2. Click **Add a scenario** and fill in:

   * **Title**: a short name, for example "Refund request".

   * **Description**: when this scenario applies.

   * **How to handle**: what the assistant should do, in plain steps. To use a tool in a step, type **@** and pick it from the list, for example **Handoff to Human** or one of your custom tools. If the scenario should end with your team, add the handoff as the last step.

     ![](https://app.chatwoot.com/rails/active_storage/blobs/redirect/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCRXVHRmdjPSIsImV4cCI6bnVsbCwicHVyIjoiYmxvYl9pZCJ9fQ==--569cf0d90272fc8d2b6a747fb21883c48f72c60d/captain-5-s2-add-scenario.png?cw_image_width=527px)

3. Click **Create**.

4. To change a scenario, open it, edit the fields, and click **Update changes**.

### Test it

In the **Playground**, ask one question each rule should catch (for example an off-topic question, and a refund request). Check the reply follows the rule.

## Get value

* Start small: three to five guardrails and guidelines. Add more when you see a real problem in conversations.

* Write rules as instructions to a new team member, not keywords.

* Guardrails are instructions to the AI, not a filter. They make off-topic answers much less likely but cannot rule them out, so keep the **Handoff message** clear.

* If a tool used in a scenario is disabled, that scenario may stop working. Chatwoot warns you before you disable it.

## Troubleshoot

| Symptom                                 | Likely cause                                                                              | What to do                                          |
| --------------------------------------- | ----------------------------------------------------------------------------------------- | --------------------------------------------------- |
| Assistant ignores a rule                | The rule is vague or conflicts with another                                               | Rewrite it as one clear sentence; remove conflicts  |
| Scenario never runs                     | The situation description does not match how customers ask                                | Describe the situation in customers' own words      |
| Scenario stops halfway                  | Its custom tool is disabled or failing                                                    | Check the tool in **Tools**                         |
| No **Scenarios** item for the assistant | Account is on Hacker (free), or, on self-hosted, Captain is not turned on for the account | Upgrade, or ask your Super Admin to turn on Captain |

More causes: [Troubleshoot Captain](https://chatwoot.help/hc/user-guide/articles/1791891431-troubleshoot-captain).