降低 AI 改动带来的认知负荷
模型给抽象起的名字不一定合你的习惯(它叫 MutationIntent,你脑子里是 EditRequest),每看一眼就要在脑内查一次,几十个新词叠起来就压出了认知负荷。作者的解法:审阅前先让它把生造术语与候选替代词列出来,你确认后它全局替换。
中文
复制
审阅大量 AI 生成的代码时,我常常发现 LLM 为抽象概念挑选的术语并不总能对上我自己的选择。比如它口中的 MutationIntent,在我看来叫 EditRequest 更自然。既然 LLM 的用词不是我的理想选择,每次看到它我都得在脑子里查一遍它是什么意思,这就带来了认知负担。
这听起来像是很小的摩擦,但想想几十个新术语在不熟悉的代码里彼此交织,认知负担是会累积的。脑子里能同时装下的语义对照就那么多,超了之后我就开始误解代码的实际运作方式。
为了把这种负担压到最低,我会在审阅之前用下面这段提示词对 AI 的改动做一次后处理:
Please review the changes and extract any unconventional or bespoke terms used for abstract objects, processes and concepts. Create a temporary markdown file with each term, its meaning and why it was chosen, and some proposed alternative terms for it. I will then use this markdown file to confirm the term choice or to provide my own custom term. You will then incorporate any changes. The goal here is to map your language choices to my own language choices so that I can understand the concepts more easily.
然后我逐条确认术语的选择。AI 会在所有地方做查找替换,文档也不例外。改完之后的代码审起来轻松多了,因为它读起来更像是从我脑子里出来的。