> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/convai-playground/character-customization/guardrails.md).

# 护栏

{% hint style="danger" %}
此 API 仅适用于付费计划。
{% endhint %}

## 简介

该 **护栏选项卡** 提供了一个强大的控制界面，用于定义你的角色在伦理和话题上的边界，防止偏题或不当回复。通过在“Instructions”字段中输入具体约束并开启自定义护栏，你可以确保你的 AI 角色以安全、专业的方式回应，并严格符合你预期的品牌语调。

<figure><img src="/files/fc012a2edad566e13a66719d7b7b5877c04546cd" alt=""><figcaption></figcaption></figure>

## 主要功能和部分

### 1. 自定义护栏开关

此切换按钮相当于总开关，用于启用或停用你的角色安全监管。启用后，它会强制 AI 角色优先遵循你指定的行为规则，而不是其通用对话逻辑。

### 2. 护栏指令

此文本字段允许你使用最多 7,500 个词来定义明确的安全规则和回复边界。你可以在这里输入诸如“不要谈论政治”之类的限制，以确保角色保持专业并围绕主题展开。

## 示例

此示例展示了你如何在 Convai Playground 中为你的 AI 角色实施护栏。

{% embed url="<https://youtu.be/dfosB0XYiOo>" %}

***

## 结论

护栏选项卡是一项必不可少的安全工具，使创作者能够为其 AI 角色强制执行严格的行为边界和内容限制。通过将自定义说明与实时测试相结合，它可确保交互保持安全、符合品牌调性，并避免出现不受欢迎的话题或幻觉。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.convai.com/api-docs/zh/convai-playground/character-customization/guardrails.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
