The following article was originally published on Drew Breunig’s blog and is being republished here with the author’s permission.本文最初发布于 Drew Breunig 的博客,经作者授权在此转载。
Thanks to natural language interfaces, AI applications can be prototyped quickly. You write what you want in English, hand it to a frontier model, and a working prototype appears in an afternoon. This is extraordinarily powerful and for one-off tasks, optimal. But as a way to build reliable systems, the natural language prompt is a trap.得益于自然语言接口,AI 应用的原型设计变得非常迅速。你只需用英语写下需求,交给前沿模型,一个可用的原型半天就能搞定。这确实非常强大,对于一次性任务而言也是最优解。但若想以此构建可靠的系统,自然语言提示词就是一个陷阱。
The plain-English prompt that makes prototypes effortless turns out to be a poor way to specify how a system should behave, and the bill arrives slowly, disguised as ordinary progress, until the application can barely move. The problem is not any single prompt. It is that natural language was never meant to be a specification language for engineering, and treating it as one quietly caps what you can build.让原型设计变得轻松的简单英语提示词,在定义系统行为时却显得力不从心。这种“债务”会以日常进展为伪装缓慢积累,直到应用变得举步维艰。问题不在于某个具体的提示词,而在于自然语言从未被设计为工程领域的规范语言;将其视为规范语言,会悄无声息地限制你所能构建系统的上限。
The prompt debt trap提示词债务陷阱
The first symptom of prompt debt is slowing iteration. As users flag errors and spot edge cases, additional guidance is added to the instructions, nudging the model into line. If unwanted behaviors persist, instructions are repeated, with increasing severity. Pretty soon, the prompt isn’t straightforward and quick fixes regress previous instructions. Errors can no longer be handled with one-line “hot fixes” and your development cycle slows to a crawl.提示词债务的第一个征兆是迭代变慢。随着用户不断反馈错误并发现边缘情况,你不得不向指令中添加更多引导,以纠正模型的行为。如果问题依旧,你只能不断重复指令,并加大语气。很快,提示词就会变得冗长且难以维护,简单的修复甚至会导致之前的指令失效。此时,错误已无法通过简单的“热修复”解决,开发周期也会陷入停滞。

search_instructions, search_usage_guidelines, mandatory_copyright_requirements, hard_limits, self_check_before_responding, and critical_reminders.Fable 系统的提示词中,关于版权的指导意见重复了多达六次,分别出现在 search_instructions、search_usage_guidelines、mandatory_copyright_requirements、hard_limits、self_check_before_responding 和 critical_reminders 等部分。Next, prompt debt incapacitates your team. Your brittle prompt full of edge cases and all-caps threats is barely legible to you, and it’s downright impenetrable to your colleagues. Many teams mitigate this issue by breaking prompts into complicated templates assembled at run-time, each isolated to specific concerns. But these prompt segments evolve, too, growing into a thicket of conditions.其次,提示词债务会拖垮你的团队。那份充斥着边缘情况和全大写警告的脆弱提示词,对你而言已经难以阅读,对同事来说更是如同天书。许多团队试图通过将提示词拆解为运行时组装的复杂模板来解决这一问题,每个模板负责特定功能。但这些提示词片段也会不断演变,最终长成一片错综复杂的条件丛林。
Finally, prompt debt ties you to a single model. Your hot fixes work on GPT-4o, but fail in entirely new ways when you point your inference call at GPT-5.4-mini. So you stay with 4o, hope the increasingly frequent deprecation emails from your inference provider are empty threats, and forgo the possibility of potentially cheaper, faster, better models. A recent report from Datadog suggests this is a common situation: The most-used model in traffic they observed is GPT-4o.1最后,提示词债务会将你绑定在单一模型上。你的热修复方案在 GPT-4o 上有效,但当你切换到 GPT-5.4-mini 时却会以全新的方式失效。于是你只能死守 4o,祈祷推理提供商发来的频繁弃用通知只是空头威胁,并放弃尝试那些可能更便宜、更快、更好的模型。Datadog 最近的一份报告显示,这种情况很普遍:在他们观察到的流量中,使用最多的模型依然是 GPT-4o.1
Any one of these issues is a nuisance, but together they are the difference between a glorified prototype and a product that can grow with you, your customers, and your business. Your shiny new AI features are frozen, can only be improved through a full rebuild, and are locked to an aging model.这些问题中的任何一个都令人头疼,但加在一起,就决定了一个项目究竟是昙花一现的“面子工程”,还是能够随你、客户及业务共同成长的产品。你那些光鲜亮丽的新 AI 功能会被冻结,只能通过彻底重构来改进,并且被死死锁定在一个老旧的模型上。
Why prompt debt happens为什么会出现提示词债务
Natural language interfaces are wonderful. They’re the right mechanism for one-off tasks and broad conversational threads. We get into trouble when we rely on natural language to define durable system behavior.自然语言接口固然美妙,它们是处理一次性任务和广泛对话式交流的绝佳机制。但当我们依赖自然语言来定义持久的系统行为时,麻烦就来了。
The imprecision of natural language paired with probabilistic language models means different words expressing the same intent can yield different outputs. In a recent study, a clinical question asked in a patient’s voice and then re-asked in a physician’s, with identical facts, flipped Opus from declining all ten times to answering all ten.自然语言的模糊性与概率语言模型的结合意味着,用不同词汇表达相同意图可能会产生截然不同的输出。在最近的一项研究中,同一个临床问题,分别以患者和医生的口吻提出,在事实完全相同的情况下,Opus 模型从连续十次拒绝回答变成了连续十次给出解答。
And it’s not only word choice that matters. Seemingly unrelated statements in the same prompt can affect results. In a Harvard study, researchers found that merely stating which NFL team the user rooted for changed how often the model refused to answer questions regarding sensitive topics. Spurious statements influence the inference pass in ways we can’t predict. Which is why prompts become more brittle as you add fixes. An additional instruction to quell a stubborn error could affect how the model interprets a separate instruction that worked yesterday.而且,影响结果的不只是用词。提示词中看似无关的陈述也会影响结果。哈佛大学的一项研究发现,仅仅声明用户支持哪支 NFL 球队,就会改变模型对敏感话题拒绝回答的频率。虚假的陈述会以我们无法预测的方式影响推理过程。这就是为什么随着你不断添加修复措施,提示词会变得越来越脆弱。为了解决顽固错误而添加的一条额外指令,可能会影响模型对昨天还能正常运行的另一条指令的理解。
Repeating instructions propels us towards prompt debt, but it’s necessary when the behavior we want is at odds with a model’s training. This is fighting the weights, and once you recognize it you see it in system prompts everywhere. For example, ChatGPT’s image prompts used to instruct the LLM eight times to not reply when a generated image was returned because it had been trained to always keep the conversation going.重复指令会加速提示词债务的产生,但当我们的预期行为与模型的训练目标相冲突时,这又是必须的。这实际上是在与模型的权重“对抗”,一旦你意识到这一点,就会发现这种情况在系统提示词中随处可见。例如,ChatGPT 的图像提示词曾多次指示 LLM 在返回生成的图像后不要回复,因为它被训练成总是试图延续对话。
Every coding agent system prompt we analyzed featured repeated instructions, stern warnings, and all-caps demands. Claude Code tells Opus seven times to return multiple tool calls in a single response. And even the most advanced models force prompt authors to fight the weights: Fable’s leaked system prompt restates one specific copyright rule six times.我们分析的每一个代码智能体系统提示词都包含了重复的指令、严厉的警告和全大写的强制要求。Claude Code 七次告诉 Opus 在单次响应中返回多个工具调用。即使是最高级的模型也迫使提示词作者去对抗权重:Fable 泄露的系统提示词将某条具体的版权规则重申了六次。
None of these examples occurred in isolation. Multiple repeated rules are woven throughout the system prompts we examine. Stubborn errors grow our prompts quickly, with each increasing the brittleness, the risk of regression with every edit.这些例子并非个案。在我们审查的系统提示词中,到处都交织着重复的规则。顽固的错误让提示词迅速膨胀,每一次修改都增加了脆弱性和回归风险。
And worse: These fixes are tailored to a single model’s behavior. A recent Berkeley-led study found enterprises stay on older models because newer ones break their existing agents. This is because models are not cleanly versioned software. They have different weights that produce different behaviors, in unpredictable and undocumented ways. A prompt that works beautifully with GPT-4o may fail with GPT-5.5. Anthropic’s own release notes for Fable warn that skills developed for prior models can “degrade output quality.”更糟糕的是:这些修复措施是针对特定模型行为量身定制的。伯克利牵头的一项研究发现,企业之所以停留在旧模型上,是因为新模型会破坏他们现有的智能体。这是因为模型并非版本管理清晰的软件。它们拥有不同的权重,以不可预测且未记录的方式产生不同的行为。一个在 GPT-4o 上运行良好的提示词,在 GPT-5.5 上可能会失效。Anthropic 针对 Fable 的发布说明中甚至警告称,为旧模型开发的技能可能会“导致输出质量下降”。
Prompt debt locks an application to a single model. Our inability to easily swap models isn’t the result of frontier labs coming up with a clever moat. No, it’s the result of evolving a lossy natural language specification against a probabilistic model.提示词债务将应用锁定在单一模型上。我们无法轻松更换模型,并非因为前沿实验室构建了什么巧妙的护城河,而是因为我们试图用有损的自然语言规范去约束一个概率模型。
Preventing prompt debt预防提示词债务
Thankfully, we don’t have to theorize about how to mitigate prompt debt; one field has already shown the way. Programmers using coding agents sit at the leading edge of what models can do, outliers on the jagged frontier of model abilities. Over the last couple years they’ve been evolving best practices that let the model write more of the code, while delivering maintainable, modular software.幸运的是,我们不必空谈如何减轻提示词债务;有一个领域已经指明了方向。使用代码智能体的程序员正处于模型能力的尖端,他们是模型能力前沿的先行者。在过去几年里,他们一直在进化最佳实践,让模型编写更多的代码,同时交付可维护、模块化的软件。
The first principle is to specify your system’s behavior with measurements, not prose. When the model’s output is probabilistic and language is imprecise, we build hard edges to constrain them: evaluations, metrics, and typed specifications. These are legible, shared artifacts colleagues can read and contribute to, enabling the collaboration that brittle prompts prevented.第一原则是使用度量指标而非散文来定义系统行为。当模型的输出是概率性的且语言是不精确的,我们就需要构建硬性边界来约束它们:评估、指标和类型化规范。这些是清晰的、可共享的工件,同事们可以阅读并参与贡献,从而实现脆弱的提示词所无法提供的协作。
The best engineers now spend more of their bandwidth on tests than ever, as they are no longer a safety net but the thing that lets the model cook.优秀的工程师现在将更多的精力投入到测试中,因为测试不再仅仅是安全网,而是让模型发挥作用的核心机制。
The second principle is to stop writing the prompt by hand. Once we have metrics that can score candidates, the prompt is no longer something to craft but something for which to search. And the surface area of potential words, phrases, and structures that natural language allows is too vast to spend human hours on. This is terrain LLMs were built to explore, and there are already systems (like DSPy and GEPA) that manage this work for you, holding prompts accountable to your designs.第二原则是停止手动编写提示词。一旦我们有了可以为候选方案评分的指标,提示词就不再是需要“手工打造”的东西,而是需要“搜索”的对象。自然语言所允许的潜在词汇、短语和结构空间过于广阔,不值得投入人类的时间。这是 LLM 天生擅长的探索领域,目前已经有系统(如 DSPy 和 GEPA)可以为你管理这项工作,确保提示词符合你的设计要求。
Once prompts are generated and your program’s behavior is defined by measurements, you are no longer bound to a particular model. Evaluating a new model takes hours, not weeks. When a faster, cheaper model arrives you can try it. When a deprecation email arrives, you can secure options in a day. Whether a model is pulled for regulatory reasons (as we saw with Anthropic’s Fable) or deprecated due to age (as Groq announced last week with Llama-3.1-8b), the fix is a chore, not a fire drill.一旦提示词由程序生成,且系统行为由度量指标定义,你就不会再被特定的模型所束缚。评估一个新模型只需几小时,而不是几周。当更快、更便宜的模型出现时,你可以直接尝试。当收到弃用通知时,你可以在一天内完成迁移。无论是模型因监管原因被下架(如我们所见 Anthropic 的 Fable),还是因过时被弃用(如 Groq 上周宣布弃用 Llama-3.1-8b),修复工作都只是日常琐事,而非紧急的救火演习。
Every mature engineering discipline eventually stops doing by hand the very thing it once prided itself on doing by hand. Assembly gave way to compilers, hand-tuned queries gave way to planners, and manual memory management gave way (mostly) to machines that do it better. Prompt-writing is no different.每一个成熟的工程学科最终都会停止手动执行那些曾经引以为傲的操作。汇编语言让位于编译器,手动调优查询让位于规划器,手动内存管理(大部分)让位于自动化的机器。提示词编写也不例外。
Coaxing the model with exactly the right words is a real skill, and for one-off tasks it’s often optimal. But to build reliable, improvable, and portable systems we should not be hand-tuning prompts.用恰到好处的词汇引导模型确实是一种技能,对于一次性任务而言通常是最优的。但为了构建可靠、可改进且可移植的系统,我们不应再进行手动调整提示词。
Footnote脚注
- This stat from Datadog is from March of this year, so GPT-4o concentration has likely dropped a bit. However, I’ve heard from multiple large inference providers that usage of GPT-4o and models of similar vintage can be higher than 50% of all calls! ↩︎Datadog 的这一统计数据来自今年三月,因此 GPT-4o 的占比可能已经有所下降。然而,我从多家大型推理提供商处获悉,GPT-4o 及同类旧款模型的使用量仍可能占到所有调用量的 50% 以上! ↩︎



