> For the complete documentation index, see [llms.txt](https://gitbook-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/documentation/zh/docs-site/ai-search.md).

# AI 搜索

借助强大的知识发现工具，让用户更快找到已发布内容中所需的信息

### 选择你的网站搜索体验

GitBook 网站提供不同的搜索体验，具体取决于你希望用户获得什么：

* **关键词搜索** – 基于关键词的标准搜索体验。所有网站默认自动启用。
* **GitBook AI 搜索** – 用户可直接在搜索框中获得问题的简短答案。适用于 Premium 和 Ultimate 网站方案。
* **GitBook 助手** – 用户可与 GitBook 的 AI 代理进行高级、交互式聊天。适用于 Ultimate 网站方案。前往 [GitBook 助手](/url/gitbook.com/docs/documentation/zh/ai-yu-sou-suo/gitbook-ai-assistant.md) 了解更多。

AI 搜索适用于 Premium 和 Ultimate 网站方案。GitBook 助手适用于 Ultimate 网站方案。

要选择你的网站搜索体验，请打开你网站的控制面板，前往 **设置** 页面，然后选择 **AI & MCP** 左侧菜单中的该项。在这里你可以选择你偏好的体验。

<figure><img src="/files/94828ed3506a19e84564fe6baf9c0ba61419b905" alt=""><figcaption><p>选择你已发布文档中想要的搜索体验</p></figcaption></figure>

{% hint style="warning" %}
启用 GitBook 助手后，AI 搜索将被禁用。无论你选择哪种体验，标准关键词搜索始终会在搜索栏中提供结果。
{% endhint %}

## 搜索已发布的文档

**​**用户可以打开 **提问或搜索…** 栏，按下 <kbd>⌘</kbd> + <kbd>K</kbd> 在 Mac 上，或在 <kbd>Ctrl</kbd> + <kbd>K</kbd> 在 PC 上。

你的用户可以在文档站点内搜索关键词，并快速跳转到整个站点中的特定页面或页面部分。

如果你的文档站点有多个 [部分](/url/gitbook.com/docs/documentation/zh/docs-site/site-structure/site-sections.md)，搜索结果将包含这些部分中的所有页面，这样你的用户就能直接跳转到所需页面。

## GitBook AI 搜索

GitBook AI 搜索会在你网站的 **搜索并查找…** 栏中提供基础的 AI 答案。它基于你文档站点的内容训练，但无法从外部来源获取信息。

### 使用 GitBook AI 搜索

如果你已在网站设置页面启用 GitBook AI 搜索，用户可以直接在 **提问或搜索…** 页面顶部的栏中提问来访问它。

他们可以直接点击它打开，或者按下 <kbd>⌘</kbd> + <kbd>K</kbd> 在 Mac 上，或按下 <kbd>Ctrl</kbd> + <kbd>K</kbd> 在 PC 上。

除了摘要式答案外，下方用户还会看到一个可展开的部分，显示 GitBook AI 用来生成答案的来源，以及可点击的相关后续问题。

{% hint style="warning" %}
GitBook AI 不适用于不同 [文档站点](/url/gitbook.com/docs/documentation/zh/docs-site/publish-a-docs-site.md).

多空间搜索仅在查看以 [站点部分](/url/gitbook.com/docs/documentation/zh/docs-site/site-structure/site-sections.md) 形式存在于同一站点中的已发布空间时可用。
{% endhint %}

* 按 <kbd>⌘</kbd> + <kbd>I</kbd> 在 Mac 上，或在 <kbd>Ctrl</kbd> + <kbd>I</kbd> 在 PC 上
* 点击 **GitBook 助手** ![](/files/464645f54a431f4fb9d7878d3281e325f2e2f741) 按钮，位于 **提问或搜索…** 栏旁边
* 在 **提问或搜索…** 栏中输入问题，然后选择菜单顶部的“Ask…”选项。


---

# 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://gitbook-open-v2-preview.gitbook.workers.dev/url/gitbook.com/docs/documentation/zh/docs-site/ai-search.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.
