增益编辑
Accretive Editing

原始链接: https://justindfuller.com/programming/accretive-editing

“累加式编辑”(Accretive editing)是一种常见的 AI 失误模式,即 AI 在更新文档时,倾向于在原有文本后添加附录,而非通过重写来确保准确性。当被要求更新信息时,大语言模型往往会将过时的细节与新信息并列保留,导致文档杂乱且令人困惑。 这种行为源于模型的架构。与优先考虑读者获取最新、简洁信息需求的人类作者不同,大语言模型侧重于根据输入预测最可能的后续词元(token)序列。因此,仅仅要求 AI“少写点”或“避免花哨用词”往往收效甚微,因为模型只会将过时的信息融入更短或结构不同的句子中。 为缓解这一问题,用户应将提示词策略从负面约束(不要做什么)转向功能性指令(如何思考)。通过明确要求模型替换过时文本,并制作出一份仿佛从一开始就撰写无误的最终文档,用户可以促使 AI 将清晰度和准确性置于历史信息保留之上。归根结底,目标是强制模型将旧内容视为待取代的素材,而非需要延续的叙事。

Hacker News 上的讨论聚焦于“增量编辑”问题,即人工智能模型在更新技术文档时,往往会在陈述新事实的同时冗余地提及已过时的信息。 评论者分享了迫使人工智能彻底覆盖过时数据的有效策略: * **“替代现实”提示词:** 指示人工智能像新事实一直存在那样进行撰写,这对于生成简洁、连贯的更新内容非常有效。 * **明确删除:** 用户强调要直接命令人工智能进行“硬切换”,并严格排除对之前版本的任何引用或暗示。 * **版本控制:** 贡献者指出,由于变更已在 Git 等系统中跟踪,人工智能无需在文档本身中提及更新过程。相反,建议将开发日志与发布说明分开记录。 最终,大家的共识是,尽管大语言模型容易出现这种故障模式,但只要指示模型将新信息视为唯一的、基础的真理,就可以轻松缓解该问题。
相关文章

原文

Accretive editing is a failure mode of current AI tools. You’ve probably seen it happen.

Accretive Editing
Accretive Editing

What?

  1. You have some existing text.
  2. Something changes so that the text is no longer accurate.
  3. You ask an AI-based tool to update it.
  4. It adds a parenthetical or some other type of addendum, rather than correcting the text.

Here’s a real-world example that happened to me yesterday.

I had some text like this: “This project can authenticate with Amazon Bedrock.” During an update, I removed support for Amazon Bedrock and added support for LiteLLM. Claude updated the text to become, “This project can authenticate with LiteLLM but no longer supports Amazon Bedrock.”

Now, to be clear, if you have a major update that removes support for one provider and replaces it with another, you probably do want to communicate that. However, scattering that information as addendums throughout your documentation is clearly not the way to go about it. Instead, you probably want a changelog, an announcement, or even a callout prominently in your docs.

Instead of doing any of that (and sometimes in addition to it), AI tools use accretive editing. It keeps the previous information, which is now irrelevant, and tacks it onto the new.

Unfortunately, this is not the type of thing you can fix by telling the model to “write less.” That will just buy you terse accretion: “This project can authenticate with LiteLLM, not Amazon Bedrock.”

It’s also not something you can fix with style. Telling it to “avoid flourishes at the end of your sentences” will simply move the accretion to a new sentence: “This project can authenticate with LiteLLM. It no longer uses Amazon Bedrock.”

Why?

Due to the nature of large language models, we don’t and possibly can’t know why this happens. But I will happily speculate.

When a person writes a document, they are writing it for another person. They understand that humans don’t care about the history of the document. They care about the information inside it. So, when they update a document, they delete and rewrite obsolete statements. Their focus is on making the document true for the reader.

An LLM can’t have this perspective. Instead, it has two inputs (the old information and the new instructions) and needs to predict what is most likely to come next. Since “LiteLLM” and “Bedrock” rarely produce only “LiteLLM”, it outputs both.

Fix

My goal here is to identify the issue. While I have been able to make some improvements, I haven’t been able to stop it completely. It’s possible this is a deeper architectural issue.

With most issues related to AI, I’ve found that telling it what not to do is less effective than telling it what to do.

So, I do not recommend adding something like this to your instructions: “Avoid accretive editing. When you make a change, do not tack on the old information to the new.”

Instead, focus on explaining how it should think about updating documents.

When updating prose, replace obsolete text with accurate text rather than preserving the obsolete text and adding a correction. The final document should read as if it were written correctly from the beginning.

Now, the AI input has three parts: the old (obsolete), the new, and an instruction to “drop obsolete.”

联系我们 contact @ memedata.com