概述
發布該檔案可能有助於選擇抓取它的工具,但它不是爬蟲指令、搜尋排名信號,也不是保證任何特定助手會使用該內容。
深入探討
The llms.txt idea was proposed by Jeremy Howard in 2024 as a way to address a real problem: large language models have limited context windows and web pages are often cluttered with navigation, ads, and JavaScript that make it hard for an AI tool to extract the actual content efficiently. The convention specifies a Markdown file at the site root (/llms.txt) with a required H1 title, an optional blockquote summary, and then sections of links, each ideally pointing to clean Markdown versions of pages rather than full HTML. Some documentation platforms and site owners also publish an llms-full.txt file that concatenates complete pages. This is a community extension, not part of the current llmstxt.org v2 specification. It is a proposal rather than a protocol requirement. Some documentation platforms generate these files and several AI labs publish their own documentation indexes, but publication does not mean every search crawler or AI product fetches, follows, or ranks by them. Treat the file as an optional author-curated index and verify a target tool’s behavior before relying on it. A key misconception is treating llms.txt as equivalent to robots.txt in enforcement — robots.txt is a widely respected directive about crawler access, while llms.txt is only a curated pointer file that a given AI tool may or may not choose to fetch and use. A site owner can experiment after checking for stale or sensitive links, and can measure whether known tools fetch the file. Do not promise an SEO or citation benefit, and do not use it to replace content quality, accessible navigation, or crawler controls.
現實世界的實施
一個文件站點在其根目錄發布 llms.txt,列出其入門指南、API 參考與變更日誌,並以 Markdown 連結呈現一行描述。
一個開源專案的 llms.txt 直接連結到其文件頁面的原始 Markdown 版本,讓 AI 助手能閱讀乾淨文字,而非解析渲染後的 HTML。
一個公司網站包含 llms-full.txt 變體,將整份文件內容串接成一個檔案,供想一次性載入所有內容的工具使用。
一個部落格嘗試使用 llms.txt,僅列出其基礎解釋文章,希望 AI 答案引擎能夠更準確地引用這些頁面。
llms.txt 的未來
該提案仍對社群意見開放,其發布格式可能會發生變化。一些文件平台產生文件,但每個爬蟲或助理決定檢索什麼以及如何使用它。網站團隊應該為其文件註明日期,在文件更改時審查鏈接,並將觀察到的獲取僅視為訪問證據,而不是模型使用內容或搜索可見性提高的證據。避免做出排名承諾;使用官方爬蟲控制存取規則和普通內容品質以提高可發現性。
付諸實踐
為什麼這很重要
- 成本與預算. 多年來,架構決策決定著效能和營運成本。
- 更明確的決策. 技術教育幫助團隊選擇正確的堆疊,而不僅僅是最新的堆疊。
- 品質管控. 更好的工程選擇可以減少生產中的可靠性事故。
留意
- 優化一項基準測試可以隱藏更廣泛的系統弱點。
- 基礎設施和維護成本常常被低估。
- 隨著系統變得更加複雜,安全性和可觀察性差距可能會擴大。
後續步驟
- 在實施之前定義延遲、品質和成本目標。
- 在實際負載和資料條件下進行基準測試。
- 儀器監控錯誤、漂移和使用者影響。
- 在擴展之前準備回滾和事件回應路徑。
不斷探索
常見問題
什麼是 llms.txt?
llms.txt 是一個關於 Markdown 索引的非正式社群提案,它總結了網站並將 AI 代理程式指向選定的資源。發布該文件可能會對選擇獲取該文件的工具有所幫助,但它不是爬蟲指令、搜尋排名訊號,也不是任何特定助手將使用該內容的保證。
根據指南,llms.txt 在提案中的預期作用是什麼?
該提案描述了精心策劃的 Markdown 概述和資源連結;它不會強迫任何代理商取回它們。
llms.txt 與 robots.txt 在執行上有何不同?
該指南明確警告不要將 llms.txt 視為與 robots.txt 同等的強制執行方式,並指出它是自願的,而且採用情況並不均衡。
配套檔案 llms-full.txt 與 llms.txt 有何不同?
有些網站將完整內容的檔案發布為非正式的擴充功能;目前的 llmstxt.org v2 提案定義的是連結索引格式,而非強制要求的 llms-full.txt 隨附檔案。
誰提出了 llms.txt 常規,大約是在什麼時候?
本指南將此提案歸功於 Jeremy Howard 於 2024 年提出,旨在解決上下文視窗受限與 HTML 雜亂的問題。
llms.txt 建議連結到什麼內容格式,而非完整的 HTML 頁面?
該提案建議使用簡潔的 Markdown 連結以及可取得的乾淨 Markdown 版本;並不要求提供完整的網站內容。