> For the complete documentation index, see [llms.txt](https://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.com/docs/documentation/zh/publish/adaptive-content.md).

# 自适应内容

根据阅读者是谁，提供量身定制的文档体验

当用户访问您的网站时，您可能已经了解他们的一些信息，例如他们是谁、订阅了哪个套餐，以及可以使用哪些功能。

自适应内容可根据读者身份，打造量身定制的文档体验。

<figure><img src="https://2111890564-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNkEGS7hzeqa35sMXQZ4X%2Fuploads%2Fgit-blob-29b88328c4adfeb8987d74332a207d513bf1bdbc%2F25_08_20_adaptive_content.webp?alt=media" alt="A GitBook screenshot showing adaptive content controls"><figcaption><p>通过自适应内容，为用户打造个性化的文档体验</p></figcaption></figure>

{% hint style="info" %}
自适应内容与 [经过身份验证的访问](https://gitbook.com/docs/documentation/zh/publish/site-audience/authenticated-access.md)略有不同，不过两者可以协同使用。

经过身份验证的访问可通过登录保护您的文档，而自适应内容则会根据多种身份验证方式（包括经过身份验证的访问，或您自己的应用所采用的方式）自定义已发布的内容。
{% endhint %}

### 工作原理

自适应内容有以下两种运作方式：

1. 将数据从您的应用传递到 GitBook
2. 传递经过身份验证的访问所提供的数据

用户访问您的网站时，我们将他们携带的数据称为“声明”（claims）——简单来说，就是有助于识别用户的数据。这些声明由您（网站作者）控制，并可通过 GitBook 编辑器用于显示或隐藏文档中的不同页面、变体和章节。

您还可以使用条件来定位真人访客或 AI 代理。请参阅 [定位真人访客和 AI 代理](https://gitbook.com/docs/documentation/zh/publish/adaptive-content/adapting-your-content.md#target-human-visitors-and-ai-agents).

请访问有关 [启用自适应内容](https://gitbook.com/docs/documentation/zh/publish/adaptive-content/enabling-adaptive-content.md) 的页面，开始为您的网站设置自适应内容。


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook.com/docs/documentation/zh/publish/adaptive-content.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
