与 HTML 相比,Markdown 提供的结构化文本更便于 AI 工具高效处理,从而带来更高的响应准确性、更快的处理速度,以及更低的 token 使用量。 Mintlify 会自动生成针对 AI 工具和外部 integrations 优化的页面 Markdown 版本。Documentation Index
Fetch the complete documentation index at: https://www.mintlify.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
.md URL 后缀
.md,即可查看其 Markdown 版本。
Accept 标头
Accept: text/markdown 或 Accept: text/plain 的请求,即可接收 Markdown 版本而非 HTML。这对于以编程方式获取文档内容的 AI 工具和 integrations 非常有用。
面向特定受众的内容
<Visibility for="humans"> 包裹的内容会显示在网页上,但不会出现在 Markdown 输出中。用 <Visibility for="agents"> 包裹的内容会出现在 Markdown 输出中,但不会显示在网页上。
API 参考页面
docs.json 中将 markdown.schema 设置为 false:
Agent 反馈
<AgentInstructions> 块,告知 Agent 如何提交关于页面内容的反馈。
Agent 通过向端点发送页面路径和反馈文本来提交反馈。
使用 Agent 反馈根据 Agent 发现的不正确、过时或令人困惑的内容来改进你的页面。