指南

llms.txt 示例

写出一份优秀 llms.txt 的最快方法,就是从一份行之有效的文件开始改起。下面是三种你可以直接借鉴的范式。

1. 极简文件

非常适合小型产品或着陆页网站。标题、摘要,再加一个汇集关键链接的小节即可。

# Acme

> Acme turns CSV files into charts. This file links to the docs an LLM needs to help users.

## Docs

- [Quickstart](https://acme.com/start): Upload a CSV and get a chart in 60 seconds
- [Pricing](https://acme.com/pricing): Plans and limits

2. 文档密集型文件

适用于 API/SDK 类网站。按用途分组,链接到页面的 Markdown 版本,并用一个 Optional 小节存放次要资料。

# Acme API

> REST API for chart generation. Authentication, endpoints, and SDKs below.

## Getting started

- [Authentication](https://acme.com/docs/auth.md): API keys and scopes
- [Quickstart](https://acme.com/docs/quickstart.md): First request in 5 minutes

## Reference

- [Endpoints](https://acme.com/docs/api.md): Every endpoint and parameter
- [Errors](https://acme.com/docs/errors.md): Error codes and handling

## Optional

- [Changelog](https://acme.com/changelog.md): Release history

3. llms.txt 与 llms-full.txt 的搭配

大型文档集通常会同时发布两份:用 llms.txt 作为索引,再用 llms-full.txt 将完整内容内联在一起,让智能体在一次抓取中就能获取全部内容。

借鉴结构,而非内容

无论你选择哪种范式,都要让描述具体明确、使用绝对路径的 HTTPS 链接,并确保每个链接都能正常访问。然后用校验器跑一遍,确认它得到满分 100。

继续阅读

校验你的 llms.txt →