通过 Accept 标头为 AI 智能体提供 Markdown 内容
Serve Markdown to AI Agents with Accept Headers

原始链接: https://acceptmarkdown.com/

为了优化网站以适配 AI 智能体,请实施内容协商机制,在提供标准 HTML 的同时,额外提供一份简洁的 Markdown 版本。通过使用 `Accept: text/markdown` 请求头,服务器可以输出剔除了导航栏、脚本和布局包装器的精简内容。 这种方法具有三个关键优势: 1. **Token 效率:** 减少不必要的 DOM 元素,确保 AI 模型能将上下文窗口集中在核心内容上。 2. **提升检索质量:** 消除广告和弹窗等噪音,使 RAG(检索增强生成)流水线能更精准地索引你的数据。 3. **降低延迟:** 更小的数据载荷能加快获取和解析速度,从而实现更快的模型处理。 此做法遵循标准网络协议(RFC 9110/7763),并兼容主流框架和平台。通过提供轻量级的 Markdown 变体,可以提升内容的“AI 就绪度”,确保智能体能够高效获取你的信息,而无需处理冗余的开销。

Hacker News 最新 | 往日 | 评论 | 提问 | 展示 | 招聘 | 提交 登录 通过 Accept 标头向 AI 代理提供 Markdown (acceptmarkdown.com) 11 点,由 tilt 于 49 分钟前发布 | 隐藏 | 往日 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Serve Markdown to AI agents with content negotiation

Your site already has the content. Serving a Markdown variant lets agent AI clients skip nav/scripts/layout markup and read the content directly.

  • 01 — Tokens

    A fraction of the bytes.

    Markdown drops nav, styles, scripts, and layout wrappers. Agents spend context on your prose, not your DOM.

  • 02 — Retrieval

    Higher signal-to-noise.

    No ads, related-content rails, or modal overlays muddying the text a RAG pipeline has to embed.

  • 03 — Latency

    Faster first token.

    Less to fetch, less to parse, less to stuff into the context window before the model starts thinking.

How AI-ready is your URL?

  1. Serves Markdown for Accept: text/markdown
  2. Sets Vary: Accept
  3. Rejects unsupported types with 406
  4. Honors q-values

Hit a URL with
Accept: text/markdown.

We make the request from our edge. See what the origin actually returns.

联系我们 contact @ memedata.com