mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
2a626cb7f2
* docs: translate content updates from the past week into es, fr, zh * docs: polish es and fr wording, replace HTML entity apostrophe with real character --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
51 lines
2.4 KiB
Plaintext
51 lines
2.4 KiB
Plaintext
---
|
||
title: "自定义 AI 助手行为"
|
||
description: "通过在文档中添加包含系统指令的 Assistant.md 文件来自定义 AI 助手,塑造其语气、角色定位、关注领域、回答格式与整体响应行为。"
|
||
keywords: ["assistant", "自定义指令", "Assistant.md", "系统提示", "角色"]
|
||
---
|
||
|
||
在你的文档项目根目录添加一个 `.mintlify/Assistant.md` 文件,为 AI 助手提供自定义指令来定义其响应方式(`ASSISTANT.md` 也是可接受的文件名)。AI 助手将这些指令作为每个响应的系统级上下文。
|
||
|
||
<Warning>
|
||
请将 `Assistant.md` 文件放在 `.mintlify/` 目录中,而不是项目根目录。如果你将文件存放在项目根目录,你的自定义指令将通过 `/assistant.md` 路径公开访问。`.mintlify/` 目录不会公开提供服务,因此你的 `Assistant.md` 文件在该目录中时不可被访问。
|
||
|
||
如果你必须将 `Assistant.md` 文件存放在项目根目录或任何其他目录,请将其添加到 [`.mintignore`](/zh/organize/mintignore) 文件中,以将其从文档站点中排除。
|
||
</Warning>
|
||
|
||
`Assistant.md` 文件中的指令会添加到 AI 助手的系统提示中。它们不会替换或覆盖 AI 助手的默认指令。
|
||
|
||
要删除自定义指令,请删除 `Assistant.md` 文件。
|
||
|
||
使用 `Assistant.md` 可以:
|
||
|
||
- 调整 AI 助手的角色和语气
|
||
- 提供产品特定的上下文
|
||
- 定义支持升级路径
|
||
- 指定术语偏好
|
||
- 限定或界定 AI 助手的关注领域
|
||
- 提供特定版本的指导
|
||
|
||
<Tip>
|
||
使用 AI 助手的 [skills](/zh/assistant/skills) 提供面向特定主题的指导,AI 助手仅在用户提出相关问题时才会加载它们。
|
||
</Tip>
|
||
|
||
<div id="example-assistantmd-file">
|
||
## `Assistant.md` 文件示例
|
||
</div>
|
||
|
||
```markdown .mintlify/Assistant.md
|
||
You are a helpful assistant for Acme Corp's developer platform.
|
||
|
||
## Tone
|
||
- Be concise and direct. Getting to the point helps people more than being exhaustive.
|
||
- Use technical language appropriate for software developers. Most people asking you questions are familiar with Acme's products.
|
||
|
||
## Product context
|
||
- Acme SDK v3 is the current stable release. v2 is deprecated. If people ask about v2, remind them it's deprecated but answer their questions.
|
||
- Direct billing questions to support@acme.com.
|
||
|
||
## Terminology
|
||
- Use "workspace" instead of "project" or "organization".
|
||
- Use "access token" instead of "API key".
|
||
```
|