跳到正文
Simon Willison · 讨论信号·· 19 天前AI 评分38

Anthropic 文档:提示词如何影响 Claude Fable 5.2 对代码归属的判断

Quoting Prompting Claude Fable 5.2

内容导读

Anthropic 文档称,Claude Fable 5.2 对代码归属的提示相当敏感。在小型编程任务测试中,提示未提归属或把代码库说成他人的,模型倾向沿用现有结构,即使重复已有代码;若明确说代码库属于它,约一半尝试会合并重复代码,没有这句话时不到十分之一。

正文 · 原文

10th November 2026

Claude Fable 5.2 responds closely to what the prompt says about who owns the code it works on. In Anthropic’s testing on small coding tasks, when a prompt said nothing about ownership or presented the code base as someone else’s, the model tended to add to the existing structure, even when that repeated existing code. [...]

If you want the model to improve the structure as it works, say that the code is its own:

This codebase is yours: what it's for and how it's built are your call, and you'll keep building on it.

In Anthropic’s testing on small coding tasks, the model merged repeated code in about half of the tries with this sentence, and in under a tenth of the tries without it.

— Prompting Claude Fable 5.2, Anthropic documentation

来源:Simon Willison · 讨论信号 · simonwillison.net