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 分。