字号 ·· | 护眼
thenextweb

为什么Markdown正在成为搜索数据与AI模型之间的默认语言Why markdown is becoming the default language between search data and AI models

点「原文对照」整页切到原文,或双击某段只看那段的原文。

在支撑 AI 应用的基础设施层中,Markdown 正在成为一项新标准。越来越多的提供商开始将其用作模型需要读取的所有内容的默认输出格式,并取代 JavaScript 对象表示法(JSON),不再把后者当作适用于所有场景的首选格式。

Across the infrastructure layer that powers AI applications, Markdown has been emerging as a new standard. More providers are turning to it as the default output for anything a model needs to read, and moving beyond JavaScript Object Notation (JSON) as the go-to, one-size-fits-all format.

这种切实而持续的转变,反映了大语言模型的训练方式、聊天界面的答案呈现方式,以及开发者在构建应用时对令牌、上下文窗口和成本的真实考量。而这种采用趋势也有充分理由。

This real, ongoing shift reflects how large language models are trained, how chat interfaces render answers, and how developers actually build with tokens, context windows, and cost in mind. And there is good reason for this adoption.

Markdown 契合模型的工作方式。大语言模型已经过海量 Markdown 内容的训练,例如文档网站、README 文件、技术博客、论坛帖子和知识库等。这种训练 exposure 意味着模型已经熟练掌握 Markdown;它们懂得分析标题、列表、表格和代码围栏,并将它们视为语义信号,而非噪声。

Markdown fits how models work Large language models have been trained on enormous amounts of Markdown. Think of documentation sites, README files, technical blogs, forum threads, knowledge bases and so on. That exposure means models already speak Markdown fluently; they know how to analyze its headers, lists, tables, and code fences, and treat them as semantic signals rather than noise.

与此同时,面向用户的聊天界面已经能够呈现 Markdown 格式的答案。当模型输出 Markdown 时,前端无需额外转换即可清晰展示。当同一个模型摄取 Markdown 时,它接收到的信息形式与其训练数据分布及其预期响应方式相一致。相比向模型输入层层嵌套、使用前必须在内部解析的密集 JSON,这种方式形成了更自然的输入输出循环。

At the same time, user-facing chat interfaces can already render answers from Markdown. When a model outputs Markdown, the front end can display it cleanly without extra transformation. When the same model ingests Markdown, it receives information in a form that mirrors its training distribution and the way it is expected to respond. The result is a more natural input-output loop than feeding models dense, nested JSON that must be mentally unpacked before use.

如果从令牌的角度来看,Markdown 也是一种更精简的选择。它去除了结构性冗余,只保留信息负载。对于必须将大量上下文内容装入有限窗口的 AI 智能体而言,这种效率可直接转化为每次请求包含更多相关内容,并降低每次推理的成本。一个明显的趋势转向Markdown并非出于推测。这一做法已经被纳入主要模型提供商的最佳实践指导。OpenAI的提示工程文档明确建议在有帮助的情况下,使用Markdown标题、项目符号列表和表格来组织开发者消息。该指导建议使用“##”表示主要章节,使用行内反引号标记代码,并采用清晰的层级格式,以提升模型对指令的遵循能力和内容的可读性。

If you look at things from a token perspective, Markdown is also the leaner approach. It strips away structural overhead and keeps the informational payload. For AI agents that must fit large amounts of context into a limited window, that efficiency translates directly into more relevant content per request and lower cost per inference. A visible trend The move to Markdown isn’t speculative either. It’s already being encoded in best-practice guidance from major model providers. OpenAI’s prompt engineering documentation explicitly recommends structuring developer messages with Markdown headers, bullet lists, and tables where helpful. The guidance advises using ‘##’ for major sections, inline backticks for code, and clear hierarchical formatting to improve model compliance and readability.

第三方提示词指南也在采用同样的模式。它们使用Markdown标题划分章节,使用列表进行枚举,使用表格进行比较。多项分析指出,对于在文档上训练的模型而言,Markdown更节省令牌,也更符合模型的理解方式,因此成为复杂提示词的首选格式,尤其是在较新的GPT-5系列模型中。

Third-party prompting guides are echoing this same pattern. They use Markdown headings to create section breaks, lists for enumerations, and tables for comparisons. Several analyses note that Markdown is more token-efficient and more naturally understood by models trained on documentation, which makes it a preferred formatting tool for complex prompts, especially with newer GPT-5 series models.

基础设施提供商也认同这一点:API和数据提供商同样已接受Markdown。过去,JSON曾是通用交换格式,如今许多机构开始提供针对大语言模型使用进行优化的Markdown版本。原因完全相同:它们希望减少令牌冗余、简化智能体的解析过程,并使数据格式与模型提示方式和答案呈现方式保持一致。

Infrastructure providers agree API and data providers have also been won over by Markdown. Where JSON once ruled as the universal interchange format, many are now offering Markdown variants optimized for LLM consumption. The rationale is exactly the same: they want to reduce token bloat, simplify parsing for agents, and align with how models are prompted and how answers are displayed.

SerpApi是一家已有九年历史的搜索数据API公司,最近在其全部100多项API中推出了Markdown输出功能,且不收取额外费用。SerpApi为开发者、研究人员和《财富》500强企业提供来自Google、Bing、YouTube及其他来源的结构化洞察。开发者可以请求以节省令牌的Markdown格式而非JSON格式返回搜索结果,该功能专为AI智能体和大语言模型应用而设计。用户无需添加新的端点,只需通过现有集成中的查询参数、路由扩展名或请求头来指定该格式。

SerpApi, a nine-year-old, search-data API company, recently launched Markdown output across all 100+ of its APIs at no extra cost. SerpApi serves developers, researchers, and Fortune 500 companies with structured insights from Google, Bing, YouTube, and other sources. The feature lets developers request search results in a token-light Markdown format instead of JSON, aimed specifically at AI agents and LLM-powered applications. No new endpoint is required, and the format is requested via a query parameter, route extension, or header on existing integrations.

在 SerpApi 自身基准测试中的一个真实案例中,Google 的一次“coffee”搜索结果以 JSON 格式呈现时需要 24,723 个词元,以 Markdown 格式呈现时则需要 6,435 个词元,减少了 74%。结合字段过滤后,同一响应进一步降至 1,298 个词元。SerpApi 表示,其各项 API 平均可节省约 50% 的词元,部分端点的降幅甚至高达 90%。

In a real-world example from SerpApi’s own benchmarks, a single Google search for “coffee” costs 24,723 tokens as JSON and 6,435 tokens as Markdown, adding up to a 74% reduction. When combined with field filtering, the same response dropped further to 1,298 tokens. Across its APIs, SerpApi reports average token savings of roughly 50%, with some endpoints seeing reductions of up to 90%.

这些数据之所以重要,是因为搜索结果属于智能体摄取的数据中噪声最多、嵌套层级最深的载荷之一。JSON 响应包含重定向链接、网站图标、跟踪参数和深度嵌套的元数据,而模型在进行推理时并不需要这些内容。相比之下,Markdown 输出通过表格和列表保留标题、摘要、链接、价格和评分等核心信息,同时自动去除大量内部跟踪噪声和重复字段。

These numbers matter because search results are among the noisiest, most nested payloads that agents ingest. JSON responses carry redirect links, favicons, tracking parameters, and deeply nested metadata that models do not need to reason over. Markdown output, in contrast, preserves the core information, such as titles, snippets, links, prices, and ratings in tables and lists while automatically stripping much of the internal tracking noise and duplicate fields.

开发者在查询字符串中添加“output=md”、调用“/search.md”路由,或设置“Accept: text/markdown”请求头,即可使用新的 Markdown 格式。响应包含用于提供元数据的 YAML 前置信息、用于呈现结果集的结构化 Markdown 表格,以及原生内联链接,所有内容都可直接置入提示词或智能体记忆中。

Developers can access the new Markdown format by adding ‘output=md’ to the query string, calling the ‘/search.md’ route, or setting an ‘Accept: text/markdown’ header. The responses include YAML frontmatter for metadata, structured Markdown tables for result sets, and native inline links, all designed to be dropped directly into prompts or agent memory.

这意味着什么 随着越来越多的网页内容由智能体而非人类读取,基础设施层将 increasingly 优先考虑机器可读性,而非便于人类浏览的嵌套结构。JSON 对于程序化处理和严格的模式约束仍然不可或缺,但在 AI 工作流的上下文摄取阶段,Markdown 正在成为新的默认选择。

What this all means As more of the web gets consumed by agents instead of humans, the infrastructure layer will increasingly optimize for machine readability over human-friendly nesting. JSON remains essential for programmatic manipulation and strict schema enforcement, but for the context ingestion phase of AI workflows, Markdown is emerging as the new default.

因此,未来几个月预计会有更多数据提供商推出 Markdown 格式的响应,尤其是在搜索、电商、地图和内容 API 领域,因为 token 效率会直接影响成本和性能。提示模板和智能体框架也很可能会将 Markdown 章节、表格和列表标准化,作为向模型提供检索上下文的规范方式。工具链也应朝着衡量并尽量减少 token 占用的方向发展,而 Markdown 将成为主要手段。

In the coming months, one should therefore expect more data providers to offer Markdown variants of their responses, especially for search, e-commerce, maps, and content APIs where token efficiency has an immediate impact on cost and performance. Prompt templates and agent frameworks are also likely to standardize on Markdown sections, tables, and lists as the canonical way to present retrieved context to models. Tooling should also evolve around measuring and minimizing token footprint, with Markdown as a primary lever.

对于如今使用大语言模型开发的开发者来说,这一趋势已经十分明确。在向模型输入外部数据时,应优先选择与模型训练方式和输出形式相匹配的格式。Markdown 已不再只是文档工具,它正成为搜索数据与 AI 模型之间新的通用语。

For developers building with LLMs today, the writing is on the wall. When feeding external data into models, one should prefer formats that match how models are trained and how they output. Markdown is no longer just a documentation tool. It’s becoming the new lingua franca between search data and AI models.

本文由 SerpApi 供稿,非 TNW 编辑部制作,不代表 TNW 的编辑立场。

Contributed article by SerpApi. Not produced by the TNW newsroom and does not reflect the editorial stance of TNW.