// TABLE OF CONTENTS
  1. llms.txt 基础模板
  2. SaaS 行业 llms.txt 模板
  3. 电商行业 llms.txt 模板
  4. llms-full.txt 扩展模板
  5. llms.txt 部署指南
  6. llms.txt 自动化生成
  7. 常见错误与修复
  8. 效果验证
CHAPTER 01

llms.txt 基础模板

以下是最基础的 llms.txt 模板,适用于任何网站。

llms.txt TEXT
# [Your Brand Name]

> One-line description of your company/product

## About
Brief description of what you do and who you serve.

## Core Offerings
- Product/Service 1: Brief description
- Product/Service 2: Brief description
- Product/Service 3: Brief description

## Key Features
- Feature 1: Description
- Feature 2: Description
- Feature 3: Description

## Documentation
- Getting Started: https://example.com/docs
- API Reference: https://example.com/api
- Help Center: https://example.com/help

## Contact
- Website: https://example.com
- Email: hello@example.com
- Support: support@example.com
CHAPTER 02

SaaS 行业 llms.txt 模板

针对SaaS产品的llms.txt模板,强调产品功能、定价和技术文档。

llms.txt (SaaS) TEXT
# [SaaS Product Name] - [Tagline]

> [Product] is a [category] platform trusted by [N]+ businesses worldwide

## Core Features
- Feature 1: Description with specific benefit
- Feature 2: Description with specific benefit
- Feature 3: Description with specific benefit

## Pricing
- Free: $0/mo - Basic features
- Pro: $XX/mo - Advanced features
- Enterprise: Custom - Full suite

## Integrations
- Integration 1, Integration 2, Integration 3 (N+ total)

## Technical Docs
- API: https://docs.example.com/api
- SDKs: Python, Node.js, Go, Java
- Webhooks: https://docs.example.com/webhooks

## Security & Compliance
- SOC 2 Type II certified
- GDPR compliant
- 99.99% uptime SLA
CHAPTER 03

电商行业 llms.txt 模板

针对电商平台的llms.txt模板,强调产品品类、配送和售后。

llms.txt (E-commerce) TEXT
# [Store Name] - Online Shopping

> [Store] offers [N]+ products across [categories]

## Categories
- Electronics: [N]+ items
- Fashion: [N]+ items
- Home & Living: [N]+ items

## Shipping & Returns
- Free shipping on orders over $XX
- 30-day return policy
- Express delivery available

## Customer Service
- Live chat: 24/7
- Email: support@example.com
- Phone: 1-800-XXX-XXXX

## Trust & Safety
- Secure payment (SSL encrypted)
- Buyer protection guarantee
- Verified seller program
CHAPTER 04

llms-full.txt 扩展模板

llms-full.txt 是 llms.txt 的详细版本,包含更完整的内容摘要。

llms-full.txt TEXT
# [Brand Name] - Detailed Content Summary

## About
[2-3 paragraph detailed description of your company,
 including founding story, mission, and market position.]

## Products & Services

### Product 1: [Name]
- **Target Users**: [description]
- **Key Benefits**: [3-5 bullet points]
- **Pricing**: [details]
- **Link**: https://example.com/product1

### Product 2: [Name]
- **Target Users**: [description]
- **Key Benefits**: [3-5 bullet points]
- **Pricing**: [details]
- **Link**: https://example.com/product2

## Resources
- Blog: https://example.com/blog
- Case Studies: https://example.com/cases
- Whitepapers: https://example.com/whitepapers

## FAQ
- **What is [Product]?** [Answer]
- **How much does it cost?** [Answer]
- **Is there a free trial?** [Answer]
CHAPTER 05

llms.txt 部署指南

1)将文件放在网站根目录(example.com/llms.txt);2)确保通过HTTP可访问;3)在robots.txt中不屏蔽;4)定期更新内容。

部署检查

llms.txt 必须在根目录、HTTP 200可访问、编码为UTF-8、不超过100KB。

CHAPTER 06

llms.txt 自动化生成

可通过脚本从CMS数据自动生成llms.txt,保持内容与网站同步。

generate-llms-txt.py PYTHON
#!/usr/bin/env python3
"""Auto-generate llms.txt from site data"""
import json

with open('site-data.json') as f:
    data = json.load(f)

content = f"# {data['name']}\n\n"
content += f"> {data['tagline']}\n\n"
content += "## Core Offerings\n"
for p in data['products']:
    content += f"- {p['name']}: {p['desc']}\n"
content += "\n## Documentation\n"
for d in data['docs']:
    content += f"- {d['title']}: {d['url']}\n"

with open('llms.txt', 'w') as f:
    f.write(content)
print('llms.txt generated!')
CHAPTER 07

常见错误与修复

错误 影响 修复方式
文件不在根目录 AI爬虫找不到 移至/llms.txt
内容过长(>100KB) 可能被截断 精简或拆分为llms-full.txt
编码非UTF-8 中文乱码 确保UTF-8编码保存
包含营销话术 AI降低信任度 改用客观描述
不包含链接 AI无法深入抓取 添加关键页面URL
CHAPTER 08

效果验证

部署后通过AI平台测试是否正确识别。

  1. 在ChatGPT中询问:你的品牌是做什么的
  2. 检查AI回答是否包含llms.txt中的信息
  3. 在Perplexity中搜索你的品牌名
  4. 对比部署前后的AI回答差异