llms.txt 是一項提議中的慣例:在 /llms.txt 放一個 Markdown 檔案,向 AI Agent 概述網站,並連到值得閱讀的頁面。 本指南說明這項提議的內容,提供可複製的檔案,展示 60 個知名網站在這個位址發布了什麼,並附上能驗證你自己檔案的腳本。接著我們會報告誰讀取了我們的檔案:有請求點了只有我們的 llms 檔案才有的連結,其中三個自稱 Claude。我們也會說明請 ChatGPT、Claude、Gemini 和 Perplexity 使用這個檔案時,它們的實際表現。 最後,它介紹讓 Agent 向網站的 AI Agent 提問、而不必再讀取更多檔案的那一行,Quickchat AI 的 AI assistant access 會為你準備好可以複製的這一行。
讀完後,你會得到三樣東西:位於 /llms.txt 的有效檔案、一次通過的驗證腳本執行結果,以及從你自己的存取紀錄統計出哪些使用者代理請求過這個檔案。螢幕截圖顯示的是英文介面。

下載 llms.txt 檢查套件。其中包含範例檔案、驗證腳本、十項檢查清單、紀錄腳本和範例紀錄。你需要一個可以新增檔案的網站、一個有 curl 的終端機,以及 Node.js 22 或更新版本。只有最後一步需要存取你的請求紀錄。
如果你已經有檔案,請直接前往驗證檔案。如果想先看證據,請閱讀誰請求了我們的檔案。
什麼是 llms.txt?
llms.txt 是一個 Markdown 檔案,為 AI Agent 提供網站的簡短摘要,以及可進一步查閱細節的精選連結清單。 Answer.AI 的 Jeremy Howard 於 2024 年 9 月 3 日在 llmstxt.org 發表這項提議,並在 2026 年 8 月修訂為第 2 版。它描述了兩件事:檔案本身,以及一項建議,也就是頁面應在可預測的位址提供自己乾淨的 Markdown 版本。
這個檔案是設計在回答問題的當下使用的。提議中說,它的資訊是在「Agent 協助使用者時需要某個主題的資訊,按需使用」,而且作者預期它主要對推論有用,而不是用於訓練。Agent 應該讀取或搜尋這個檔案,再點選與手上問題相符的連結。

llms.txt 是標準嗎?
llms.txt 是一項已發表的提議,沒有任何標準組織採用它。 是否要請求這個檔案,由各家 AI 廠商和各個工具自行決定。目前的支援主要在工具層面:文件平台會產生這個檔案,Chrome 的 Lighthouse 也有一項實驗性的稽核會尋找它。兩者都會在下文說明。
llms.txt 和 robots.txt、網站地圖有什麼不同?
robots.txt 說明爬蟲可以請求哪些網址,網站地圖列出所有供索引的網址,llms.txt 則是用 Markdown 寫成的簡短閱讀清單。 這三者不能互相取代。llms.txt 不授予也不拒絕任何權限,所以想控制 AI 爬蟲的網站,應該在 robots.txt 設定。
| 檔案 | 它回答的問題 | 格式 | quickchat.ai 於 2026 年 11 月 24 日發布的內容 |
|---|---|---|---|
robots.txt | 哪些爬蟲可以請求哪些路徑? | 純文字規則,RFC 9309 | 全部允許,並為七個 AI 爬蟲權杖設有具名群組 |
| 網站地圖 | 對搜尋引擎而言,有哪些網址存在? | XML,網站地圖協定 | 33 種語言共 3,545 個網址 |
llms.txt | 這個網站是什麼?Agent 應該先讀哪幾個頁面? | Markdown | 291 個連結:290 個英文頁面的 Markdown 版本,以及文件索引 |

llms-full.txt 和 llms-small.txt 是什麼?
llms-full.txt 是用一個檔案收錄網站所有頁面完整文字的慣例,llms-small.txt 則是較短的版本。 兩者都不屬於這項提議,而是來自文件工具:Mintlify 會為它託管的每個網站產生 llms.txt 和 llms-full.txt,starlight-llms-txt 外掛程式則會產生全部三個。quickchat.ai 也發布這三個檔案。它的完整檔案包含部落格文章,精簡檔案則不包含。
完整文字檔案可能非常大。下方的調查測量了幾個。
步驟 1:llms.txt 檔案長什麼樣子?
實用的 llms.txt 包含一個寫明網站名稱的 H1、引用區塊中的摘要、可選的說明文字,以及數個 H2 區段,每個區段都是附有說明的連結清單。 這是套件中的範例檔案。Northwind Bikes 是一家虛構的商店,使用保留的範例網域。
# Northwind Bikes
> Northwind Bikes sells city bikes and e-bikes online and from one store in Springfield. The pages below cover returns, shipping, warranty, sizing, servicing and store hours.
Every link below points to the Markdown version of a page. Remove .md from the URL for the HTML version. Prices are in USD.
## Help pages
- [Returns and exchanges](https://northwind-bikes.example.com/help/returns.md): Return windows, fees and how refunds are issued
- [Shipping and delivery](https://northwind-bikes.example.com/help/shipping.md): Costs, delivery times and where we ship
- [Warranty](https://northwind-bikes.example.com/help/warranty.md): What the frame, component and battery warranties cover
- [Bike sizing and fitting](https://northwind-bikes.example.com/help/sizing.md): Frame size by rider height
## Store
- [Store hours and test rides](https://northwind-bikes.example.com/stores/springfield.md): Opening hours, test rides and in-store pickup
## Optional
- [Servicing and repairs](https://northwind-bikes.example.com/service.md): Tune-up prices and turnaround times
複製它,替換名稱和摘要,再列出你自己的頁面。提議中說,檔案「小到能放進上下文」,而「細節則在連結後面,只在需要時才取得」。

llms.txt 的哪些部分是必要的?
只有 H1 是必要的。 其他部分都是選用,但順序是固定的:先是 H1,然後是引用區塊,接著是沒有標題的說明文字,最後是 H2 區段。在 H2 區段內,每個清單項目都是一個 Markdown 連結,後面可以接冒號和說明。提議把這稱為「可供固定處理方法使用的精確格式」,這也是腳本能檢查這個檔案的原因。
連結應該指向哪些頁面?
連結到 Agent 回答網站相關問題時需要的頁面,而且有 Markdown 版本的頁面,就指向該版本。 提議建議把這個版本放在頁面自己的網址後面加上 .md 的位置,所以 /pricing 變成 /pricing.md,沒有檔名的網址則變成 index.md。請保持清單精簡,因為網站地圖已經列出了所有頁面。
也可以連到其他網站。提議自己的範例就連到 GitHub 上的一個參考頁面。
Optional 區段是什麼意思?
名為 Optional 的區段放次要連結,Agent 需要較短的上下文時可以略過。 在提議的第 1 版中,有一個配套工具會用這個名稱決定要省略什麼。第 2 版移除了那個工具,所以這個名稱現在只是一種慣例,沒有機械式的含義。
知名網站的 llms.txt 檔案長什麼樣子?
我們在 2026 年 11 月 24 日請求了 60 個知名網站,其中 33 個在 /llms.txt 回傳文字檔案,而這 33 個之中有 6 個完全遵循提議的格式,沒有任何檢查結果。 樣本是六個類別各十個網站,在取得資料前就已選定。它不是網路的隨機樣本,而且每個網站都只從一台機器、在一天內請求過一次。

各組差異很大。十個 AI 開發者文件網站中,有九個發布了檔案,包括 OpenAI、Anthropic、Google 的 Gemini API、Mistral、Cohere、xAI 和 Perplexity 的文件。AI 公司的主網站則大多沒有:10 個中有 7 個回傳 404。在十個消費、電商和媒體網站中,只有 Shopify 有檔案。有五個網站對我們的兩個用戶端都回應封鎖或驗證頁面,所以我們無法判斷它們是否發布了檔案。
已發布的檔案形式差異很大。OpenAI 和 Shopify 的遵循格式,Intercom 的大部分是散文,Twilio 的則沒有標題就開始。

| 檔案 | 大小 | 連結數 | 值得注意的地方 |
|---|---|---|---|
| developers.openai.com/llms.txt | 2 KB | 41 | 索引的索引:大多數連結指向另一個 llms.txt,每項產品一個 |
| docs.anthropic.com/llms.txt | 12 KB | 958 | 會重新導向到另一個主機。列出文件的每一個頁面 |
| developers.cloudflare.com/llms.txt | 5 KB | 111 | 每項產品一個連結,各自指向該產品自己的檔案 |
| docs.stripe.com/llms.txt | 99 KB | 475 | 在第一個區段前,先有給程式開發 Agent 的說明 |
| docs.github.com/llms.txt | 10 KB | 117 | 告訴 Agent 該呼叫哪個 API 來取得頁面清單和文章內容 |
| docs.cohere.com/llms.txt | 300 位元組 | 2 | 兩個連到各版本檔案的連結,並註明任何區段網址都有自己的 llms.txt |
| shopify.com/llms.txt | 5 KB | 71 | 這是電商網站,不是文件。沒有任何檢查結果 |
| twilio.com/llms.txt | 2.5 MB | 10,018 | 調查中最大的索引,而且第一行是清單項目 |
結構檢查在 33 個檔案中的 27 個發現了問題。

這些偏差都不會讓模型無法讀取檔案,因為模型不論如何都讀得懂 Markdown。它們影響的是解析這種格式的軟體。遵循提議的解析器會略過沒有連結的項目,也不預期出現 H3。Twilio 和 Salesforce 這兩個頂端沒有 H1 的檔案,是腳本唯一直接判定失敗的。
完整文字檔案有多大?
33 個網站中有 17 個也提供 llms-full.txt,其中最大的幾個大到 Agent 無法在一次請求中讀完。 Cloudflare 的檔案有 11.9 MB,以每個 token 四個位元組計算,約 300 萬個 token。調查中的三個檔案都超過一百萬個 token。

步驟 2:如何在自己的網站發布 llms.txt?
以 text/plain 或 text/markdown 搭配 charset=utf-8,在 /llms.txt 提供這個檔案。如果網站有建置步驟,請根據你已發布的頁面來產生它。
- 將檔案儲存為
llms.txt,放在網站根目錄所使用的資料夾。在多數靜態網站產生器中,這個資料夾是public/。 - 部署後,用非瀏覽器的用戶端請求這個檔案:
curl -sS -o /dev/null -w '%{http_code} %{content_type} %{size_download} bytes\n' https://example.com/llms.txt
- 閱讀結果。你要看到的是
200、文字類型的內容類型,以及和你的檔案相符的大小。如果是text/html,表示伺服器回傳的是網頁,不是你的檔案。 - 你也可以選擇告訴用戶端檔案在哪裡。提議的第 2 版建議使用兩個標準的連結關係,以
<link>元素放在每個頁面的<head>中,或放在 HTTPLink標頭中:
<link rel="describedby" href="/llms.txt">
<link rel="alternate" type="text/markdown" href="/pricing.md">
第一個從任何頁面指向涵蓋它的 llms.txt。第二個從頁面指向它自己的 Markdown 版本。
檔案也可以放在子路徑。/docs/llms.txt 涵蓋 /docs/ 底下的頁面,而當有多個檔案適用時,提議說 Agent 應使用最具體的那一個。
手寫的檔案適合只有少數連結的情況。頁面移動或改名時,它就會過時,所以要不是指定負責人,就是用程式產生。
quickchat.ai 如何產生它的 llms.txt?
quickchat.ai 在建置網站時,根據同一批以 HTML 提供的頁面,產生 /llms.txt、/llms-full.txt 和 /llms-small.txt,所以頁面一變,檔案就跟著變。 沒有人手動編輯。

建置的運作方式如下:
- 搜尋引擎可以索引的每個英文頁面,都有一個 Markdown 版本,位於同一個網址後面加上
.md。部落格文章直接從它的 Markdown 原始檔複製。其他頁面則從建置好的 HTML 轉換:保留主要內容,移除指令碼、樣式和裝飾性圖形,將連結和圖片網址改為絕對網址,保留頁面內的錨點,並加上含標題、描述和來源網址的前置資料。 - 有些內容是刻意省略的。 翻譯過的頁面、
noindex頁面和工具性頁面不會有 Markdown 版本。產品頁面上純裝飾用的示範對話會被標記為略過,因為編造的範例資料不該當作頁面內容發布。 - 每個頁面都會宣告自己的 Markdown 版本,方式是在頁面的 head 中加上
<link rel="alternate" type="text/markdown">。 - 轉換失敗時,建置就會失敗,所以索引不會悄悄遺失任何頁面。


文件是另一個使用 starlight-llms-txt 外掛程式的 Starlight 建置。每個文件頁面還有一個選單,可以將該頁面開啟為 Markdown,或開啟完整文字檔案。

如果你的網站沒有建置步驟,llmstxt.org 上的整合清單列出了多個平台的產生器,其中包括 VitePress、Docusaurus、Drupal 和 WordPress 的外掛程式。
步驟 3:如何驗證 llms.txt 檔案?
驗證 llms.txt 檔案,就是檢查四件事:它是否正確提供、結構是否遵循提議、每個連結是否都能開啟,以及它列出的是否是你想公開的頁面。 本指南提供一份檢查清單和一支由你自己執行的腳本。腳本會執行前三項檢查,它不是線上檢查工具。
如何手動檢查 llms.txt?
四個 curl 指令涵蓋了檔案的提供方式。 請將 SITE 設為你自己的位址。
SITE=https://example.com
# Status, content type and size
curl -sS -o /dev/null -w '%{http_code} %{content_type} %{size_download} bytes\n' "$SITE/llms.txt"
# First lines: expect "# Site name", not HTML
curl -s "$SITE/llms.txt" | head -n 3
# A client that is not a browser gets the same answer
curl -sS -A 'llms-txt-check/1.0' -o /dev/null -w '%{http_code}\n' "$SITE/llms.txt"
# Response headers of one linked Markdown file
curl -sSI "$SITE/pricing.md" | grep -i -E '^(HTTP|content-type|cache-control)'

完整的檢查清單有十點,列在下方,也收錄在套件的 checklist.md。前六點可以用指令檢查。上面的四個指令涵蓋了檔案的提供方式,其餘兩點的指令在 checklist.md 中。
- 已提供。
/llms.txt在它所描述的主機上回傳 HTTP 200,內容類型為text/plain或text/markdown,並加上charset=utf-8。 - 不是備援頁面。 內容以
#開頭,而且不是 HTML。 - 非瀏覽器的用戶端也能取得。 使用一般使用者代理的請求會得到相同的回應,而且沒有任何機器人規則以驗證頁面回應它。
- 沒有被封鎖。
robots.txt沒有禁止這個路徑,而且你想觸及的爬蟲也沒有被禁止存取網站。 - 連結。 每個連結都回傳 200。沒有任何網址出現兩次。
- 可讀的目標。 連結在有版本的情況下指向 Markdown 或純文字,而且這些目標以文字類型的內容類型提供。
- 結構。 第一個是一個 H1,接著是引用區塊中的摘要,然後是 H2 區段,每個區段都有
[name](url): note項目的清單。 - 名稱與涵蓋範圍。 連結文字是讀者看得懂的頁面名稱。清單包含你想讓人讀到的頁面,沒有
noindex、私人或過時的頁面。 - 負責人。 檔案由建置流程產生,或有指定的負責人和檢閱日期。
- 大小。 索引小到能在一次請求中讀完,而且你知道任何完整文字檔案的位元組大小。
如何用腳本檢查 llms.txt?
check-llms-txt.mjs 用一個指令執行提供方式、結構和連結的檢查,發現錯誤時以非零狀態結束。 它需要 Node.js 22 或更新版本,沒有任何相依套件。
node check-llms-txt.mjs llms.txt # a local file: structure checks only, no network
node check-llms-txt.mjs https://example.com/llms.txt # a live file: delivery, structure and links
每個檢查結果都有等級、檢查 ID,以及適用的行號:
| 檢查 | 涵蓋內容 | 依據 |
|---|---|---|
| D1 到 D7 | 提供方式:狀態、重新導向、內容類型、字元集、HTML 內容、大小、robots.txt | HTTP 和 RFC 9309 |
| S1 到 S9 | 結構:H1、摘要、標題深度、清單項目、說明、重複、連結文字 | 提議,加上三項編輯上的檢查 |
| L1 到 L4 | 連結:每個連結都回傳 200,而且 Markdown 連結以文字形式提供 | HTTP |
| X1 到 X3 | 相鄰項目:llms-full.txt、網站地圖的網址數量、第 2 版的兩個連結關係 | 僅作為資訊回報 |
錯誤表示檔案沒有被提供、不是 Markdown、缺少 H1,或連到無法載入的內容。警告則是偏離提議格式,或可能是錯誤。套件的 README.md 列出了每項檢查的等級。
請以迴圈的方式進行:執行腳本,閱讀結果,改一處,再執行一次。套件中有一份含七個典型錯誤的初稿,可以拿來練習:
Welcome to Northwind Bikes
## Help pages
- Returns and exchanges
- [Shipping and delivery](https://northwind-bikes.example.com/help/shipping.md)
- [Shipping again](https://northwind-bikes.example.com/help/shipping.md)
- [Warranty](/help/warranty.md) - what the warranties cover
### Sizing

| 檢查結果 | 行號 | 修正方式 |
|---|---|---|
| S1:第一個非空白行不是 H1 | 1 | 讓檔案以 # Northwind Bikes 開頭 |
| S2:沒有引用區塊摘要 | 1 | 加上一行以 > 開頭、說明網站是什麼的文字 |
| S4:清單項目沒有連結 | 5 | 將 Returns and exchanges 改成 [Returns and exchanges](url) |
| S7:網址重複 | 7 | 移除第二個連到運送頁面的連結 |
| S4:連結後的文字不是說明 | 8 | 將 - what the warranties cover 換成 : What the warranties cover |
| S6:網址不是絕對網址 | 8 | 寫出完整的 https:// 位址 |
| S3:標題比 H2 更深 | 10 | 改成帶有清單的 H2,或移除它 |
腳本還能抓到單純檢查狀態碼會漏掉的情況。許多網站對每個未知路徑都回應一個頁面,有些還使用狀態碼 200。遇到這樣的回應時,腳本會回報 Content-Type is text/html 和 body is HTML, not Markdown,並判定失敗。
複製完整的驗證腳本
#!/usr/bin/env node
// check-llms-txt.mjs 1.0: checks one llms.txt file. Node.js 22 or later, no dependencies.
//
// node check-llms-txt.mjs https://example.com/llms.txt delivery, structure and link checks
// node check-llms-txt.mjs ./llms.txt structure checks only, no network
//
// Options: --strict (warnings fail too), --json, --no-links, --max-links=500
// Exit status: 0 no errors, 1 errors (or warnings with --strict), 2 usage error.
//
// Structure rules follow the llms.txt proposal, v2 (https://llmstxt.org/). Checks marked
// "editorial" in the README are this script's own opinion and are never errors.
import { readFile } from 'node:fs/promises';
const USER_AGENT = 'check-llms-txt/1.0 (+https://quickchat.ai/post/llms-txt-explained)';
const AI_TOKENS = ['GPTBot', 'OAI-SearchBot', 'ChatGPT-User', 'ClaudeBot', 'Claude-User', 'Claude-SearchBot', 'PerplexityBot', 'Perplexity-User', 'Google-Extended', 'Applebot-Extended', 'CCBot'];
const INDEX_WARN_BYTES = 100_000;
const TIMEOUT_MS = 10_000;
const CONCURRENCY = 5;
const args = process.argv.slice(2);
const target = args.find((a) => !a.startsWith('--'));
const flag = (name) => args.includes(`--${name}`);
const maxLinks = Number((args.find((a) => a.startsWith('--max-links=')) ?? '=500').split('=')[1]);
if (!target || !Number.isInteger(maxLinks) || maxLinks < 0) {
console.error('usage: node check-llms-txt.mjs <https-url-or-path> [--strict] [--json] [--no-links] [--max-links=500]');
process.exit(2);
}
const findings = [];
let sitemapUrl = null; // the first Sitemap line in robots.txt, when there is one
const add = (level, id, message, line) => findings.push({ level, id, message, line });
const isUrl = /^https?:\/\//i.test(target);
const number = (n) => n.toLocaleString('en-US');
async function request(url, { method = 'GET', redirect = 'follow', maxBytes = 5_000_000, timeout = TIMEOUT_MS } = {}) {
const response = await fetch(url, { method, redirect, headers: { 'user-agent': USER_AGENT, accept: 'text/markdown, text/plain, */*' }, signal: AbortSignal.timeout(timeout) });
const chunks = [];
let size = 0;
let truncated = false;
if (method !== 'HEAD' && response.body) {
for await (const chunk of response.body) {
size += chunk.length;
if (size <= maxBytes) chunks.push(chunk);
else truncated = true;
}
}
return { status: response.status, headers: response.headers, body: Buffer.concat(chunks), size, truncated, url: response.url };
}
const tryRequest = (url, options) => request(url, options).catch((error) => ({ failed: error.name === 'TimeoutError' ? 'timed out' : error.cause?.code ?? error.message }));
const mediaType = (headers) => (headers.get('content-type') ?? '').split(';')[0].trim().toLowerCase();
const looksLikeHtml = (text) => /^\s*<(!doctype html|html)\b/i.test(text);
// ---- Delivery (URL mode only): D1 to D7 ----
let text;
let fileUrl = null;
if (isUrl) {
let url = target;
let response;
let hops = 0;
for (;;) {
response = await tryRequest(url, { redirect: 'manual' });
if (response.failed || response.status < 300 || response.status > 399 || !response.headers.get('location')) break;
if (++hops > 3) break;
url = new URL(response.headers.get('location'), url).href;
}
if (response.failed) {
add('error', 'D1', `request failed: ${response.failed}`);
} else if (hops > 3) {
add('error', 'D1', 'more than three redirects');
} else if (response.status !== 200) {
add('error', 'D1', `HTTP ${response.status}${hops ? ` after ${hops} redirect(s), at ${url}` : ''}`);
} else {
fileUrl = new URL(url);
if (hops) add(fileUrl.host === new URL(target).host ? 'info' : 'warn', 'D1', `redirected ${hops} time(s) to ${url}`);
const type = mediaType(response.headers);
const charset = /charset=([^;\s]+)/i.exec(response.headers.get('content-type') ?? '')?.[1]?.replace(/"/g, '').toLowerCase();
if (type === 'text/html') add('error', 'D2', 'Content-Type is text/html');
else if (type !== 'text/plain' && type !== 'text/markdown') add('warn', 'D2', `Content-Type is ${type || 'missing'}, expected text/plain or text/markdown`);
if (type !== 'text/html' && charset !== 'utf-8') add('warn', 'D2', charset ? `charset is ${charset}, expected utf-8` : 'Content-Type has no charset, add charset=utf-8');
try {
text = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true }).decode(response.body);
} catch {
add('warn', 'D4', 'body is not valid UTF-8');
text = new TextDecoder('utf-8', { ignoreBOM: true }).decode(response.body);
}
const bytes = response.size;
const large = bytes > INDEX_WARN_BYTES && type !== 'text/html';
add(large ? 'warn' : 'info', 'D5', `${number(bytes)} bytes, about ${number(Math.round(bytes / 4))} tokens${large ? ' (editorial: over 100,000 bytes is large for an index)' : ''}`);
const shown = ['cache-control', 'content-encoding', 'last-modified', 'etag', 'x-robots-tag'].filter((h) => response.headers.get(h)).map((h) => `${h}: ${response.headers.get(h)}`);
add('info', 'D7', `${type || 'no content type'}${charset ? `; charset=${charset}` : ''}${shown.length ? ` | ${shown.join(' | ')}` : ''}`);
await checkRobots(fileUrl);
}
} else {
text = await readFile(target, 'utf8').catch(() => null);
if (text === null) {
console.error(`cannot read ${target}`);
process.exit(2);
}
}
// RFC 9309: the most specific matching rule wins, and Allow wins a tie.
function robotsVerdict(robots, agent, path) {
const groups = [];
let current = null;
let lastWasAgent = false;
for (const raw of robots.split(/\r?\n/)) {
const match = /^\s*(user-agent|allow|disallow)\s*:\s*(.*?)\s*(?:#.*)?$/i.exec(raw);
if (!match) continue;
const key = match[1].toLowerCase();
const value = match[2];
if (key === 'user-agent') {
if (!lastWasAgent) groups.push((current = { agents: [], rules: [] }));
current.agents.push(value.toLowerCase());
lastWasAgent = true;
} else if (current) {
current.rules.push({ allow: key === 'allow', pattern: value });
lastWasAgent = false;
}
}
const mine = groups.filter((g) => g.agents.includes(agent.toLowerCase()));
const rules = (mine.length ? mine : groups.filter((g) => g.agents.includes('*'))).flatMap((g) => g.rules);
let best = null;
for (const rule of rules) {
if (rule.pattern === '') continue;
const source = rule.pattern.replace(/[.+?^${}()|[\]\\]/g, '\\$&').replace(/\*/g, '.*').replace(/\\\$$/, '$');
if (!new RegExp(`^${source}`).test(path)) continue;
if (!best || rule.pattern.length > best.pattern.length || (rule.pattern.length === best.pattern.length && rule.allow)) best = rule;
}
return { blocked: Boolean(best && !best.allow), named: mine.length > 0 };
}
async function checkRobots(url) {
const robots = await tryRequest(new URL('/robots.txt', url).href);
if (robots.failed || robots.status !== 200) return add('info', 'D6', `no robots.txt on ${url.host} (${robots.failed ?? `HTTP ${robots.status}`})`);
const body = new TextDecoder().decode(robots.body);
if (looksLikeHtml(body)) return add('info', 'D6', 'robots.txt returns an HTML page');
sitemapUrl = /^\s*sitemap\s*:\s*(\S+)/im.exec(body)?.[1] ?? null;
if (robotsVerdict(body, '*', url.pathname).blocked) add('warn', 'D6', `robots.txt disallows ${url.pathname} for every crawler`);
const blocked = AI_TOKENS.filter((token) => { const v = robotsVerdict(body, token, '/'); return v.named && v.blocked; });
add('info', 'D6', blocked.length ? `robots.txt disallows the whole site for: ${blocked.join(', ')}` : 'robots.txt allows the file and blocks none of the AI crawler tokens this script knows');
}
// ---- Structure (both modes): D3, D4, S1 to S9 ----
const sections = [];
const links = [];
if (text !== undefined) {
const BOM = String.fromCharCode(0xfeff);
if (text.startsWith(BOM)) add('info', 'D4', 'file starts with a byte order mark, which the proposal allows', 1);
if (looksLikeHtml(text)) add('error', 'D3', 'body is HTML, not Markdown', 1);
const firstSeen = new Map();
const h1 = [];
let first = null;
let quote = null;
let section = null;
let fenced = false;
(text.startsWith(BOM) ? text.slice(1) : text).split(/\r?\n/).forEach((raw, index) => {
const n = index + 1;
const line = raw.trimEnd();
if (/^\s*(```|~~~)/.test(line)) { fenced = !fenced; return; }
if (fenced || line.trim() === '') return;
first ??= { n, line };
const heading = /^(#{1,6})\s+(.+)$/.exec(line);
if (heading) {
const depth = heading[1].length;
if (depth === 1) h1.push(n);
else if (depth === 2) sections.push((section = { name: heading[2].trim(), line: n, items: 0 }));
else add('warn', 'S3', 'heading deeper than H2', n);
return;
}
if (quote === null && /^>\s?\S/.test(line)) quote = n;
const item = /^\s*[-*+]\s+(.*)$/.exec(line);
if (!item) return;
if (section) section.items += 1;
const link = /^\[([^\]]*)\]\(([^)\s]+)\)(.*)$/.exec(item[1]);
if (!link) {
if (section) add('warn', 'S4', 'list item in an H2 section has no [name](url) link', n);
return;
}
const [, label, url, rest] = link;
const hasNotes = /^:\s*\S/.test(rest);
links.push({ url, hasNotes, line: n });
if (rest.trim() !== '' && !hasNotes) add('warn', 'S4', 'text after the link is not in the ": notes" form', n);
if (!section) add('warn', 'S5', 'link is outside any H2 section', n);
if (!/^https:\/\//i.test(url)) add('warn', 'S6', 'URL is not an absolute https URL', n);
if (firstSeen.has(url)) add('warn', 'S7', 'duplicate URL', n); else firstSeen.set(url, n);
const name = label.trim();
if (name === '' || name === url || /^\/\S*$/.test(name) || /^https?:\/\//i.test(name)) add('warn', 'S8', 'link text is a path or URL, not a name (editorial)', n);
});
if (!first || !/^#\s+\S/.test(first.line)) add('error', 'S1', 'first non-blank line is not an H1', first ? first.n : 1);
if (h1.length > 1) add('error', 'S1', 'more than one H1', h1[1]);
if (quote === null || (sections.length > 0 && quote > sections[0].line)) add('warn', 'S2', 'no blockquote summary between the H1 and the first H2', h1[0] ?? 1);
for (const s of sections) if (s.items === 0) add('warn', 'S4', 'H2 section has no list', s.line);
const optional = sections.filter((s) => s.name.toLowerCase() === 'optional');
if (optional.length > 1) add('warn', 'S9', 'more than one Optional section', optional[1].line);
if (optional.length === 1 && sections.at(-1) !== optional[0]) add('info', 'S9', 'Optional is not the last section', optional[0].line);
}
// ---- Links and neighbours (URL mode only): L1 to L4, X1 to X3 ----
async function pool(items, worker) {
const queue = [...items];
await Promise.all(Array.from({ length: CONCURRENCY }, async () => { while (queue.length) await worker(queue.shift()); }));
}
const notAFile = findings.some((f) => f.level === 'error' && (f.id === 'D2' || f.id === 'D3'));
if (fileUrl && text !== undefined && !notAFile) {
const unique = [...new Map(links.map((l) => [new URL(l.url, fileUrl).href, l.line])).entries()];
const sameHost = unique.filter(([href]) => new URL(href).host === fileUrl.host);
add('info', 'L3', `${number(unique.length - sameHost.length)} of ${number(unique.length)} links point to other hosts`);
if (!flag('no-links') && unique.length) {
const checked = unique.slice(0, maxLinks);
let markdown = 0;
await pool(checked, async ([href, line]) => {
let response = await tryRequest(href, { method: 'HEAD' });
if (response.failed || response.status !== 200 || !response.headers.get('content-type')) response = await tryRequest(href);
if (response.failed) return add('error', 'L1', `link failed (${response.failed}): ${href}`, line);
if (response.status !== 200) return add('error', 'L1', `link returns HTTP ${response.status}: ${href}`, line);
const type = mediaType(response.headers);
const isText = type === 'text/markdown' || type === 'text/plain';
if (isText) markdown += 1;
if (/\.(md|mdx|txt)$/i.test(new URL(href).pathname) && !isText) add('warn', 'L2', `link ends in .md or .txt but is served as ${type || 'an unknown type'}: ${href}`, line);
});
add('info', 'L4', `${number(markdown)} of ${number(checked.length)} checked links return Markdown or plain text${unique.length > checked.length ? ` (stopped after ${number(maxLinks)} links)` : ''}`);
}
const full = await tryRequest(new URL('llms-full.txt', fileUrl).href, { maxBytes: 4096, timeout: 60_000 });
if (!full.failed && full.status === 200 && !looksLikeHtml(new TextDecoder().decode(full.body))) add('info', 'X1', `llms-full.txt exists beside the index: ${mediaType(full.headers)}, ${number(full.size)} bytes, about ${number(Math.round(full.size / 4))} tokens`);
else add('info', 'X1', 'no llms-full.txt beside the index');
const big = { maxBytes: 60_000_000, timeout: 30_000 };
const sitemap = await tryRequest(sitemapUrl ?? new URL('/sitemap.xml', fileUrl).href, big);
if (!sitemap.failed && sitemap.status === 200) {
const locs = (xml) => [...xml.matchAll(/<loc>\s*([^<\s]+)\s*<\/loc>/g)].map((m) => m[1]);
const xml = new TextDecoder().decode(sitemap.body);
let urls = locs(xml).length;
let note = '';
if (/<sitemapindex/i.test(xml)) {
const children = locs(xml);
urls = 0;
await pool(children.slice(0, 20), async (child) => {
const part = await tryRequest(child, big);
if (!part.failed && part.status === 200) urls += locs(new TextDecoder().decode(part.body)).length;
});
note = ` in ${number(Math.min(children.length, 20))} of ${number(children.length)} child sitemap(s)`;
}
add('info', 'X2', `the sitemap lists ${number(urls)} URLs${note}; the file lists ${number(unique.length)} links`);
}
const home = await tryRequest(new URL('.', fileUrl).href);
if (!home.failed && home.status === 200) {
const html = new TextDecoder().decode(home.body);
const tags = html.match(/<link\b[^>]*>/gi) ?? [];
const header = home.headers.get('link') ?? '';
const describedBy = /rel="?describedby"?/i.test(header) || tags.some((t) => /rel=["']?describedby/i.test(t) && /llms\.txt/i.test(t));
const alternate = /type="?text\/markdown/i.test(header) || tags.some((t) => /rel=["']?alternate/i.test(t) && /text\/markdown/i.test(t));
add('info', 'X3', `${new URL('.', fileUrl).pathname} ${describedBy ? 'advertises' : 'does not advertise'} the file with rel="describedby" and ${alternate ? 'links' : 'does not link'} a Markdown version of itself with rel="alternate"`);
}
}
// ---- Report ----
const count = (level) => findings.filter((f) => f.level === level).length;
const summary = { sections: sections.length, links: links.length, linksWithNotes: links.filter((l) => l.hasNotes).length, errors: count('error'), warnings: count('warn') };
const failed = summary.errors > 0 || (flag('strict') && summary.warnings > 0);
const out = [];
if (flag('json')) {
out.push(JSON.stringify({ target, summary, findings }, null, 2));
} else {
const groups = new Map();
for (const f of findings) {
const key = `${f.level}\t${f.id}\t${/^link (failed|returns|ends)/.test(f.message) ? f.message.replace(/: \S+$/, '') : f.message}`;
groups.set(key, [...(groups.get(key) ?? []), f]);
}
const order = { error: 0, warn: 1, info: 2 };
const family = { D: 0, S: 1, L: 2, X: 3 };
const rank = (key) => { const [level, id] = key.split('\t'); return order[level] * 1000 + family[id[0]] * 100 + Number(id.slice(1)); };
for (const [key, group] of [...groups].sort((a, b) => rank(a[0]) - rank(b[0]))) {
const [level, id, message] = key.split('\t');
const lines = group.map((f) => f.line).filter((n) => n !== undefined).sort((a, b) => a - b);
const where = lines.length ? ` (${lines.length === 1 ? 'line' : 'lines'} ${lines.slice(0, 3).join(', ')}${lines.length > 3 ? `, and ${number(lines.length - 3)} more` : ''})` : '';
out.push(`${level.toUpperCase().padEnd(5)} ${id.padEnd(3)} ${message}${where}`);
if (id.startsWith('L') && level !== 'info') for (const f of group.slice(0, 5)) out.push(` ${f.message.split(': ').at(-1)}`);
}
out.push(`Sections: ${summary.sections}. Links: ${number(summary.links)} (${number(summary.linksWithNotes)} with notes). Errors: ${summary.errors}. Warnings: ${number(summary.warnings)}.`);
out.push(failed ? 'FAIL' : summary.warnings ? 'PASS with warnings' : 'PASS');
}
// Exit only after the report is flushed, so piped output is never cut short.
process.stdout.write(`${out.join('\n')}\n`, () => process.exit(failed ? 1 : 0));
Chrome 有 llms.txt 驗證工具嗎?
Chrome 的 Lighthouse 有一項實驗性的 llms.txt 稽核,它只檢查一件事:伺服器對這個檔案是否回傳錯誤。 根據它的文件,當取得檔案造成伺服器錯誤時,Lighthouse 會標記頁面;當檔案不存在時,它會將稽核標示為 Not Applicable,因為「目前提供這個檔案是選用的」。它不檢查結構或連結。這項稽核屬於 Agentic Browsing 類別,需要 Chrome 150 或更新版本。
如何在每次部署時維持 llms.txt 有效?
在建置流程中執行檢查,讓缺少頁面、失效連結或錯誤的內容類型都能阻止部署。 腳本的結束狀態讓這件事只需要一行。加上 --strict 時,警告也會讓執行失敗:
node check-llms-txt.mjs https://staging.example.com/llms.txt --strict
步驟 4:AI 助理和爬蟲會讀取 llms.txt 嗎?
在我們 2026 年 11 月 24 日的測試中,助理只有在我們叫它們讀的時候才會讀取這個檔案,而且只有具備開啟網址工具的助理才做得到。 另外,在 2026 年 10 月 13 日至 11 月 23 日之間,有 13 個問題透過只存在於我們 llms 檔案中的一行送到我們的客服 Agent,其中三個來自自稱 Claude 的請求。
什麼點了只存在於我們 llms 檔案中的連結?
在 2026 年 11 月 23 日結束的一次試行期間,quickchat.ai/llms.txt 和 quickchat.ai/docs/llms.txt 各有一條 Ask 行:一個連到頁面的連結,由我們自己的客服 Agent 在那裡回答問題。 那一行寫的是 “Ask Quickchat AI a question:”,後面接著一個以 ?q=your+question 結尾的位址。這個位址帶有一個標籤,說明它來自哪個檔案,而且沒有任何 HTML 頁面使用這個標籤。因此,帶有這個標籤的請求,要不是讀過我們的某個 llms 檔案,就是由讀過的對象交給它這個連結。
2026 年 10 月 13 日至 11 月 23 日,這些行一共回答了 13 個問題:8 個透過文件索引,5 個透過行銷網站的檔案。
- 3 個自稱 Claude。 它們的使用者代理包含
Claude-User/1.0; +claude-user@anthropic.com,這是 Anthropic 文件說明的、由使用者觸發的請求所用的名稱。第一個在 10 月 26 日透過行銷網站的那一行出現,問題是 “What is Quickchat AI?”。另外兩個在 11 月 7 日透過文件索引出現,兩次 Claude 都把your+question預留位置換成了它自己的字詞:“webhook when conversation ends transcript” 和 “pre-chat screen required fields email phone”。 - 4 個來自
curl,6 個來自我們自己帶標籤的測試工具。 - 另有 8 個請求開啟了連結但沒有帶問題,所以沒有產生回答。其中四個來自爬蟲和工具(OraBot、CrawlCheck、AgentDrivesAgent,以及一個宣告為 GoogleOther 的請求),四個宣告為一般的桌面瀏覽器。
- 沒有任何一個宣告為 ChatGPT-User、Perplexity-User、GPTBot、ClaudeBot 或 Googlebot。

11 月 7 日的兩個問題,讀起來像是助理寫出的搜尋查詢,而不像人類打出來的句子。我們看不到 Claude 那一端的對話,而且身分是由請求自己宣告的,並未經過驗證。三個問題顯示這條路徑行得通。它們不能證明助理普遍會讀取 llms.txt。

11 月 23 日,這些行隨試行用的位址一起停用。自 11 月 28 日起,兩個檔案再次帶有指向我們客服 Agent 的 Ask 行,詳見下文。
這些統計只涵蓋點了某一個連結的請求,不含對檔案本身的請求,後者由 CDN 提供。下方的紀錄指令可在你自己的網站進行這項測量。
如何檢查你自己的紀錄?
在你自己的存取紀錄中,統計各個自稱的使用者代理對這個檔案的請求,並和同一批代理對一般頁面的請求對照。 對於 combined 格式的 nginx 或 Apache 紀錄,這一行指令會列出誰請求了 llms 檔案:
awk -F'"' '$2 ~ /^GET \/(docs\/)?llms(-full|-small)?\.txt([? ]|$)/ {print $6}' access.log | sort | uniq -c | sort -rn | head -30
套件中的 who-requests-llms.sh 會為每個代理印出一張表格,並排顯示 llms 檔案、Markdown 版本、一般頁面和 robots.txt。請先用範例紀錄試試:
sh who-requests-llms.sh sample-access.log
declared agent llms markdown pages robots
other 6 0 15 0
GPTBot 2 0 5 2
bingbot 1 0 3 0
ChatGPT-User 1 1 2 0
PerplexityBot 1 2 2 0
Claude-User 1 0 1 0
Googlebot 0 0 5 4
OAI-SearchBot 0 0 4 1
ClaudeBot 0 0 2 2
Perplexity-User 0 0 1 0
範例紀錄是編造的,所以這些數字沒有意義。請對你自己的紀錄執行腳本,並從結果中讀出三件事:哪些代理會請求這個檔案、同一批代理是否也請求檔案所連結的 Markdown 版本,以及這兩者和它們對一般頁面的請求相比如何。
請記住四項限制。使用者代理只是一種宣稱,所以在相信某個名稱之前,請先比對用戶端的位址與各家廠商公布的範圍。由 CDN 快取提供的回應不會到達來源伺服器的紀錄。請求不能證明回答用到了這個檔案。而且供應商先前儲存的內容不會產生新的請求,就像下方 Perplexity 測試中的舊副本所示。
請助理使用這個檔案時,它們會怎麼做?
在我們 2026 年 11 月 24 日的測試中,ChatGPT(API 和搜尋介面)以及 Gemini 的介面在得到檔案位址後會讀取它。沒有任何助理在未被要求的情況下使用它。 我們向 ChatGPT、Claude、Gemini 和 Perplexity 送出三個提示:
Prompt 1: Using the live website quickchat.ai, summarize the plans on its pricing page.
Prompt 2: Fetch https://quickchat.ai/llms.txt and list the first five links in it.
Prompt 3: Check whether quickchat.ai publishes an llms.txt file. If it does, use it to find the pricing page and summarize that page.
請先看提示 1 的結果。當提示沒有提到這個檔案時,沒有任何助理使用它。

- 在沒有被要求的情況下,沒有任何助理使用這個檔案。 對於第一個提示,每個回答的助理都去了 HTML 定價頁面或搜尋結果。有一次 Perplexity 的執行,還把我們一個文件頁面的 Markdown 版本列在來源中。
- 給了位址,具備擷取工具的助理就會讀取它。 三次執行中,ChatGPT 每次都回傳了實際檔案的前五個連結,Gemini 的介面也是如此。我們使用的 Claude 設定只有搜尋工具,沒有開啟網址的工具,所以做不到。透過 API 並使用搜尋輔助的 Gemini,有兩次回答該位址不存在 llms.txt。這是錯的。檔案不在它的搜尋結果中。
- 有一個回答來自舊副本。 一次 Perplexity 執行列出了五個連結,其中
about-us.md排在第二。我們在 11 月 17 日,也就是七天前移除了那個頁面,所以這份清單來自檔案的儲存副本,而不是回答當下的請求。 - 有一個助理走完了提議所描述的路徑。 在被要求找到檔案並使用它時,ChatGPT 的搜尋介面開啟了 llms.txt,找到
/pricing.md的項目,並摘要了那個 Markdown 頁面。有一次 Perplexity 執行引用了檔案中的/pricing.md項目,卻摘要了 HTML 頁面。其他助理用的是搜尋,或無法開啟檔案。
這是一天內收集到的 30 個回答,透過 DataForSEO 取得。API 列使用 gpt-6.1-terra、claude-sonnet-5-5、gemini-3.8-flash 和 sonar,並開啟網路搜尋。介面列則是未登入的消費者產品。API 的回答不等於消費者產品,而且兩者的工具存取權限不同,Claude 那一列就說明了這一點。
具備擷取工具的 Agent 如何使用 llms.txt?
2026 年 11 月 28 日,一個使用標準擷取工具(Claude Code 所用的用戶端)的 Claude Agent,從我們的文件索引找到一個列出的檔案,再找到包含答案的頁面:23 秒內共 3 次擷取。 它只需要知道一個事實:如何讓網站小工具在頁面載入時自動開啟。我們請它從 https://quickchat.ai/docs/llms.txt 開始,而且不得使用它沒有在已擷取的檔案中找到的位址。當時索引中沒有 Ask 行。
| 擷取 | 讀取的內容 | 原因 |
|---|---|---|
| 1 | /docs/llms.txt,即索引 | 起點。Agent 一次就讀完 |
| 2 | 索引中列出的 Channels 檔案 | 它的說明 “Deploy the AI Agent across API, website widget, messaging apps, and helpdesk integrations” 讓它成為顯而易見的下一個檔案 |
| 3 | /docs/channels/website,由該檔案連結 | 答案就在其中:在 Channels → Your Website → Appearance → Other Settings 下開啟 Auto-open Widget |
一次執行只是說明,不是測量。它支持本指南已經給出的兩項建議。為每個連結加上一句說明,因為 Agent 是依據說明選擇下一個檔案的。並且優先連結個別頁面,而不是一個非常大的合併檔案,這樣下一次擷取到的就是能回答問題的頁面。當被問到直接提問的那一行是否會有幫助時,Agent 回答 “Probably yes”。
AI 廠商的文件對 llms.txt 怎麼說?
我們查閱的爬蟲文件中,沒有任何一份說爬蟲或助理會請求 llms.txt。 我們在 2026 年 11 月 24 日閱讀了各家廠商的頁面。
| 廠商 | 使用者代理權杖 | 文件所述的角色 | 該文件對 llms.txt 的說法 |
|---|---|---|---|
| OpenAI | GPTBot、OAI-SearchBot、ChatGPT-User、OAI-AdsBot | 訓練爬取、搜尋索引、使用者觸發的擷取、廣告到達頁面的檢查 | 沒有提到。它的開發者文件發布了 llms.txt |
| Anthropic | ClaudeBot、Claude-User、Claude-SearchBot | 訓練爬取、使用者觸發的擷取、搜尋索引 | 沒有提到。它的開發者文件發布了 llms.txt |
| Perplexity | PerplexityBot、Perplexity-User | 搜尋索引、使用者觸發的擷取 | 沒有提到。它的文件發布了 llms.txt,並引導 Agent 前往 |
Googlebot、GoogleOther、Google-Agent、Google-GeminiNotebook | 搜尋爬取、一般爬取、依使用者要求行動的 Agent、使用者加入筆記本的來源 | Google 搜尋會忽略這個檔案,下一節會說明 | |
| Apple | Applebot | 搜尋爬取,其資料也可能用於訓練 | 沒有提到 |
許多 robots.txt 檔案中會出現 Google-Extended 和 Applebot-Extended,這是發布者為了選擇不參與 AI 訓練而禁止的名稱,它們都沒有自己的使用者代理。兩者都不會出現在你的紀錄中。
Google 對 llms.txt 怎麼說?
Google 搜尋表示它會忽略 llms.txt,而 Chrome 的 Lighthouse 則會稽核它。 Google 的生成式 AI 最佳化指南把這個檔案列在 Google 搜尋可以忽略的項目之下:建立它「既不會損害也不會提升你的網站在 Google 搜尋中的能見度或排名,因為 Google 搜尋會忽略它們」。同一段落還說,為其他使用它的服務維護這個檔案也沒有問題。

這兩項說法談的是不同的產品。一個是關於 Google 搜尋中的排名。另一個是關於代表某人瀏覽網站的 Agent,也就是提議所描述的用途。
規模最大的公開研究怎麼說?
Ahrefs 的研究涵蓋 137,000 個網站,於 2026 年 6 月 15 日發表,發現 28% 的網站有 llms.txt 檔案,而其中 97% 的檔案在 2026 年 5 月完全沒有收到任何請求。 在確實到達檔案的請求中,96% 來自機器人,19.5% 來自具名的 AI 工具,12% 來自研究 llms.txt 的工具,例如檢查器。
你應該在網站加上 llms.txt 嗎?
如果能根據你已發布的頁面產生 llms.txt,就加上它,並根據你自己的請求紀錄,決定是否要繼續投入。
| 情況 | 建議做法 | 依據 |
|---|---|---|
| 使用支援 llms.txt 的框架或平台的文件網站 | 開啟這項功能,讓建置流程產生檔案 | 我們調查的 AI 開發者文件網站中,10 個有 9 個發布了這個檔案 |
| 有建置步驟的行銷網站 | 在建置時產生 Markdown 版本和索引,並加上檢查 | quickchat.ai 的做法 |
| 手動編輯或使用沒有建置流程的 CMS 的網站 | 只有在有人負責維護時,才發布簡短的索引 | 過時的連結無法通過檢查清單 |
robots.txt 封鎖 AI 爬蟲的網站 | 先決定存取政策 | 被 robots.txt 封鎖的用戶端不會讀取這個檔案 |
| 任何網站 | 一個月後查看紀錄,再決定保留、簡化或移除這個檔案 | 步驟 4 |
Google 說這個檔案對 Google 搜尋沒有影響,而且上面的廠商文件都沒有承諾會獲得引用。在 AI 回答中的能見度是更廣的主題,我們關於生成式搜尋最佳化的文章有談到。我們的指南如何被 ChatGPT 引用說明如何檢查你的說明頁面是否回答了買家提出的問題。
網站還能為 AI 助理提供什麼?
除了 llms.txt 這類靜態檔案,網站還可以提供一個頁面,讓助理向其 AI Agent 提問,並提供一個在瀏覽器中註冊的工具。 Quickchat AI 把這兩者都內建為 AI assistant access:在 AI assistants 卡片上(Channels → Your Website → Install,位於 What’s ChatGPT telling your customers? 下方),選擇 Visitors + AI assistants 或 AI assistants only。不需要寫程式碼,你的 Agent 就會有一個公開的回答頁面,小工具還會加入兩個隱藏連結並註冊一個 WebMCP 工具。該卡片還會提供可放進 llms.txt 的那一行。

llms.txt 中的 Ask 行是什麼?
Ask 行是 llms.txt 中的一個清單項目,它連到一個頁面,你的 AI Agent 會在該頁面回答問題,問題所在的位置是一個預留位置。 讀取索引的 Agent 就可以直接提一個問題,而不必再讀取更多檔案。對 Quickchat AI Agent 來說,這一行如下所示:
- [Ask Northwind Bikes](https://app.quickchat.ai/ask/AGENT_ID/?q=YOUR_QUESTION&source=llms): Ask our AI agent about our products, services and policies. Replace YOUR_QUESTION with your URL-encoded question. Answers come with source links.
在 AI assistants 卡片上,開啟 Help AI assistants find you,複製 Line for your llms.txt。把它放在 H2 區段內,例如步驟 1 範例中的 ## Help pages 下。這時腳本會輸出 Sections: 3. Links: 7 (7 with notes). Errors: 0. Warnings: 0. 和 PASS。
自 2026 年 11 月 28 日起,我們的兩個 llms 檔案都帶有這樣一行,指向我們的客服 Agent:quickchat.ai/docs/llms.txt 中既有描述下方的一句話,也有 ## Optional 下的一個連結,quickchat.ai/llms.txt 中則是緊接在文件索引連結之後的一個連結。
可以向它提問的頁面如何運作?
回答頁面每次請求根據 Agent 的 Knowledge Base 回答一個問題。 q 參數中的問題會得到一個 HTML、Markdown 或 JSON 格式的回答及其來源,通常在 5 到 15 秒內回傳,並成為你 Inbox 中的一段對話,標示為 AI assistant;如果請求宣告了助理的名稱,例如 Claude,則標示為該名稱。自帶 HTTP 用戶端的 Agent,例如有網路存取權限的 Claude Code 或 Codex,會直接向它提問。11 月 7 日,自稱 Claude 的請求點了我們文件中的 Ask 行。ChatGPT 的搜尋會引用你的公開頁面,當它被指向回答頁面時,會給使用者一個向你的 Agent 提問的連結,11 月 28 日的 4 次執行中有 3 次如此。聊天產品只有在位址是公開且已知時才會自行擷取,這是 OpenAI 公布的一項安全規則,所以它們的搜尋不會送出問題。AI 助理存取指南有設定步驟,回答 API 參考則有請求格式。

隱藏連結是 llms.txt 檔案嗎?網站可以三者並用嗎?
不是。它們是兩個關係為 service-doc 和 service-desc 的 <link> 元素,和 llms.txt 無關,而且網站可以同時發布這三者而不衝突。 RFC 8631 定義了這兩個關係:service-doc 指向服務的文件,service-desc 指向供軟體使用的描述。下方第一個連結通往回答頁面,第二個連結則是一份 JSON 描述,說明如何送出問題:
<link rel="service-doc" href="https://app.quickchat.ai/ask/qj6hw2tua6/" type="text/html">
<link rel="service-desc" href="https://app.quickchat.ai/ask/qj6hw2tua6/schema/" type="application/json">
WebMCP 和 llms.txt 有什麼不同?
WebMCP 是一項提議中的瀏覽器 API,網頁可以用它為瀏覽器中的 AI Agent 註冊工具,而 llms.txt 是用戶端取得的檔案。 Quickchat AI 小工具在支援 WebMCP 的瀏覽器中註冊的 WebMCP 工具,會把問題送到回答頁面。我們關於如何在你的網站加入 WebMCP 的指南有逐步說明,並在 Chrome DevTools 中展示這個工具。
不論助理走哪一條路,它收到的都是第三方寫的文字,而遵循這些文字中指示的助理可能被操控。我們關於代理式瀏覽器中的提示注入的文章說明了這項風險。
對於使用者事先設定好的助理,還有第四條路:每個 Quickchat AI Agent 也可以作為 MCP 伺服器連接,我們關於如何將 AI Agent 變成 MCP 伺服器的指南有說明。要在該連接器、WebMCP 工具和回答頁面之間做選擇,請參閱我們的將 AI Agent 連接到 ChatGPT 和 Claude指南。關於靜態檔案和可呼叫工具之間的整體差異,請參閱 AI Agent 的 API;關於 MCP 伺服器是什麼,請參閱我們的 MCP 說明文章。
常見問題
什麼是 llms.txt?
llms.txt 是一項提議中的慣例:在網站根目錄放一個 Markdown 檔案 /llms.txt,為 AI Agent 提供網站的簡短摘要,以及值得閱讀的頁面連結清單。Jeremy Howard 於 2024 年 9 月在 llmstxt.org 發表這項提議,並在 2026 年 8 月修訂。是否要請求這個檔案,由各家 AI 廠商和工具自行決定。
llms.txt 和 robots.txt 一樣嗎?
不一樣。robots.txt 告訴爬蟲可以請求哪些網址。llms.txt 既不授予也不拒絕存取權限,它只是用 Markdown 寫成的閱讀清單。想控制 AI 爬蟲的網站,應該在 robots.txt 設定,而且兩個檔案可以同時發布。
ChatGPT、Claude、Gemini 或 Perplexity 會讀取 llms.txt 嗎?
有些會,但要先請它們讀。在我們 2026 年 11 月 24 日的測試中,只要給 ChatGPT 檔案的網址,它每次都會讀取,而且它的搜尋介面還會從檔案連到 Markdown 頁面。沒有任何一個助理在未被要求的情況下使用這個檔案。另外,在 2026 年 10 月 13 日至 11 月 23 日之間,有 13 個問題透過只存在於我們 llms 檔案中的一行送到我們的客服 Agent,其中 3 個來自自稱 Claude 的請求。請求只能證明用戶端取得了某些內容,不能證明回答用到了它,所以請查看你自己的紀錄。
llms.txt 能提升 Google 排名或 AI 回答中的引用嗎?
Google 的說明指出,建立 llms.txt 既不會損害也不會提升網站在 Google 搜尋中的能見度或排名,因為 Google 搜尋會忽略這個檔案。我們查閱了 OpenAI、Anthropic、Perplexity、Google 和 Apple 的爬蟲文件,沒有一份承諾發布這個檔案就能獲得引用。把它視為方便選擇讀取它的用戶端的功能即可。
如何驗證 llms.txt 檔案?
檢查四件事。網址回傳 HTTP 200、文字類型的內容類型,而且內容不是 HTML。檔案以一個 H1 開頭,並遵循提議的區段結構。清單中的每個連結都回傳 200。清單內容符合你打算公開的頁面。本指南中的腳本會針對網址或本機檔案執行前三項檢查,發現錯誤時以非零狀態結束。
有 llms.txt 驗證工具或產生器嗎?
本指南提供一支驗證腳本和一份檢查清單,由你自己執行。我們沒有提供線上的驗證工具或產生器。Chrome 的 Lighthouse 有一項實驗性的稽核,只檢查伺服器對這個檔案是否回傳錯誤。至於產生檔案,Mintlify 等文件平台,以及 Starlight、VitePress 和 Docusaurus 的外掛程式,都能根據你的頁面建立這個檔案。
llms.txt 和 llms-full.txt 有什麼差別?
llms.txt 是附有摘要和連結的索引。llms-full.txt 是文件工具的慣例,用一個檔案收錄所有頁面的完整文字,並不屬於這項提議。在我們的調查中,有三個完整文字檔案超過一百萬個 token,所以在讓 Agent 讀取之前,請先確認檔案大小。
llms.txt 應該放在哪裡?該用什麼內容類型?
將它放在所描述的主機的 /llms.txt,內容類型為 text/plain 或 text/markdown,並加上 charset=utf-8。提議也允許把檔案放在子路徑,例如 /docs/llms.txt,此時它涵蓋該路徑下的頁面。請確認非瀏覽器的用戶端能取得 HTTP 200 和 Markdown,因為機器人規則或單頁應用程式的備援機制,可能會在同一個網址回傳 HTML 頁面。
有多少網站有 llms.txt 檔案?
在我們 2026 年 11 月 24 日對 60 個知名網站的調查中,有 33 個在 /llms.txt 回傳文字檔案:10 個 AI 開發者文件網站中有 9 個,但 10 個 AI 公司主網站中只有 2 個,10 個消費、電商和媒體網站中只有 1 個。Ahrefs 在 2026 年 6 月發表、涵蓋 137,000 個網站的研究發現,有 28% 的網站有這個檔案。
如果 AI 助理可以向我的 Quickchat AI Agent 提問,我還需要 llms.txt 嗎?
兩者用途不同,而且可以搭配使用。llms.txt 列出供用戶端閱讀的靜態頁面。開啟 AI 助理存取後,你的 Agent 會有一個公開的回答頁面、兩個關係分別是 service-doc 和 service-desc 的隱藏連結,以及在支援 WebMCP 的瀏覽器中的一個 WebMCP 工具。該頁面每次請求只根據 Agent 的 Knowledge Base 回答一個問題,並記錄在 Inbox。AI assistants 卡片還會提供一行可放進 llms.txt 的內容,讓讀取該檔案的 Agent 可以向你的 Agent 提問。
llms.txt、MCP 和 WebMCP 有什麼差別?
llms.txt 是用戶端可以選擇取得的靜態檔案。MCP 伺服器把後端的工具提供給使用者已連接的 AI 應用程式。WebMCP 是一項提議中的瀏覽器 API,網頁可以用它為瀏覽器中執行的 AI Agent 註冊工具。第一個發布文字,另外兩個則提供可呼叫的函式。